jellyfin / jellyfin-kodi

Jellyfin Plugin for Kodi
https://jellyfin.org
GNU General Public License v3.0
849 stars 113 forks source link

Actor information and thumbnails not displayed on video Information Pages for Jellyfin library #539

Closed kjemmett closed 7 months ago

kjemmett commented 3 years ago

Describe the bug Actor information (names and thumbnails) not displayed on Information Page for files in the Jellyfin library.

To Reproduce

  1. Open the Information Page for a video in the Jellyfin library

Expected behavior The Information Page for a video should include actor information and thumbnails and the ability to browse by actor

Logs No immediately relevant errors but happy to provide as necessary

Screenshots "Cast Not Available" image

Actor data is syncing into the library: image

System

Additional context I am reasonably confident I have narrowed the problem down to jellyfin-kodi:

  1. The Jellyfin web interface correctly displays actor information and thumbnails
  2. Files that are added to the Kodi library directly (and scraped using either TMDB or TMDB-python addons) correctly display actor information and thumbnails. Two additional observations: i) when the same file is present in the Jellyfin library and the Kodi library (manually added), the Jellyfin entry will then include the actor thumbnails scraped by Kodi, and ii) selecting an actor will bring up their films in the library, and those information pages will populate with actor thumbnails, even if in the Jellyfin library. However, accessing Information page directly will not show the actor thumbnails
  3. The Actor view of the library is correctly populated and can be browsed (see above screenshot)
  4. The issue persists across all skins

Other context:

Many thanks for the excellent work in developing this package! Having recently migrated from a pure Kodi setup I have been impressed.

mcarlton00 commented 3 years ago

This is a known issue. I thought there was another bug report for it, but I can't seem to find it right now. I've spent many hours comparing the databases between a vanilla kodi and a database using JF4K and I haven't found where the issue lies yet. Something just seems to not be getting linked correctly, but I have no idea where at this point.

kjemmett commented 3 years ago

Thanks! Probably thinking of Issue #227.

I toyed with the database and found I could resolve the issue by tweaking the strPath column in the path table. JF4K is writing paths to nfs mounts as nfs://server:/path/to/file/. Kodi writes these paths without the colon separator, as nfs://server/path/to/file/. When I remove the colon in the JF4K entry, matching Kodi's syntax, the cast appears correctly in the information panel, and the file plays correctly. Per Kodi (filesystem/NFSDirectory.cpp) this appears to be the preferred way of specifying paths. No edits to the artist_link table are required.

This works for TV shows, provided I also populate the strContent field to tvshows in the path table.

What I don't understand is why getting the cast information needs to invoke anything in the path table. The getCast method in VideoDatabase.cpp has a straightforward query to the actor_link and actor tables, so it is coming from somewhere else.

An update to the get_file_path method should be sufficient. If you agree I am happy to draft and submit a pull request.

mcarlton00 commented 3 years ago

Good detective work. Going through Kodi's code is the way I wanted to look into this, but we'll just say that C languages aren't my strong point and it didn't go well. And these databases definitely weren't meant to be monkeyed with like we're doing.

This also brings up another interesting distinction that I hadn't thought of. This solution you've found only works in Native mode (which none of us use and didn't realize it was broken for everything there). Addon mode writes the paths differently (as might be expected). Also, in Addon mode movies work correctly right now, but tv shows do not. For example, my test install right now with only a single tv show synced.

sqlite> select * from path;
1|plugin://plugin.video.jellyfin/6d1fd2cbea75323657e87c8315b4bb9c/|tvshows|metadata.local|||||1||||
2|plugin://plugin.video.jellyfin/6d1fd2cbea75323657e87c8315b4bb9c/91e74cd2767a07e878f8fbdae7caf407/|||||||1|||1|
3|plugin://plugin.video.jellyfin/91e74cd2767a07e878f8fbdae7caf407/|||||||1|||1|

Either way, a partial fix is better than no fix, so feel free to open a PR and maybe it'll lead us to a solution in addon mode as well.

gitdeath commented 2 years ago

Was this fixed in the code base with the below already? I'm trying to figure out if this is my problem or if I have something different going on.

Thanks! Probably thinking of Issue #227.

I toyed with the database and found I could resolve the issue by tweaking the strPath column in the path table. JF4K is writing paths to nfs mounts as nfs://server:/path/to/file/. Kodi writes these paths without the colon separator, as nfs://server/path/to/file/. When I remove the colon in the JF4K entry, matching Kodi's syntax, the cast appears correctly in the information panel, and the file plays correctly. Per Kodi (filesystem/NFSDirectory.cpp) this appears to be the preferred way of specifying paths. No edits to the artist_link table are required.

This works for TV shows, provided I also populate the strContent field to tvshows in the path table.

What I don't understand is why getting the cast information needs to invoke anything in the path table. The getCast method in VideoDatabase.cpp has a straightforward query to the actor_link and actor tables, so it is coming from somewhere else.

An update to the get_file_path method should be sufficient. If you agree I am happy to draft and submit a pull request.

mcarlton00 commented 2 years ago

We haven't had any changes to the database to address this. I can't say if anything has changed upstream in relation to it, but I would suspect not.

Paelsmoessan commented 2 years ago

Any news on this issue?

GregoireDruant commented 1 year ago

Hi,

I have looked into this as I am also bothered by this issue, and following the track of kjemmett, I have compared native kodi scrapped folders and jellyfin scrapped one, looking at the "path" table.

To make the cast information available, I had to:

  1. Set "strContent" as tvshow for the main folder (can be done in kodi UI by editing the media source when in native mode)
  2. Set the appropriate value of "idParentPath" of each child entry of the main folder

=> Then it works, cast information is available.

I will also have a look at the jellyfin add-on mode, but I think the solution will be similar.

ShadwDrgn commented 1 year ago

I'm on addon mode and for TV Shows I also do not get cast info (at least in my skin which is aeon nox). Hoping to see a fix for this at some point. Movies do seem to show cast though.

GregoireDruant commented 1 year ago

I pushed a PR fixing this for both native mode and add-on mode: https://github.com/jellyfin/jellyfin-kodi/pull/731

GregoireDruant commented 10 months ago

Hi, Just upping this issue. It has the Native Mode label which I think is incorrect, as the issue also exists in Addon Mode. And as I understand the you in the team project do not use native mode, this cannot help.

aradhir commented 6 months ago

Sorry to open up this conversation again. I Uwe Jellyfin for Kodi 1.0.2, Kodi Omega, Jellyfin Server 10.8.13 (linuxserver Docker Image run on Synology Container Manager). Cast is properly shown in AddOn Mode, but not in native mode. Switched back and forth several times with database reset, but cannot get it working in native Mode.