Aanok / jftui

Jellyfin Terminal User Interface
The Unlicense
142 stars 7 forks source link

Some TV show episodes do not appear anywhere in the program #25

Closed fullmetal1 closed 2 years ago

fullmetal1 commented 2 years ago

jftui version jftui 0.5.1, libmpv 1.109, libcurl 7.82.0 OpenSSL/1.1.1n, yajl 20100 Jellyfin.Server 10.7.7.0

Describe the bug All episodes of some series that I have recently added to jellyfin do not show up anywhere I check in jftui. I believe that all new series and episodes are affected but I don't have enough content to test this exhaustively. This includes inside the 'Next Up', 'Latest Added', and 'TV Show' sections of the library. For example, if I watch episode 1 of a TV show, and I open up jellyfin webui, I can see episode 2 in the 'Next Up' section on the home page, but when I open up jftui, no episode for that series is listed. If I navigate to that episode in the 'TV Show' section in jftui, I can see the series, and all seasons therein, but each season will have no results. All episodes appear as normal in the webui. If a new episode of one of the affected series is added to jellyfin, jftui will not show it in the 'Latest Added' section. This appears to affect newly added episodes and shows only. Older content that worked in the past (a few months ago at least) will show up as normal. Movies and music seem unaffected.

To Reproduce Add a new episode to your jellyfin server and then check for its addition inside jftui

Expected behavior New episodes should appear at the correct locations.

SIGSEGV backtracke N/A

Aanok commented 2 years ago

Well, nothing changed with jftui (in a long while... sigh) and you're still on 10.7 so I'd tend to rule out a real bug or incompatibility with the server.

What I'm thinking is that jftui will not show video items when it hasn't received the RunTimeTicks (length in time) property for them from the server. This is because otherwise it's impossible to support split files; the web client doesn't care and in fact it doesn't manage split files at all. Normally this case only comes up when you browse a library while the server is still processing some files you just added to it. I'm assuming that's not the case or the problem would have gone away in a short while.

There could be something odd about the new files you're adding that's making the server unable to compute the RTT property.

Quickest way to check is this:

Otherwise you could copy or move some old files that work to a new folder and then create a new library with them. If I'm right everything should be fine with those.

If this is indeed the problem I'm afraid I don't have a real solution, your files have something wrong with them that Jellyfin doesn't like. The best I could do would be to see if I could restrict the RTT requirement only to items actually backed by split-files.

fullmetal1 commented 2 years ago

Alright, thanks. I saw that the media info for new episodes was not displayed. Inside the log file there were errors such as the following

System.Text.Json.JsonException: The JSON value could not be converted to System.Int32. Path: $.chapters[0].id | LineNumber: 860 | BytePositionInLine: 38.
 ---> System.FormatException: Either the JSON value is not in a supported format, or is out of bounds for an Int32.
   at System.Text.Json.Utf8JsonReader.GetInt32()
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.Converters.IEnumerableDefaultConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   --- End of inner exception stack trace ---
   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, Utf8JsonReader& reader, Exception ex)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase)
   at System.Text.Json.JsonSerializer.ReadAsync[TValue](Stream utf8Json, Type returnType, JsonSerializerOptions options, CancellationToken cancellationToken)
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.GetMediaInfoInternal(String inputPath, String primaryPath, MediaProtocol protocol, Boolean extractChapters, String probeSizeArgument, Boolean isAudio, Nullable`1 videoType, Boolean forceEnableLogging, CancellationToken cancellationToken)
   at MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo.ProbeVideo[T](T item, MetadataRefreshOptions options, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.RunCustomProvider(ICustomMetadataProvider`1 provider, TItemType item, String logName, MetadataRefreshOptions options, RefreshResult refreshResult, CancellationToken cancellationToken)

I checked the jellyfin issue tracker and found this, and this. I updated to the jellyfin 10.8 beta and searched for missing metadata in a series that I was having issues with and now the next episode appears on jftui

tl;dr: there's a bug between jellyfin 10.7 and ffprobe 5.0which causes media info to be blank. jellyfin 10.8 beta has a bugfix already.

Thanks for pointing me in the right direction.

Aanok commented 2 years ago

All right! Glad I could help :)

If you don't mind while we're at it: have you noticed anything broken or odd with jftui and 10.8? I haven't tested it yet.

fullmetal1 commented 2 years ago

I didn't test extensively, before reverting back to the production version, but I didn't notice any issues. When 10.8 goes to production I'll be sure to open new bug reports if I see anything :^)

Aanok commented 2 years ago

Fair! :smile: