Jellyfin Forum
Android TV (Shield) client bugs when playing movies that have multiple versions - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Android TV (Shield) client bugs when playing movies that have multiple versions (/t-android-tv-shield-client-bugs-when-playing-movies-that-have-multiple-versions)



Android TV (Shield) client bugs when playing movies that have multiple versions - dinosm - 2024-09-24

I am on 0.17.5 on an Nvidia Shield Pro.

Since the last app update, there have appeared two bugs when using movies that have multiple versions.

Bug 1:
I follow Jellyfin's recommended naming standards - if I have a movie both in 1080p and 2160p, there are two files inside the same folder, with the version names after a dash in each filename. This works perfectly in that Jellyfin recognises them correctly and shows them as one movie with two versions to choose from.

For whatever reason, Jellyfin always chooses the 2160p version as a default; that is, when I tap/click on a movie, it shows me the 2160p version pre-selected. This happens both on the Web and on Android TV.

However, on the Android TV client, if I hit play straight away (with the 4K version seemingly selected by default, but not by me), it plays the 1080p version. This is confirmed in many ways: resolution reported by the TV, visible quality, audio is that of the 1080p version, jellystat shows it's playing the 1080p file and if I look at the cache I can see the 1080p file only being cached. So, the movie details screen shows the 4K version, but the 1080p version plays.

If I go into Versions and select the 2160p version (even though that's being shown on the movie details screen), the screen does a kind-of scroll animation thingy, and again, it shows the 4K version is selected. But this time, if I hit play, the 2160p version plays.
So, when I open a movie details screen, even though it shows 4K, I have to go and select it, in order to actually play the 4K version, which I assume is not intended behaviour.

Jellyfin web works fine in that regard - it shows the 4K pre-selected, and pressing play plays the 4K version.

Bug 2:
Sometimes, but not always, when I exit a movie (that has multiple versions) while it's playing, I will see two or three instances of it on the 'continue watching' section. One will be the 1080p version and one will be the 4K version. There may be a third one, which may be either one of the two again. This most certainly did not happen before the app's last update, however I have noticed when it happens on Android TV, it also happens on the Web too.

I am not sure if logs would help in this situation, however I am happy to provide them if they would.
Here is a photo of what I mean regarding bug 2:
https://postimg.cc/MXHmk5JX


RE: Android TV (Shield) client bugs when playing movies that have multiple versions - theguymadmax - 2024-09-24

Please post folder your and file naming structure.


RE: Android TV (Shield) client bugs when playing movies that have multiple versions - dinosm - 2024-09-24

Here is the folder that contains Jurassic Park (attached).


RE: Android TV (Shield) client bugs when playing movies that have multiple versions - TheDreadPirate - 2024-09-24

The version sorting is client side, IIRC, so it isn't surprising that the ATV client would sort it differently.

I will have to test "bug 2" when I get home.

Do you use the Trakt plugin? Or save watch statuses to NFOs?


RE: Android TV (Shield) client bugs when playing movies that have multiple versions - theguymadmax - 2024-09-24

If the filename includes resolution information after the dash, the files will be sorted from highest to lowest resolution. If there’s no resolution specified, they’ll be sorted alphabetically. This is the intended behavior, but a few bugs were just fixed, so it should work correctly in the next release. For now, however, files will be sorted by resolution, from highest to lowest, regardless of how they are named.

1st bug might just be Android TV issue.  - I actually don't have this issue
2nd one is a bug that has be well documented. - This issue occurs for me when I have two movies that aren’t configured as multiple versions, meaning they’re in different folders or without the dash in filename. I’ve also encountered it with multiple versions in the past, but I was able to fix it by making some edits to the database.

There's a bug with the server that fails to delete alternative versions from the database when they are renamed or removed. I believe the two other bugs are side effects of this issue.

Aside from a fresh install, the only way I’ve resolved issues with multiple versions is by editing the database to remove "ghost" entries. If you’d like to give it a try, here are the steps:
  1. Download SQLite Browser
  2. Shut down the server.
  3. Open library.db (always back up first!). Locations vary:
    • /var/lib/jellyfin/data/library.db
    • X:\ProgramData\Jellyfin\Server\data\library.db
    • X:\Users\Username\AppData\Local\jellyfin\data\library.db
  4. Choose the “Browse Data” tab and select “TypedBaseItems.”
  5. Filter for the movie title in “Filter in any column”; you can refine it using the “Path” field.
  6. Find the old entries of type “MediaBrowser.Controller.Entities.Video,” right-click, and delete the record.
  7. Click “Write Changes,” close the database, and restart the server.
For your example, you should only have two entries for JP: one for "MediaBrowser.Controller.Entities.Movie.Movie" and one for "MediaBrowser.Controller.Entities.Video". Keeps those and delete the rest.

   


RE: Android TV (Shield) client bugs when playing movies that have multiple versions - dinosm - 2024-09-24

(2024-09-24, 05:58 PM)TheDreadPirate Wrote: The version sorting is client side, IIRC, so it isn't surprising that the ATV client would sort it differently.

Hmm I thought version sorting is server side, as using the Merge Versions plugin for episodes runs (as far as I understand it) a process on the server to merge episodes, so I assumed it was the same for movies but natively.


(2024-09-24, 05:58 PM)TheDreadPirate Wrote: I will have to test "bug 2" when I get home.

Do you use the Trakt plugin?  Or save watch statuses to NFOs?

No trakt, but some folders have NFOs from when I was using them. I then changed to not using them but NFOs already created stayed in those folders.
I deleted the nfo from the Jurassic Park folder, restarted the server, marked the movie as unwatched and played it again. The issue reappeared (three instances of the movie in continue watching).


RE: Android TV (Shield) client bugs when playing movies that have multiple versions - dinosm - 2024-09-25

(2024-09-24, 06:45 PM)theguymadmax Wrote: 1st bug might just be Android TV issue.  - I actually don't have this issue

Thanks for letting me know!
In the issue comments some say it has been fixed, and then you say you don't have it, however I have the latest beta and still experience it, so it seems it's still present (it is the exact issue described in your link).

(2024-09-24, 06:45 PM)theguymadmax Wrote: 2nd one is a bug that has be well documented. - This issue occurs for me when I have two movies that aren’t configured as multiple versions, meaning they’re in different folders or without the dash in filename. I’ve also encountered it with multiple versions in the past, but I was able to fix it by making some edits to the database.

Thanks for the detailed explanation. I made the changes to the DB as you described but the issue still occurs (triplicate movie shows in Continue Watching after stopping), even after logoff/on and restarting the server. There were indeed old records of this movie pointing to folders that don't even exist any more.


RE: Android TV (Shield) client bugs when playing movies that have multiple versions - theguymadmax - 2024-09-25

(2024-09-25, 12:10 AM)dinosm Wrote: the issue still occurs (triplicate movie shows in Continue Watching after stopping)

I can’t replicate the issue with my current setup, but I have encountered the continue watching bug before. I’ve never seen it appear three times like that, though. I might have resolved it with a fresh install, I can’t remember. Even when continue watching shows just one version on the home screen, there’s another bug where it always plays back the first movie from the multiple versions, regardless of which one you were watching.