jellyfin / jellyfin-kodi

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

The hierarchy of TV Shows Seasons/Episodes aren't correct #99

Open drissslim opened 4 years ago

drissslim commented 4 years ago

Describe the bug I've observed this issue since the version 0.2.0 but it still not fixed. In fact I've observed that the hierarchy of TV Shows episodes aren't displayed correctly within Jellyfin Kodi plugin. Some episodes are missing, some seasons are merged or not well structured as expected to be. The TV Shows library is well displayed on the Jellyfin Web GUI. The movies are displayed correctly on both Jellyfin Web and within Jellyfin Kodi plugin.
In addition, before I was using Kodi without Jellyfin and all TV Shows was well organized like the TV Shows displayed in the Jellyfin Web.

To Reproduce Try to have a consequent volume with different seasons and episodes. Let say around 20 TV Shows and seasons.

Expected behavior The TV Shows should be well structured.

System (please complete the following information):

Additional context In addition, before I was using Kodi without Jellyfin and all TV Shows was well organized like the TV Shows displayed in the Jellyfin Web.

mcarlton00 commented 4 years ago

Do you have a screenshot or something to demonstrate this behavior? I can't say that I've seen it on my systems

drissslim commented 4 years ago

Hi, Please find here a video link to explain the issue and the observed difference between TV Shows with Jellyfin Kodi plugin on Android TV and the TV Shows on the Web UI

https://youtu.be/ybg6OGsuc20

Thx

TrueTechy commented 4 years ago

That is really strange, I've never seen it happen on any of the test installs I've done. Could you reset the addon by going into the addon settings, and clicking "perform local database reset" and upon kodi restarting perform the connect and sync to jellyfin as normal. Then upload the kodi log after the sync has completed

drissslim commented 4 years ago

kodi.old.log.zip I'm still getting the same issue with the version 0.3.4.

mcarlton00 commented 4 years ago

What is your file structure like in your library? Are these shows that are in one overarching folder?

* ShowName
  * Season01
    * Episode1
    * Episode2
  * Season02
    * Episode1
    * Episode2

Or are they split up in some way?

* ShowName
  * Season01
    * Episode1
    * Episode2
* showname
  * Season02
    * Episode1
    * Episode2
drissslim commented 4 years ago

I'm using the structure like this :

* ShowName
  * Season01
    * Episode1
    * Episode2
  * Season02
    * Episode1
    * Episode2
mcarlton00 commented 4 years ago

I may have just stumbled upon the cause of this while investigating a different issue. @drissslim, does your TV shows library have an apostrophe in it's name? Something like drissslim's Shows, for example?

drissslim commented 4 years ago

Below the structure of one TV Show. I didn't see any files containing ' character in the different paths : https://paste.kodi.tv/duwavesaka

TrueTechy commented 4 years ago

I believe mcarlton meant your library names within jellyfin, so whatever you called them when setting up your libraries

drissslim commented 4 years ago

Yes there is some episodes that the name contains apostrophe. Below an example :

image

TrueTechy commented 4 years ago

Screenshot from 2019-10-29 18-59-36 We mean the library names as shown in the server dashboard

drissslim commented 4 years ago

The name of TV Shows library is "Séries TV"

truenicoco commented 4 years ago

Similar here with Debian Stable (buster), kodi 5:18.5-dmo0+deb10u1 from debian-multimedia, jellyfin 10.4.3-1 from the official repo, and jellyfin-kodi 0.3.6 from the official repo as well. I would be glad to help debugging this, let me know if I can.

Example with South Park. The TV show is listed twice in kodi views, under the same name, despite appearing correctly under the jellyfin web interface and android app. Under the hood, it is spread across 3 filesystems, one of them being a NFS mount. I believe it is this last location that creates the problem somehow. For this location, one episode even appears twice. The NFS share has no permission problem, it is readable and writeable by the jellyfin user. UID and GID do not match between machines though. I don't think this could cause the issue.

Some screenshots

The incriminated files, with some details:

$ ll /mnt/hdd1/Séries/South\ Park/Season\ 23/ -a
total 330M
drwxrwxrwx 2 nicoco   nicoco   4,0K déc.  11 16:45  ./
drwxrwxrwx 8 nicoco   nicoco   4,0K sept. 26 05:24  ../
-rw-rw-rw- 1 nicoco   nicoco   330M sept. 26 05:23 'South.Park.S23E01.720p.HDTV.x264-AVS[rarbg].mkv'
-rw-r--r-- 1 jellyfin jellyfin 1,9K déc.  11 16:45 'South.Park.S23E01.720p.HDTV.x264-AVS[rarbg].nfo'

$ ll /mnt/hdd3/Séries/South\ Park/Season\ 23/ -a
total 1,9G
drwxrwxrwx 2 nicoco   nicoco   4,0K déc.  10 16:33  ./
drwxrwxrwx 3 nicoco   nicoco   4,0K oct.   3 09:43  ../
-rw-r--r-- 1 jellyfin jellyfin  343 déc.  10 16:33  season.nfo
-rw-rw-r-- 1 nicoco   nicoco    40K oct.   3 19:29 'South.Park.S23E02.iNTERNAL.720p.WEB.h264-BAMBOOZLE[rarbg].en.srt'
-rw-rw-rw- 1 nicoco   nicoco   190M oct.   3 09:42 'South.Park.S23E02.iNTERNAL.720p.WEB.h264-BAMBOOZLE[rarbg].mkv'
-rw-rw-rw- 1 nicoco   nicoco   2,0K déc.  11 17:13 'South.Park.S23E02.iNTERNAL.720p.WEB.h264-BAMBOOZLE[rarbg].nfo'
-rw-rw-rw- 1 nicoco   nicoco    99K oct.   3 21:38 'South.Park.S23E02.iNTERNAL.720p.WEB.h264-BAMBOOZLE[rarbg]-thumb.jpg'
-rw-rw-rw- 1 nicoco   nicoco   222M oct.  10 20:18 'South.Park.S23E03.SHOTS.720p.HULU.WEBRip.AAC2.0.H264-monkee[rarbg].mkv'
-rw-rw-rw- 1 nicoco   nicoco   2,0K déc.  11 17:13 'South.Park.S23E03.SHOTS.720p.HULU.WEBRip.AAC2.0.H264-monkee[rarbg].nfo'
-rw-rw-rw- 1 nicoco   nicoco   101K oct.  11 20:11 'South.Park.S23E03.SHOTS.720p.HULU.WEBRip.AAC2.0.H264-monkee[rarbg]-thumb.jpg'
-rw-rw-r-- 1 nicoco   nicoco    45K oct.  19 00:06 'South.Park.S23E04.720p.HDTV.x264-AVS[rarbg].en.srt'
-rw-rw-rw- 1 nicoco   nicoco   290M oct.  17 04:55 'South.Park.S23E04.720p.HDTV.x264-AVS[rarbg].mkv'
-rw-rw-rw- 1 nicoco   nicoco   1,9K déc.  11 17:13 'South.Park.S23E04.720p.HDTV.x264-AVS[rarbg].nfo'
-rw-rw-rw- 1 nicoco   nicoco    98K oct.  18 08:19 'South.Park.S23E04.720p.HDTV.x264-AVS[rarbg]-thumb.jpg'
-rw-rw-r-- 1 nicoco   nicoco    36K nov.   9 18:16 'South.Park.S23E05.720p.HDTV.x264-AVS[rarbg].en.srt'
-rw-rw-rw- 1 nicoco   nicoco   299M oct.  31 03:54 'South.Park.S23E05.720p.HDTV.x264-AVS[rarbg].mkv'
-rw-rw-rw- 1 nicoco   nicoco   2,0K déc.  11 17:13 'South.Park.S23E05.720p.HDTV.x264-AVS[rarbg].nfo'
-rw-rw-rw- 1 nicoco   nicoco   103K oct.  31 03:54 'South.Park.S23E05.720p.HDTV.x264-AVS[rarbg]-thumb.jpg'
-rw-rw-r-- 1 nicoco   nicoco    36K nov.   9 20:04 'South.Park.S23E06.720p.HDTV.x264-AVS[rarbg].en.srt'
-rw-rw-rw- 1 nicoco   nicoco   285M nov.   7 04:53 'South.Park.S23E06.720p.HDTV.x264-AVS[rarbg].mkv'
-rw-rw-rw- 1 nicoco   nicoco   2,1K déc.  11 17:13 'South.Park.S23E06.720p.HDTV.x264-AVS[rarbg].nfo'
-rw-rw-rw- 1 nicoco   nicoco    94K nov.   7 04:54 'South.Park.S23E06.720p.HDTV.x264-AVS[rarbg]-thumb.jpg'
-rw-rw-r-- 1 nicoco   nicoco    48K nov.  16 09:43 'South.Park.S23E07.720p.HDTV.x264-AVS[rarbg].en.srt'
-rw-rw-rw- 1 nicoco   nicoco   325M nov.  14 04:46 'South.Park.S23E07.720p.HDTV.x264-AVS[rarbg].mkv'
-rw-rw-rw- 1 nicoco   nicoco   2,1K déc.  11 17:13 'South.Park.S23E07.720p.HDTV.x264-AVS[rarbg].nfo'
-rw-rw-rw- 1 nicoco   nicoco   209K nov.  19 08:03 'South.Park.S23E07.720p.HDTV.x264-AVS[rarbg]-thumb.jpg'
-rwxr--r-- 1 nobody   nogroup   36K déc.   1 14:16 'South.Park.S23E08.720p.HDTV.x264-AVS[rarbg].en.srt'*
-rw-rw-rw- 1 nicoco   nicoco   305M nov.  28 04:49 'South.Park.S23E08.720p.HDTV.x264-AVS[rarbg].mkv'
-rw-rw-rw- 1 nicoco   nicoco   2,0K déc.  11 17:13 'South.Park.S23E08.720p.HDTV.x264-AVS[rarbg].nfo'
-rw-rw-rw- 1 nicoco   nicoco   178K nov.  29 08:21 'South.Park.S23E08.720p.HDTV.x264-AVS[rarbg]-thumb.jpg'

$ ll /mnt/nicoshiba/Séries/South\ Park/Season\ 23/ -a # The NFS mount
total 667M
drwxrwxrwx 2 systemd-coredump    997 4,0K déc.  12 04:55  ./
drwxrwxrwx 3 systemd-coredump    997 4,0K déc.   5 04:56  ../
-rw-rw-rw- 1              133    142  343 déc.  12 07:52  season.nfo
-rw-rw-rw- 1 nicoco           nicoco  31K déc.   7 16:43 'South.Park.S23E09.720p.HDTV.x264-AVS[rarbg].en.srt'
-rw-rw-rw- 1 nicoco           nicoco 310M déc.   5 04:56 'South.Park.S23E09.720p.HDTV.x264-AVS[rarbg].mkv'
-rw-rw-rw- 1 systemd-coredump    997 2,1K déc.  11 16:45 'South.Park.S23E09.720p.HDTV.x264-AVS[rarbg].nfo'
-rw-rw-rw- 1 systemd-coredump    997 184K déc.   5 04:56 'South.Park.S23E09.720p.HDTV.x264-AVS[rarbg]-thumb.jpg'
-rw-rw-rw- 1 nicoco           nicoco 356M déc.  12 04:55 'South.Park.S23E10.720p.HDTV.x264-AVS[rarbg].mkv'
-rw-rw-rw- 1 systemd-coredump    997 1,8K déc.  12 07:52 'South.Park.S23E10.720p.HDTV.x264-AVS[rarbg].nfo'
-rw-rw-rw- 1 systemd-coredump    997 266K déc.  12 04:55 'South.Park.S23E10.720p.HDTV.x264-AVS[rarbg]-thumb.jpg'

Let me know if I can help more!

Edit: BTW my library is also named "Séries TV", yet I don't know think it is related.

truenicoco commented 4 years ago

FWIW, I just tried moving the South Park episodes from the NFS mount to the local drive, and it solved the issues for this TV show in kodi views: no more duplicate episode or show. I forgot to mention it above, but this is really kodi specific: in jellyfin web interfaces, no episode or TV show appeared in double. I wonder if I should use something else than NFS for the network mount.

EDIT: I tried to switch to sambas (CIFS mount). I removed the NFS mount, added the samba mount to jellyfin, refreshed the library and it did not change a single thing, so I guess NFS is not to blame here.

mcarlton00 commented 4 years ago

Just as an update, I've narrowed this down to when you have the same show on 2 different media folders attached to the same Library in Jellyfin. ie:

Shows:
  Folder1:
    ShowName
  Folder2:
    ShowName

Because they're in different folders, Jellyfin is assigning a different ID to each piece of the show. This is causing issues here because in the Kodi database everything is related to that Jellyfin ID.

Unfortunately, I don't have a good method for how to work around that yet. Short term solution is to make sure a show is complete in one folder instead of spread across multiple folders/drives in a single library.

truenicoco commented 4 years ago

FWIW, whenever this happens to me (same TV show on 2 different locations, appearing twice in Kodi but not in jellyfin-web), I just reset kodi-jellyfin database and they are merged on the next sync.