Commit graph

66 commits

Author SHA1 Message Date
Cody Robibero
e7b8d45bbb
Use helper function to compare guid (#10825) 2024-01-17 08:51:39 -07:00
Niels van Velzen
55916a09eb
Remove some unused client capabilities and sync code (#10812) 2024-01-06 13:33:48 -07:00
felix920506
a2bc5a5900
Make "activeWithinSeconds" independent from "controllableByUserId" in GetSessions
Fixes issue #10610
2023-11-29 03:41:30 -05:00
Patrick Barron
de0241e975 Move API policies to MediaBrowser.Common 2023-11-12 10:24:35 -05:00
Cody Robibero
2920611ffc Convert string MediaType to enum MediaType 2023-10-10 15:57:15 -06:00
cvium
52e2776d8e Merge branch 'master' into simplify_authz
# Conflicts:
#	Jellyfin.Api/Auth/SyncPlayAccessPolicy/SyncPlayAccessHandler.cs
2023-02-12 22:59:48 +01:00
cvium
209edd38a4 refactor: simplify authz 2023-02-09 13:51:37 +01:00
Bond_009
52230d1c30 Return NotFound when itemId isn't found 2023-02-04 20:11:08 +01:00
Shadowghost
f5f890e685 Migrate to file-scoped namespaces 2023-02-02 18:50:33 +01:00
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