jellyfin / jellyfin-kodi

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

The folder structure of the folder view doesn't work as expected #181

Closed Usucra closed 4 years ago

Usucra commented 4 years ago

Describe the bug The Addons Folder view is showing Everything directly. And I mean EVERYTHING, it is showing a direct list of every folder, every subfolder and every file within those folders and subfolders after entering a Library instead of simply showing the usual layout.

To Reproduce

  1. Go to "Video Addons" and enter the Jellyfin addon
  2. Click on Folders and enter a Library
  3. Now you will see a list of all files, folders and subfolders contained in this Library

Expected behavior Normal file layout, like the web app and Android App.

System:

mcarlton00 commented 4 years ago

What do you define as "Normal file layout"? When I browse through the addon like that I get a similar structure to what appears in the web client. Do you have a screenshot of the issue on your end? I'm not seeing anything out of the ordinary

Usucra commented 4 years ago

My view of a "normal" file listing is the Typical hierarchical folder view of any system I've worked on. You go into a folder and there are other folders/files inside and you only see them after entering the folder. Kodi just puts out a List of all files, folders and subfolders. I've also attached my log files of the Clean Kodi Install.

Kodi Kodi 2 hierarchical list

kodi.log

mcarlton00 commented 4 years ago

What is your file structure like on the disk? And is this a TV Shows library or a Mixed Content library in Jellyfin? My library views match what's in the Web UI, so this is a bit of an outlier. I'm also seeing a lot of errors in your logs that I haven't seen before, so I'm curious what's different about your setup.

feromax commented 4 years ago

Interestingly, I have the same issue with the Jellyfin client on Fire TV (same as Android TV?): A movie library that has a separate folder view enabled simply shows all library contents. This is not an issue for the Jellyfin web client nor the Android client. And when the DLNA server is enabled, VLC and Kodi connecting via upnp are able to see folder views. (But Kodi w/the Jellyfin addon cannot -- which I believe is the issue reported above.

mcarlton00 commented 4 years ago

I wonder if this is related to the storage location found #99

mcarlton00 commented 4 years ago

@Usucra unless I can find some way of reproducing this, we're going to have to close it and move on. I've tried a variety of access methods and haven't been able to make my file list behave like yours.

If you can turn on debug logging in the addon settings (not Kodi) that may also help.

microwax commented 4 years ago

The underlying problem might not be in the Kodi plugin.

I don't have the Kodi plugin, but I experienced exactly the same problem as Usucra described in his initial post. In my case, I was using the web UI with Jellyfin 10.5.5. I tried library types "TV Shows" and "Mixed Content" but it made no difference - Jellyfin insisted on showing a flat view (i.e. everything from all subfolders shown on one page).

I then installed 10.4.3, and the issue mostly went away, but only by enabling "Prefer embedded titles over filenames" and, reluctantly, conducting an exercise to tag all my media files with titles. Nevertheless, Jellyfin still sometimes fails to display items as they are arranged on disk (especially if the filename or title tags contain digits, which it often misinterprets as season numbers).

I haven't looked at the code, but I get the feeling that Jellyfin's underlying approach is to always parse the metadata (title) and media path and try to extrapolate the TV show name, the season, the year of production etc, and then to arrange the library accordingly. But it sometimes gets this wrong, leading to items not being displayed as one expects (or occasionaly not displayed at all).

In my view, what is really needed is an option to say "thank you, Jellyfin, but I'm already quite organised, and for this library I would like you to arrange items with the exact filenames and structure you see on disk. Please don't try to extrapolate this information" - i.e. a "don't be clever" option. I suspect that this would resolve the behaviour I'm seeing in the web UI and the behaviour Usucra saw in the Kodi plugin.

There's a feature request for a basic folder view - https://features.jellyfin.org/posts/224/add-a-folder-view-to-libraries - and I've added my own findings to that thread.

mcarlton00 commented 4 years ago

It's been discussed to rip out Mixed Content and have a Custom type that doesn't do any parsing so you can have a raw folder view, but it needs a good bit of work to get to that point. That said, as long as your stuff is named properly (movies, tv shows), there should be no problem parsing things. We can't support every naming scheme on the planet, because it just makes the whole scanning process impossible to logic through.

microwax commented 4 years ago

I think a non-parsing custom type is a very good idea - especially as there will always be differing opinions on what constitutes proper naming and there will always be exceptions. The creation of a non-parsing view will resolve those issues and make Jellyfin a lot more usable for those affected. Kodi seems to handle raw folder views pretty well alongside its more advanced library functionality. Admittedly, Kodi is coded in a different language, but perhaps the same approach could be adapted for Jellyfin.