Commit Graph

45 Commits

Author SHA1 Message Date
Shadowghost 42c70fba63 Additional fixes
Co-Authored-By: Cody Robibero <cody@robibe.ro>
2026-08-22 08:50:14 +02:00
Cody Robibero 635fd0433d Merge pull request #17370 from zerafachris/fix/item-update-null-optional-fields
fix: don't throw ArgumentNullException on partial UpdateItem payloads (#17366)
2026-07-21 18:17:22 -04:00
zerafachris 53e58d8b1b Make ItemUpdateController.UpdateItem internal instead of reflection
Addresses review feedback from @Bond-009 on PR #17370: the test helper
InvokeUpdateItem was invoking the private UpdateItem(BaseItemDto, BaseItem)
method via reflection. Jellyfin.Api.csproj already grants
InternalsVisibleTo("Jellyfin.Api.Tests"), so the method is changed to
internal and the test now calls it directly, removing the
GetMethod/Invoke boilerplate.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-21 08:51:30 +02:00
Bond-009 9b5f830462 Merge pull request #17326 from theguymadmax/update-series-name
Update season and episode SeriesName when renaming a series
2026-07-17 22:06:26 +02:00
zerafachris 5cd3d7ebb7 fix: don't throw ArgumentNullException on partial UpdateItem payloads (#17366)
BaseItemDto.Genres, .Tags, and .ProviderIds are plain auto-properties with
no default initializer, so they deserialize to null when a client omits
them from a partial POST /Items/{itemId} body. The OpenAPI spec documents
every BaseItemDto field as optional, but ItemUpdateController.UpdateItem
fed these three properties straight into Distinct()/Select()/ToList()
without a null check, so a request that (for example) only sets Tags
throws ArgumentNullException("source") once it reaches the unguarded
Genres line, before Tags is even processed.

Guard all three assignments with the same "if (request.X is not null)"
pattern already used for the neighboring Studios/Taglines/ProductionLocations
fields in this method, so omitted fields are left unchanged instead of
crashing the request.

Adds ItemUpdateControllerTests covering the reported repro (only Tags
supplied) and a companion case asserting existing Genres/ProviderIds are
preserved when omitted from the payload.

Signed-off-by: zerafachris <christopher.zerafa@blocklabs.io>
2026-07-17 17:20:30 +02:00
theguymadmax 6238448716 Update season and episode SeriesName when renaming a series 2026-07-13 23:08:06 -04:00
Jordan Rushing f3fbe5575a Allow SeriesName to be editable from Item Metadata (books) 2026-07-06 15:28:49 -05:00
theguymadmax 5ce7170813 Trim tags 2026-05-31 21:13:34 -04:00
Erik W e1e18e8da0 Add OriginalLanguage as option to PreferredAudioLanguage (#12579)
* Add OriginalLanguage as option to PreferredAudioLanguage

* Support for multiple original languages

* Add original audio stream indicator

* Fetch OriginalLanguage from TMDB

* Adapt to EFCore refactor

* Fix PlayDefaultAudioTrack OriginalLanguage behavior

* Fix better PlayDefaultAudioTrack OriginalLanguage behavior

* Add comment to ItemFields

* Improved PlayDefaultAudioTrack behavior

* Add migration for original language

* Use sting.Equals for string comparisons

* Always set dto OriginalLanguage

* Remove OriginalLanguage from ItemFields

---------

Co-authored-by: Lampan-git <lampan-git@users.noreply.github.com>
2026-05-07 20:07:23 +02:00
Shadowghost 1dacb69d80 Fix Genre Uniqueness 2026-02-01 21:51:52 +01:00
Shadowghost 77ff451e60 Only save unique values of ProductionLocations, Studios, Tags, Artists and AlbumArtists 2026-02-01 21:23:13 +01:00
theguymadmax aa666565d1 Backport pull request #15808 from jellyfin/release-10.11.z
Trim music artist names

Original-merge: 093cfc3f3b

Merged-by: crobibero <cody@robibe.ro>

Backported-by: Bond_009 <bond.009@outlook.com>
2026-01-18 11:30:36 -05:00
SmeagolWorms4 d0950c8f09 Fix GET MetadataEditor ContentTypeOptions for inheritedContentType 2025-12-15 23:11:01 +01:00
dyphire 2007815fa6 Further refinement of BCP 47 language labeling support 2025-07-30 22:15:37 +08:00
Tim Eisele f576783ae1 Fix distinction queries (#14007) 2025-04-26 18:49:30 -06:00
Bond-009 ceb850c770 Update projects to .NET 9 (#13023) 2024-11-16 10:11:01 -07:00
Shadowghost 5d4880c497 Backport pull request #11743 from jellyfin/release-10.9.z
Fix replace logic

Original-merge: 2ddb15c784

Merged-by: joshuaboniface <joshua@boniface.me>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
2024-06-01 18:40:56 -04:00
Bond-009 3feb3f81bf More efficient array creation (#11468) 2024-04-30 13:32:59 -06:00
Niels van Velzen a80968478a Fix InvalidCastException in ItemUpdateController (#11398) 2024-04-21 21:53:27 -06:00
Cody Robibero 6fb6b5f176 Validate item access (#11171) 2024-04-14 08:18:36 -06:00
Cody Robibero 033cfa59c4 Convert CollectionType to use lowercase enum names 2023-12-08 15:45:36 -07:00
Patrick Barron de0241e975 Move API policies to MediaBrowser.Common 2023-11-12 10:24:35 -05:00
Cody Robibero 906f701fa8 Convert CollectionType, SpecialFolderType to enum (#9764)
* Convert CollectionType, SpecialFolderType to enum

* Hide internal enum CollectionType values

* Apply suggestions from code review

Co-authored-by: Shadowghost <Shadowghost@users.noreply.github.com>

* Fix recent change

* Update Jellyfin.Data/Attributes/OpenApiIgnoreEnumAttribute.cs

Co-authored-by: Patrick Barron <barronpm@gmail.com>

---------

Co-authored-by: Shadowghost <Shadowghost@users.noreply.github.com>
Co-authored-by: Patrick Barron <barronpm@gmail.com>
2023-11-09 14:00:29 -07:00
Shadowghost ec32c56d3f Set removed and added tags recursively 2023-05-14 21:45:46 +02:00
SenorSmartyPants 369c7f1451 Save TVChannel Height if set (#8777)
Co-authored-by: Cody Robibero <cody@robibe.ro>
2023-03-10 10:03:11 -07:00
Shadowghost 2e315b7f08 Properly build where clause for rating checks 2023-02-20 11:53:20 +01:00
Shadowghost c8d80450e0 Recursively update rating 2023-02-20 11:53:20 +01:00
Shadowghost f5f890e685 Migrate to file-scoped namespaces 2023-02-02 18:50:33 +01:00
Bond_009 52194f56b5 Replace != null with is not null 2022-12-05 15:01:13 +01:00
Bond_009 c7d50d640e Replace == null with is null 2022-12-05 15:00:20 +01:00
KonH 6cbfdea4c0 Fix warning: Type cast is redundant (#2149) 2021-10-03 11:05:18 +07:00
Cody Robibero cba07b1ca6 Remove more and more warnings 2021-08-28 16:32:50 -06:00
crobibero 858c91ab48 Specify defaults or set query parameter to nullable 2021-03-04 18:25:52 -07:00
Bond_009 f5973d57e8 Remove UTF8 bom from some files 2020-11-21 14:26:03 +01:00
crobibero 63ebae2f9e Remove nullable from required 2020-09-09 14:28:30 -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
Bond_009 119f64f5e7 Make some methods async 2020-08-21 22:01:19 +02: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
crobibero 73bcda7eac Make all optional strings nullable 2020-06-27 10:50:44 -06:00
crobibero 8c38644fca Fix response code & docs 2020-06-20 15:15:59 -06:00
crobibero 95bae56640 Fix response code & docs 2020-06-20 15:14:43 -06:00
crobibero 97ce641242 remove #nullable 2020-06-19 09:00:50 -06:00
crobibero 81d3ec7205 Move ItemUpdateService to Jellyfin.Api 2020-06-08 12:20:33 -06:00