jellyfin / jellyfin-web

Web Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.37k stars 1.26k forks source link

Unwatched episode counters revert to old behavior when navigating back a page. #6040

Open maru801 opened 1 month ago

maru801 commented 1 month ago

Describe The Bug

The unwatched episode count currently has a bug where it reverts to displaying counts above 99 on the web UI.

Since v10.9 first released, the behavior of the unwatched episode counter caps out at 99, so if 100 or more episodes are unwatched in a show, the counter displays "99+". However, this bug allows for the counter to revert to the old behavior of showing the actual count.

Example: 125 unwatched episodes leads to "125" being in the counter instead of "99+".

Steps To Reproduce

Note: It's easier to reproduce this behavior when the show is on the home page of your server (recently added)

  1. Make sure to have at least one show that has 100 or more episodes & mark them all as unwatched.
  2. Navigate to a page on the web UI that has one of those 100+ episode shows.
  3. Click the show to open it.
  4. Now navigate back to the previous page (either use the browser's back button or the built-in back arrow).
  5. You'll now see that the episode counter gets "unlocked" and shows the true unwatched episode count.

It's also possible to replicate this bug by using the built-in home button (when using it after opening a 100+ episode show on the home screen), but it seems to be a bit delayed in occurring when it does happen.

Refreshing the page, or navigating the server resets this behavior.

I did notice when using my browser's dev tools that the episode counter gets "unlocked" right when I open the show, and not when I go back to the previous page.

Expected Behavior

The unwatched episode counter should remain consistent with either:

  1. Always respecting the max cap of 99
  2. Revert to the old behavior of showing the actual count

Logs

When I reproduce this bug, not much in the logs other than this (because of theme songs that I have enabled):

[2024-09-08 13:03:06.608] [INF] [64] Jellyfin.Api.Controllers.UniversalAudioController: GetPostedPlaybackInfo profile: DeviceProfile { Name: null, Id: null, MaxStreamingBitrate: 8000000, MaxStaticBitrate: 8000000, MusicStreamingTranscodingBitrate: 128000, MaxStaticMusicBitrate: 8000000, DirectPlayProfiles: [DirectPlayProfile { Container: "opus", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "webm", AudioCodec: "opus", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "mp3", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "aac", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "m4a", AudioCodec: "aac", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "m4b", AudioCodec: "aac", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "flac", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "webma", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "webm", AudioCodec: "webma", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "wav", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "ogg", AudioCodec: null, VideoCodec: null, Type: Audio }], TranscodingProfiles: [TranscodingProfile { Container: "mp4", Type: Audio, VideoCodec: "", AudioCodec: "aac", Protocol: hls, EstimateContentLength: False, EnableMpegtsM2TsMode: False, TranscodeSeekInfo: Auto, CopyTimestamps: False, Context: Streaming, EnableSubtitlesInManifest: False, MaxAudioChannels: null, MinSegments: 0, SegmentLength: 0, BreakOnNonKeyFrames: False, Conditions: [] }], ContainerProfiles: [], CodecProfiles: [], SubtitleProfiles: [] }
[2024-09-08 13:03:06.609] [INF] [64] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "Admin". EnableAudioPlaybackTranscoding: True
[2024-09-08 13:03:06.675] [INF] [74] Jellyfin.Api.Controllers.UniversalAudioController: GetPostedPlaybackInfo profile: DeviceProfile { Name: null, Id: null, MaxStreamingBitrate: 8000000, MaxStaticBitrate: 8000000, MusicStreamingTranscodingBitrate: 128000, MaxStaticMusicBitrate: 8000000, DirectPlayProfiles: [DirectPlayProfile { Container: "opus", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "webm", AudioCodec: "opus", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "mp3", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "aac", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "m4a", AudioCodec: "aac", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "m4b", AudioCodec: "aac", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "flac", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "webma", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "webm", AudioCodec: "webma", VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "wav", AudioCodec: null, VideoCodec: null, Type: Audio }, DirectPlayProfile { Container: "ogg", AudioCodec: null, VideoCodec: null, Type: Audio }], TranscodingProfiles: [TranscodingProfile { Container: "mp4", Type: Audio, VideoCodec: "", AudioCodec: "aac", Protocol: hls, EstimateContentLength: False, EnableMpegtsM2TsMode: False, TranscodeSeekInfo: Auto, CopyTimestamps: False, Context: Streaming, EnableSubtitlesInManifest: False, MaxAudioChannels: null, MinSegments: 0, SegmentLength: 0, BreakOnNonKeyFrames: False, Conditions: [] }], ContainerProfiles: [], CodecProfiles: [], SubtitleProfiles: [] }
[2024-09-08 13:03:06.677] [INF] [74] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "Admin". EnableAudioPlaybackTranscoding: True
[2024-09-08 13:03:09.022] [INF] [64] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Jellyfin Web" "10.9.11" playing "theme song". Stopped at "1295" ms

Screenshots

Freshly loaded page: https://i.imgur.com/gzYuiCu.jpeg After opening and navigating back to the previous page: https://i.imgur.com/BwyM33y.jpeg

System (please complete the following information):

Additional Context

  1. I'm able to replicate this on Jellyfin Media Player.
  2. Both my main and test server are able to replicate this.
  3. Both my servers are using the official Jellyfin image from ghcr.io
viown commented 1 month ago

I'm unable to reproduce this issue neither in the homepage or the shows list.

maru801 commented 1 month ago

I also chatted with someone attempting to replicate the issue and they couldn't either.

It does happen on both my servers though.

viown commented 1 month ago

I also chatted with someone attempting to replicate the issue and they couldn't either.

It does happen on both my servers though.

Are you using any custom stylesheets or web overrides?

maru801 commented 1 month ago

I also chatted with someone attempting to replicate the issue and they couldn't either.

It does happen on both my servers though.

Are you using any custom stylesheets or web overrides?

I have custom CSS which I completely removed to test and the behavior remained the same.

Other than that, no. I don't have anything else being done to the server's UI that modifies it.

It's not a major bug, so it's not a big deal if I can't resolve it. And it seems like it's more of an issue on my end since others can't seem to replicate it.