Skip non-positive provider ids instead of forwarding them - #37
MarcFauser wants to merge 1 commit into
Conversation
A negative placeholder is an established convention in Jellyfin libraries for "do not match this item": the anime providers only search by name when the stored id is empty (AniDbSeriesProvider, AniListSeriesProvider), so writing a deliberately invalid id suppresses a wrong match. Jellyfin stores provider ids as strings and does not validate them as numbers - ProviderIdsExtensions has format validators for IMDb, TMDb, AudioDb and MusicBrainz only. TryGetIntProviderId forwards such a value because NumberStyles.Integer allows a leading sign, so "-1" parses happily. The API then rejects the whole batch and names only the first offending index, so one item costs every lookup in it. Returning null instead drops the field from the request body, because the lookup models use int? and SkipMeApiClient sets JsonIgnoreCondition.WhenWritingNull. No lookup is lost by this: shows are only abandoned when tvdb_series_id, tmdb_id, imdb_series_id AND anilist_id are all null (TryBuildShowLookup), and on the library this was measured against, all 81 affected series carried a Tvdb, Tmdb or Imdb id as well.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Reviewed by gpt-5.6-luna · Input: 36 · Output: 4.9K · Cached: 250.4K |
|
Two follow-ups, both about the The response body is bare. Every There is a proxy in front of the API. From the thread on #32, a direct request came back This matters a little beyond the log wording, because On process: I saw how #32 ended — "the API is being updated to provide a better Either way, thanks for the service — and #33 is noted: if a library of this size is simply |
A negative placeholder is an established convention in Jellyfin libraries for "do not match this item": the anime providers only search by name when the stored id is empty (AniDbSeriesProvider, AniListSeriesProvider), so writing a deliberately invalid id suppresses a wrong match. Jellyfin stores provider ids as strings and does not validate them as numbers - ProviderIdsExtensions has format validators for IMDb, TMDb, AudioDb and MusicBrainz only.
TryGetIntProviderId forwards such a value because NumberStyles.Integer allows a leading sign, so "-1" parses happily. The API then rejects the whole batch and names only the first offending index, so one item costs every lookup in it.
Returning null instead drops the field from the request body, because the lookup models use int? and SkipMeApiClient sets
JsonIgnoreCondition.WhenWritingNull. No lookup is lost by this: shows are only abandoned when tvdb_series_id, tmdb_id, imdb_series_id AND anilist_id are all null (TryBuildShowLookup), and on the library this was measured against, all 81 affected series carried a Tvdb, Tmdb or Imdb id as well.