Commit Graph

57 Commits

Author SHA1 Message Date
Bond_009
e21f4adc16 Fix wrong usage of ArgumentNullException.ThrowIfNull 2022-12-07 16:44:00 +01:00
Bond_009
b366dc2e6e Use ArgumentException.ThrowIfNullOrEmpty 2022-12-07 16:43:59 +01:00
Bond_009
c7d50d640e Replace == null with is null 2022-12-05 15:00:20 +01:00
Bond_009
f6af28cf96 Fix some things that slipped through the cracks 2022-10-11 23:37:29 +02:00
cvium
5dc30c6a6d fix: use HttpContext and ClaimsPrincipal instead of IAuthorizationContext 2022-10-06 13:57:47 +02:00
Bond_009
f50a250cd9 Optimize Guid comparisons
* Use Guid.Equals(Guid) instead of the == override
* Ban the usage of Guid.Equals(Object) to prevent accidental boxing
* Compare to default(Guid) instead of Guid.Empty
2022-02-21 14:15:09 +01:00
Cody Robibero
32629cd7da Use BaseItemKind where possible 2021-12-12 06:11:27 -07:00
Patrick Barron
a0c6f72762 Migrate authentication db to EF Core 2021-05-20 23:56:59 -04:00
Patrick Barron
a225f34796 Merge branch 'master' into authenticationdb-efcore
# Conflicts:
#	Jellyfin.Api/Helpers/RequestHelpers.cs
2021-05-18 18:09:46 -04:00
Patrick Barron
8607b52541 Make device/session code async 2021-04-10 16:57:25 -04:00
BrianCArnold
4fa2a32d81
Apply suggestions from code review
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
2021-03-31 01:24:38 -04:00
BrianCArnold
af03b280bc
Update SessionController.cs 2021-03-31 01:23:51 -04:00
BrianCArnold
80fe48fda9
Update SessionController.cs
Removed unnecessary construction of POCO to represent data from POST body
2021-03-30 07:29:40 -04:00
Brian Arnold
ca25301e64 Added Required attribute to Text property of MessageCommand. 2021-03-29 10:10:44 -04:00
Brian C. Arnold
998833ea6e Removed null check for body object and user [Required] attribute in replacement. 2021-03-27 23:29:24 -04:00
Brian Arnold
f114ba57dd Fixed comment and code block runes to match coding
standards required by Jellyfin team.
2021-03-27 23:29:24 -04:00
Brian Arnold
81e3e5ca48 Changed SessionController.SendMessageCommand
implementation receive data in the POST body, as that is how the
jellyfin-web client currently posts the data to the server.

Resolves: #5628
2021-03-27 23:29:24 -04:00
lmaonator
694d772b11
Update Jellyfin.Api/Controllers/SessionController.cs
Co-authored-by: Cody Robibero <cody@robibe.ro>
2021-03-26 14:13:45 +01:00
lmaonator
db2fbcef2b Fix stream selection having no effect when casting
When casting to jellyfin-mpv-shim from jellyfin-web in the browser,
jellyfin-web sends data about which version (for grouped items) and
which streams the user selected in the browser to the
"Sessions/{sessionId}/Playing" API endpoint.

The API endpoint currently doesn't forward them to jellyfin-mpv-shim
through the Play command, which results in the default streams being
played instead of the browser selected ones.

PlayRequest already has the properties and they are already sent to the
cast client by SendPlayCommand when present.
jellyfin-mpv-shim will already use them to select the wanted streams
when it receives the Play command.

All that's needed to make it work is to take the parameters and assign
them to PlayRequest.
2021-03-26 13:41:34 +01:00
crobibero
c8c5feacb6 Convert ClientCapabilities to a Dto with JsonConverters 2020-11-21 11:37:22 -07:00
crobibero
3cc0dd7e12 Reduce RequestHelpers.Split usage and remove RequestHelpers.GetGuids usage. 2020-11-16 20:29:46 -07:00
crobibero
f2a86d9c80 Remove CommaDelimitedArrayModelBinderProvider 2020-10-14 13:03:36 -06:00
github@esslinger.dev
c3e7eb3a6f Merge branch '4214-supported-commands-enum' of https://github.com/skyfrk/jellyfin into 4214-supported-commands-enum 2020-10-02 18:29:59 +02:00
github@esslinger.dev
9aad772288 feat: implement CommaDelimitedArrayModelBinderProvider 2020-10-02 18:26:48 +02:00
Simon Eßlinger
d10090b394
fix: remove unused null check
Co-authored-by: Cody Robibero <cody@robibe.ro>
2020-10-01 22:48:42 +02:00
github@esslinger.dev
ba12ea7f4a feat: use CommaDelimitedArrayModelBinder to retain API 2020-10-01 19:57:31 +02:00
github@esslinger.dev
dd4f3a7c51 feat: convert supportedCommands strings to enums 2020-10-01 18:43:44 +02:00
Anthony Lavado
af24c43118
Merge pull request #4192 from nielsvanvelzen/generalcommand-sucks
Use GeneralCommandType enum in GeneralCommand
2020-09-23 09:57:45 -04:00
Niels van Velzen
891c538f81 Use GeneralCommandType in SessionController parameters 2020-09-21 17:49:45 +02:00
Niels van Velzen
3459655bb4 Use GeneralCommandType enum in GeneralCommand name 2020-09-21 16:56:22 +02:00
BaronGreenback
f71812abc0
Update SessionController.cs 2020-09-20 14:36:46 +01:00
BaronGreenback
9cb37ae9c2
Update Jellyfin.Api/Controllers/SessionController.cs
Co-authored-by: Cody Robibero <cody@robibe.ro>
2020-09-20 12:44:10 +01:00
BaronGreenback
701d54260d
Update SessionController.cs 2020-09-19 15:46:47 +01:00
BaronGreenback
7050525f6b
Update SessionController.cs 2020-09-19 15:01:34 +01:00
BaronGreenback
d8e8d298ea
Update Jellyfin.Api/Controllers/SessionController.cs
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
2020-09-19 13:58:56 +01:00
BaronGreenback
eee977a77b
Update Jellyfin.Api/Controllers/SessionController.cs
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
2020-09-19 13:58:39 +01:00
BaronGreenback
4dae7d0521
Update Jellyfin.Api/Controllers/SessionController.cs
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
2020-09-19 13:58:18 +01:00
BaronGreenback
ea7b3699c2
Update SessionController.cs
removed space
2020-09-17 18:47:36 +01:00
BaronGreenback
8738fe570a
Update SessionController.cs 2020-09-17 18:27:07 +01:00
BaronGreenback
81db323f88
Update SessionController.cs 2020-09-17 17:54:09 +01:00
crobibero
63ebae2f9e Remove nullable from required 2020-09-09 14:28:30 -06:00
crobibero
14de45602b fix play command route 2020-09-07 18:59:55 -06:00
crobibero
7294dc103f Fix api routes 2020-09-07 18:45:06 -06:00
crobibero
29fc882037 merge all attributes 2020-09-06 09:07:27 -06:00
crobibero
59d47ec3f5 Make all FromRoute required 2020-09-05 17:07:25 -06:00
crobibero
07e7125d07 Fix dlna play to 2020-08-21 07:24:44 -06:00
crobibero
2e3ef18a11 fix route typo 2020-08-10 10:09:27 -06:00
crobibero
7b864e3a3c parameter isn't actually required 2020-08-09 14:12:39 -06:00
crobibero
fffa94fc33 Apply fixes from review 2020-08-06 08:17:45 -06:00
crobibero
858aecd409 Fix all route for base url support 2020-08-04 12:48:53 -06:00