jellyfin / jellyfin-plugin-dlna

GNU General Public License v3.0
23 stars 13 forks source link

DLNA not showing certain folders' content #9

Open ptasznikarium opened 3 years ago

ptasznikarium commented 3 years ago

When using DLNA, going to 'Folders' view, then my music folder, then Artist folder, you should see Albums' folders of that Artist. Problem is if Artist's folder is in format "Artist_name -- discography", then there is no Albums listed.

Content is still available if I access it by anything else than 'Folders' view.

It was working fine before JF 10.7 (I went from 10.6.x to 10.7.1) and still is broken in 10.7.2

All Artists with folders in format "Artist_name -- discography" and "Artist_name -- discography YYYY" are affected.

I tried renaming test folder by removing " -- discography" part. refreshing metadata, and restarting JF, but in DLNA I still could see old "Artist_name -- discography" folder, so not sure how to test it....

System (please complete the following information):

BaronGreenback commented 3 years ago

I think i've been able to reproduce this - @ptasznikarium can you check to see if the files are visible in the web interface - because they aren't on mine.

BaronGreenback commented 3 years ago

After further investigation - it looks like the folder is never being scanned.

ptasznikarium commented 3 years ago

Mine were visible, but was scanned long time ago @BaronGreenback

However I added new artist with same naming format and it was scanned without issue. It shows everywhere but in folder/artist/ view.

BaronGreenback commented 3 years ago

I'm not able to reproduce the issue - is the below correct? (The music does have tags embedded)

Folder structure image

VLC image

ptasznikarium commented 3 years ago

Nope @BaronGreenback Given your folders, in VLC go to Folders -> Music1 -> 10,00 Maniaics -- discography

ptasznikarium commented 3 years ago

I see your 10,00 Manaics -- discography is in Music, while in VLC you look at Music1 Also it looks like two different servers, 'Jellyfin Test Music', while in VLC it's 'Jellyfin - BrotherOFBeast'

This poses no problem tho as bug is in Folders view

BaronGreenback commented 3 years ago

The library is called music1 as i've already got another music.

This is what's in all the folders.

image

ptasznikarium commented 3 years ago

Ok, but problem is in 'Folders' view, not in 'Music' @BaronGreenback

image

BaronGreenback commented 3 years ago

Sorry - early in the morning here.

I'm running with full debug - so my response is very slow, but i did eventually get.

image

ptasznikarium commented 3 years ago

No worries, I might have not explained it well enough in first place, I blame my english (that is my 3rd language, therefore not that great) ;)

Yes you can see Artist's folders, but no Albums in those affected Artist folders.

ptasznikarium commented 3 years ago

So for example Artist's Albums on server:

image

Accessing DLNA via Windows 10 File Explorer or via music player on Android, I can see this structure:

image

And as shown above, there is no Albums displayed in that 'Folders view'.

But those are visible in other views, for example in Music -> Album Artist:

image

ptasznikarium commented 3 years ago

On a side note, I can see that in VLC you see folder structure as: Folders / FOLDER / Music / 10,000 Maniacs Wondering where this is coming from as I would expect: Folders / Music / 10,000 Maniacs

Not sure what is causing to display that FOLDER between Folders and Music.

BaronGreenback commented 3 years ago

progressed it a bit further.

First thing I've found is that the file type is important. VLC doesn't show items if it doesn't like the file type. (This seems to be the case even if it can play the contents.)

ptasznikarium commented 3 years ago

This have nothing to do with VLC @BaronGreenback . I do not have VLC, I used DLNA on Windows 10 File Explorer and Foobar on Android. both was working fine before 10.7 (or 10.7.1).

Most of my files are FLAC but I tested on MP3 amd it's the same.

On a sidenote, DLNA is broken on Foobar for Android, you see server but cannot go in, Not sure if it's Foobar update that broke it but I suspect it's 10.7 as well. Maybe will have some time next week to get old version of JF and test it.

BaronGreenback commented 3 years ago

this same issue appears on hisense tv.

BaronGreenback commented 3 years ago

FYI: Confirmed that DLNA folders doesn't work as expected - as well as hiding folders/items, it also displays items from other libraries.

BaronGreenback commented 3 years ago

Have traced the issue to how JF expects the folder structure to be.

eg. Physical File Structure is.. ...\Music\10,000 Maniacs\10,000 Manaics -- discography\Disc 1

Can only get this. image

This is because "10,000 Manaics -- discography" (ignore the spelling mistake) is stored as a MusicAlbum by the scanner. (The MusicAlbum class returns the property Tracks as their siblings, whereas Folders return the property Children, so you are not able to move down the database tree because of how the item is read from the database.)

BaronGreenback commented 3 years ago

image

ptasznikarium commented 3 years ago

Have traced the issue to how JF expects the folder structure to be.

eg. Physical File Structure is.. ...\Music\10,000 Maniacs\10,000 Manaics -- discography\Disc 1

This is because "10,000 Manaics -- discography" (ignore the spelling mistake) is stored as a MusicAlbum by the scanner. (The MusicAlbum class returns the property Tracks as their siblings, whereas Folders return the property Children, so you are not able to move down the database tree because of how the item is read from the database.)

This is a bit strange, why you would go for structure like ".. \Artist \ Artist -- discography \ ..." ?

My structure is like following: ...\Music\10,000 Maniacs -- discography\Album 1\CD 1 ...\Music\10,000 Maniacs -- discography\Album 1\CD 2 ...\Music\10,000 Maniacs -- discography\Album 2 etc

I miss content as described previously, only if Artist have ' -- discography' appended.

BaronGreenback commented 3 years ago

That's because it currently uses the internal name for the item and not the folder name.

In my instance 10,000 Maniacs -- discography is the folder name.

Hadatko commented 11 months ago

Hello. This looks still an issue :'( at least on TCL tv

I noticed a lot of errors like this:

[2023-12-14 04:02:17.935 +01:00] [ERR] [131] Emby.Dlna.ContentDirectory.ContentDirectoryService: Error processing control request
System.NullReferenceException: Object reference not set to an instance of an object.
   at MediaBrowser.Model.Dlna.StreamBuilder.BuildVideoItem(MediaSourceInfo item, VideoOptions options)
   at MediaBrowser.Model.Dlna.StreamBuilder.BuildVideoItem(VideoOptions options)
   at Emby.Dlna.Didl.DidlBuilder.AddVideoResource(XmlWriter writer, BaseItem video, String deviceId, Filter filter, StreamInfo streamInfo)
   at Emby.Dlna.Didl.DidlBuilder.WriteItemElement(XmlWriter writer, BaseItem item, User user, BaseItem context, Nullable`1 contextStubType, String deviceId, Filter filter, StreamInfo streamInfo)
   at Emby.Dlna.ContentDirectory.ControlHandler.HandleBrowse(XmlWriter xmlWriter, IReadOnlyDictionary`2 sparams, String deviceId)
   at Emby.Dlna.Service.BaseControlHandler.CreateControlResponse(ControlRequestInfo requestInfo)
   at Emby.Dlna.Service.BaseControlHandler.ProcessControlRequestInternalAsync(ControlRequest request)
   at Emby.Dlna.Service.BaseControlHandler.ProcessControlRequestAsync(ControlRequest request)
[2023-12-14 04:02:17.954 +01:00] [INF] [131] Emby.Dlna.ContentDirectory.ContentDirectoryService: StreamBuilder.BuildVideoItem( Profile="Generic Device", Path="/data/movies/Akcne/1997 - Piaty element/The.Fifth.Element.BluRay.1080p.x264.5.1.Judas.mp4", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/dbf9430e-14ce-6053-32fd-6aa460c31bcc/stream.mov?MediaSourceId=dbf9430e14ce605332fd6aa460c31bcc&Static=true&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=1&api_key=<token>&Tag=b8381ba5293b2b9de9075d70749f7b34"
[2023-12-14 04:02:17.954 +01:00] [INF] [131] Emby.Dlna.ContentDirectory.ContentDirectoryService: StreamBuilder.BuildVideoItem( Profile="Generic Device", Path="/data/movies/Akcne/1998 - Armagedon/Armageddon.avi", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/7017a8cb-7ba2-28fb-ded4-943220072891/stream.mkv?MediaSourceId=7017a8cb7ba228fbded4943220072891&Static=true&VideoCodec=mpeg4&AudioCodec=mp3&AudioStreamIndex=1&api_key=<token>&Tag=fec8c7bb8c8a6e29680d354b8c38bf7f"
[2023-12-14 04:02:17.955 +01:00] [ERR] [131] Emby.Dlna.ContentDirectory.ContentDirectoryService: Error processing control request
System.NullReferenceException: Object reference not set to an instance of an object.
   at MediaBrowser.Model.Dlna.StreamBuilder.BuildVideoItem(MediaSourceInfo item, VideoOptions options)
   at MediaBrowser.Model.Dlna.StreamBuilder.BuildVideoItem(VideoOptions options)
   at Emby.Dlna.Didl.DidlBuilder.AddVideoResource(XmlWriter writer, BaseItem video, String deviceId, Filter filter, StreamInfo streamInfo)
   at Emby.Dlna.Didl.DidlBuilder.WriteItemElement(XmlWriter writer, BaseItem item, User user, BaseItem context, Nullable`1 contextStubType, String deviceId, Filter filter, StreamInfo streamInfo)
   at Emby.Dlna.ContentDirectory.ControlHandler.HandleBrowse(XmlWriter xmlWriter, IReadOnlyDictionary`2 sparams, String deviceId)
   at Emby.Dlna.Service.BaseControlHandler.CreateControlResponse(ControlRequestInfo requestInfo)
   at Emby.Dlna.Service.BaseControlHandler.ProcessControlRequestInternalAsync(ControlRequest request)
   at Emby.Dlna.Service.BaseControlHandler.ProcessControlRequestAsync(ControlRequest request)
[2023-12-14 04:02:17.971 +01:00] [INF] [131] Emby.Dlna.ContentDirectory.ContentDirectoryService: StreamBuilder.BuildVideoItem( Profile="Generic Device", Path="/data/movies/Akcne/1997 - Piaty element/The.Fifth.Element.BluRay.1080p.x264.5.1.Judas.mp4", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/dbf9430e-14ce-6053-32fd-6aa460c31bcc/stream.mov?MediaSourceId=dbf9430e14ce605332fd6aa460c31bcc&Static=true&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=1&api_key=<token>&Tag=b8381ba5293b2b9de9075d70749f7b34"
[2023-12-14 04:02:17.972 +01:00] [INF] [131] Emby.Dlna.ContentDirectory.ContentDirectoryService: StreamBuilder.BuildVideoItem( Profile="Generic Device", Path="/data/movies/Akcne/1998 - Armagedon/Armageddon.avi", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/7017a8cb-7ba2-28fb-ded4-943220072891/stream.mkv?MediaSourceId=7017a8cb7ba228fbded4943220072891&Static=true&VideoCodec=mpeg4&AudioCodec=mp3&AudioStreamIndex=1&api_key=<token>&Tag=fec8c7bb8c8a6e29680d354b8c38bf7f"
[2023-12-14 04:02:17.972 +01:00] [ERR] [131] Emby.Dlna.ContentDirectory.ContentDirectoryService: Error processing control request
System.NullReferenceException: Object reference not set to an instance of an object.
   at MediaBrowser.Model.Dlna.StreamBuilder.BuildVideoItem(MediaSourceInfo item, VideoOptions options)
   at MediaBrowser.Model.Dlna.StreamBuilder.BuildVideoItem(VideoOptions options)
   at Emby.Dlna.Didl.DidlBuilder.AddVideoResource(XmlWriter writer, BaseItem video, String deviceId, Filter filter, StreamInfo streamInfo)
   at Emby.Dlna.Didl.DidlBuilder.WriteItemElement(XmlWriter writer, BaseItem item, User user, BaseItem context, Nullable`1 contextStubType, String deviceId, Filter filter, StreamInfo streamInfo)
   at Emby.Dlna.ContentDirectory.ControlHandler.HandleBrowse(XmlWriter xmlWriter, IReadOnlyDictionary`2 sparams, String deviceId)
   at Emby.Dlna.Service.BaseControlHandler.CreateControlResponse(ControlRequestInfo requestInfo)
   at Emby.Dlna.Service.BaseControlHandler.ProcessControlRequestInternalAsync(ControlRequest request)
   at Emby.Dlna.Service.BaseControlHandler.ProcessControlRequestAsync(ControlRequest request)
[2023-12-14 04:02:19.908 +01:00] [INF] [144] Emby.Dlna.ContentDirectory.ContentDirectoryService: StreamBuilder.BuildVideoItem( Profile="Generic Device", Path="/data/movies/ARozpravky/1992 - Tom a Jerry - Film Cz/Tom a Jerry - Film  (1992) Cz.avi", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/c3488636-663e-f823-5743-c5487ddce522/stream.avi?MediaSourceId=c3488636663ef8235743c5487ddce522&Static=true&VideoCodec=mpeg4&AudioCodec=mp3&AudioStreamIndex=1&api_key=<token>&Tag=91339e65d8fa0950dcc2a8bd22d54492"
mikeilabs commented 10 months ago

Hello. This looks still an issue :'( at least on TCL tv

I noticed a lot of errors like this:

[2023-12-14 04:02:17.935 +01:00] [ERR] [131] Emby.Dlna.ContentDirectory.ContentDirectoryService: Error processing control request
System.NullReferenceException: Object reference not set to an instance of an object.
   at MediaBrowser.Model.Dlna.StreamBuilder.BuildVideoItem(MediaSourceInfo item, VideoOptions options)
   at MediaBrowser.Model.Dlna.StreamBuilder.BuildVideoItem(VideoOptions options)
   at Emby.Dlna.Didl.DidlBuilder.AddVideoResource(XmlWriter writer, BaseItem video, String deviceId, Filter filter, StreamInfo streamInfo)
   at Emby.Dlna.Didl.DidlBuilder.WriteItemElement(XmlWriter writer, BaseItem item, User user, BaseItem context, Nullable`1 contextStubType, String deviceId, Filter filter, StreamInfo streamInfo)
   at Emby.Dlna.ContentDirectory.ControlHandler.HandleBrowse(XmlWriter xmlWriter, IReadOnlyDictionary`2 sparams, String deviceId)
   at Emby.Dlna.Service.BaseControlHandler.CreateControlResponse(ControlRequestInfo requestInfo)
   at Emby.Dlna.Service.BaseControlHandler.ProcessControlRequestInternalAsync(ControlRequest request)
   at Emby.Dlna.Service.BaseControlHandler.ProcessControlRequestAsync(ControlRequest request)
[2023-12-14 04:02:17.954 +01:00] [INF] [131] Emby.Dlna.ContentDirectory.ContentDirectoryService: StreamBuilder.BuildVideoItem( Profile="Generic Device", Path="/data/movies/Akcne/1997 - Piaty element/The.Fifth.Element.BluRay.1080p.x264.5.1.Judas.mp4", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/dbf9430e-14ce-6053-32fd-6aa460c31bcc/stream.mov?MediaSourceId=dbf9430e14ce605332fd6aa460c31bcc&Static=true&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=1&api_key=<token>&Tag=b8381ba5293b2b9de9075d70749f7b34"
[2023-12-14 04:02:17.954 +01:00] [INF] [131] Emby.Dlna.ContentDirectory.ContentDirectoryService: StreamBuilder.BuildVideoItem( Profile="Generic Device", Path="/data/movies/Akcne/1998 - Armagedon/Armageddon.avi", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/7017a8cb-7ba2-28fb-ded4-943220072891/stream.mkv?MediaSourceId=7017a8cb7ba228fbded4943220072891&Static=true&VideoCodec=mpeg4&AudioCodec=mp3&AudioStreamIndex=1&api_key=<token>&Tag=fec8c7bb8c8a6e29680d354b8c38bf7f"
[2023-12-14 04:02:17.955 +01:00] [ERR] [131] Emby.Dlna.ContentDirectory.ContentDirectoryService: Error processing control request
System.NullReferenceException: Object reference not set to an instance of an object.
   at MediaBrowser.Model.Dlna.StreamBuilder.BuildVideoItem(MediaSourceInfo item, VideoOptions options)
   at MediaBrowser.Model.Dlna.StreamBuilder.BuildVideoItem(VideoOptions options)
   at Emby.Dlna.Didl.DidlBuilder.AddVideoResource(XmlWriter writer, BaseItem video, String deviceId, Filter filter, StreamInfo streamInfo)
   at Emby.Dlna.Didl.DidlBuilder.WriteItemElement(XmlWriter writer, BaseItem item, User user, BaseItem context, Nullable`1 contextStubType, String deviceId, Filter filter, StreamInfo streamInfo)
   at Emby.Dlna.ContentDirectory.ControlHandler.HandleBrowse(XmlWriter xmlWriter, IReadOnlyDictionary`2 sparams, String deviceId)
   at Emby.Dlna.Service.BaseControlHandler.CreateControlResponse(ControlRequestInfo requestInfo)
   at Emby.Dlna.Service.BaseControlHandler.ProcessControlRequestInternalAsync(ControlRequest request)
   at Emby.Dlna.Service.BaseControlHandler.ProcessControlRequestAsync(ControlRequest request)
[2023-12-14 04:02:17.971 +01:00] [INF] [131] Emby.Dlna.ContentDirectory.ContentDirectoryService: StreamBuilder.BuildVideoItem( Profile="Generic Device", Path="/data/movies/Akcne/1997 - Piaty element/The.Fifth.Element.BluRay.1080p.x264.5.1.Judas.mp4", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/dbf9430e-14ce-6053-32fd-6aa460c31bcc/stream.mov?MediaSourceId=dbf9430e14ce605332fd6aa460c31bcc&Static=true&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=1&api_key=<token>&Tag=b8381ba5293b2b9de9075d70749f7b34"
[2023-12-14 04:02:17.972 +01:00] [INF] [131] Emby.Dlna.ContentDirectory.ContentDirectoryService: StreamBuilder.BuildVideoItem( Profile="Generic Device", Path="/data/movies/Akcne/1998 - Armagedon/Armageddon.avi", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/7017a8cb-7ba2-28fb-ded4-943220072891/stream.mkv?MediaSourceId=7017a8cb7ba228fbded4943220072891&Static=true&VideoCodec=mpeg4&AudioCodec=mp3&AudioStreamIndex=1&api_key=<token>&Tag=fec8c7bb8c8a6e29680d354b8c38bf7f"
[2023-12-14 04:02:17.972 +01:00] [ERR] [131] Emby.Dlna.ContentDirectory.ContentDirectoryService: Error processing control request
System.NullReferenceException: Object reference not set to an instance of an object.
   at MediaBrowser.Model.Dlna.StreamBuilder.BuildVideoItem(MediaSourceInfo item, VideoOptions options)
   at MediaBrowser.Model.Dlna.StreamBuilder.BuildVideoItem(VideoOptions options)
   at Emby.Dlna.Didl.DidlBuilder.AddVideoResource(XmlWriter writer, BaseItem video, String deviceId, Filter filter, StreamInfo streamInfo)
   at Emby.Dlna.Didl.DidlBuilder.WriteItemElement(XmlWriter writer, BaseItem item, User user, BaseItem context, Nullable`1 contextStubType, String deviceId, Filter filter, StreamInfo streamInfo)
   at Emby.Dlna.ContentDirectory.ControlHandler.HandleBrowse(XmlWriter xmlWriter, IReadOnlyDictionary`2 sparams, String deviceId)
   at Emby.Dlna.Service.BaseControlHandler.CreateControlResponse(ControlRequestInfo requestInfo)
   at Emby.Dlna.Service.BaseControlHandler.ProcessControlRequestInternalAsync(ControlRequest request)
   at Emby.Dlna.Service.BaseControlHandler.ProcessControlRequestAsync(ControlRequest request)
[2023-12-14 04:02:19.908 +01:00] [INF] [144] Emby.Dlna.ContentDirectory.ContentDirectoryService: StreamBuilder.BuildVideoItem( Profile="Generic Device", Path="/data/movies/ARozpravky/1992 - Tom a Jerry - Film Cz/Tom a Jerry - Film  (1992) Cz.avi", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/c3488636-663e-f823-5743-c5487ddce522/stream.avi?MediaSourceId=c3488636663ef8235743c5487ddce522&Static=true&VideoCodec=mpeg4&AudioCodec=mp3&AudioStreamIndex=1&api_key=<token>&Tag=91339e65d8fa0950dcc2a8bd22d54492"

Have the same Issue, switched back to Emby because no directories or files are displayed in Jellyfin