Repository navigation
Conversation
Some providers send the programme `id` in get_simple_data_table as a non-numeric string (e.g. hex "6ae0d9df220c7"). Deserializing that into an int property throws, so the whole listing for the channel fails and neither the guide nor catch-up get any programmes. Keep the JSON id as a string (`RawId`) and derive the int `Id` used for GUIDs from it: the numeric value when it parses as an int, otherwise an FNV-1a hash of the text, or of the start timestamp when no id is sent. Numeric ids keep their existing value, so existing GUIDs are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
EpgInfo.Idis anintbound straight to theidfield ofget_simple_data_table. Some Xtream providers send that field as a non-numeric string, for example a hex id like"6ae0d9df220c7". Newtonsoft can't convert that to anint, and the property isn't nullable, soNullableEventHandlerdoesn't ignore the error. Deserializing the listing throws, and that channel gets no programmes in the Live TV guide (LiveTvService.GetProgramsAsync) or in catch-up (CatchupChannel).Fix
idis now kept as a string in a newRawIdproperty.Idstays anint, now a[JsonIgnore]computed property, soStreamService.ToGuid(...)callers are unchanged. It returns:RawIdparses as anint, so existing numeric ids, and the GUIDs built from them, stay the same;string.GetHashCode(), and it keeps distinct programmes on distinct GUIDs;Start.Ticks.This is the only change. It touches one file,
Jellyfin.Xtream/Client/Models/EpgInfo.cs.As a side effect, numeric EPG ids above
int.MaxValueno longer throw either. They get hashed instead. This only covers EPG programme ids, so it does not fix the category/stream id overflow in #268.Testing
dotnet build -c Releasesucceeds with 0 warnings and 0 errors (net9.0, Jellyfin 10.11.0 packages)."6ae0d9df220c7"and"6ae0d9df220c8"deserialize, and each gives a different id that is the same on every call."12345"(string) and12345(number) both give12345.idfalls back to a hash of the start timestamp."2356443347"(above int32) deserializes instead of throwing.Related
int), but for category/stream ids. This PR doesn't fix that one.EpgInfodeserialization failures. They come from thestartfield, notid, so this PR doesn't address them.🤖 Generated with Claude Code