BlitterStudio / MB_SubSonic

MusicBee SubSonic plugin
GNU General Public License v3.0
115 stars 13 forks source link

"Directory not found error" when selecting root siblings. Root does not display anything #34

Closed 0xE0-rng closed 3 years ago

0xE0-rng commented 6 years ago

Subsonic Version: 6.0 (build a7857c) SubSonic Plugin version: 2.13 MusicBee: 3.1.6590

Hi, I have a problem when selecting one of the root folders, the main root folder simply shows no infromation, if I select one of the folders that are direct childs of the main node I get the "Directory not found error"

I attached some screenshots, if I can supply any more information ot help to fix this problem please let me know.

I found a bug ticket from 2016 explaining the same problem, but It supposely got fixed back then. Any tips?

Thanks for reading bugreport

midwan commented 6 years ago

Hmm, it might be that the local cache is not up-to-date. Try selecting the "Subsonic" top-level node, then hitting F5. That will trigger a refresh which will take a while, so please be patient. You should see the status of each step in the MusicBee status bar, if you're running the latest version of the plugin.

Alternatively (or if the above doesn't work), you can try deleting the local cache file manually. The file name is "subsonicCache.dat" and it's located in MusicBee's "persistent storage" location, which should be in %APPDATA%\MusicBee. Try searching for it if you can't find it easily ;)

0xE0-rng commented 6 years ago

Hi @midwan, Thank you for the fast reply. Unfortunatly none of the solutions worked. Pressing F5 does something, but after a while the status bar prints "Done processing GetFolders" (as shown in the screenshot) and nothing happens anymore. I cannot find the subsonicCache.dat anywhere on my drive. The only file that contains the subsonic string I could find is a subsonicSettings.dat. Is there a way to enable debugging in your extention? Greetings

midwan commented 6 years ago

@xerg0n Try uninstalling it then, from within MusicBee's Plugins page. An Uninstall will delete any cache files generated as part of that process.

Then try to install it again and see if the problem remains.

If it does remain, we might need to troubleshoot this on your server directly... Is it accessible from outside your LAN?

midwan commented 6 years ago

@xerg0n Did you have a chance to try my suggestion above perhaps?

0xE0-rng commented 6 years ago

@midwan Hi, please excuse the long delay and thank you for beeing so helpful. I tried the uninstalling with no effect. If you would like to check out my configuration, I can send you a login to my server. Do you have a mail or anything where I can send it to?

midwan commented 6 years ago

@xerg0n Yes, please create a test account for me and send me the details (hostname + path, port, username, password) at midwan at gmail dot com

0xE0-rng commented 6 years ago

Hey, I send you a mail, thanks again :)

midwan commented 6 years ago

@xerg0n Thanks for the details, I was able to connect and try out a few things...

I'll send you a mail to avoid publishing sensitive account info here. ;)

sIRwa2 commented 6 years ago

HI Im running 2.15 is this issue still open? because i'm experiencing them too.

midwan commented 6 years ago

@sIRwa2 While testing this with @xerg0n , we found out that the IDs that the server gave for the top-level indexes seemed to be incorrect. It might be an issue in Subsonic itself (since that's what gives the Indexes/IDs), but I'm not 100% sure.

I also found out that browsing by Index (Artist) seems to work normally, which could be a work-around to this problem as well.

I will look into adding this as an option in the plugin, in the next update.

midwan commented 6 years ago

For the record, it does not happen in my personal installation - I use Airsonic (but also tried LibreSonic and Madsonic before).

h3man1 commented 5 years ago

Have the exact same issue as op. I am using the most recent versions of Airsonic, Musicbee and your plugin. When trying to follow your suggestion to delete the cache file I couldn't find it. When I try to delete it via the settings menu it tells me "the filename wasnt found in the path". Browsing by Index doesn't work for me as a workaround either.

Any news on this topic? Anything else I could try?

midwan commented 5 years ago

@h3man1 The Cache file is only generated after a successful scan - if that never happened, there won't be one.

I'm currently in the middle of a few other projects, so it will take me a while before I can look into this again. But I'll get back to you once I can, and see if there's anything else we can do to figure this out.

h3man1 commented 5 years ago

thanks midwan, appreciate it. I understand time is limited and precious.

midwan commented 5 years ago

I'm afraid I still can't recreate this in my environment.

I tested a fresh installation of Subsonic with MusicBee (both in their latest versions) and played around with a folder structure to see if I can recreate it. It seems to work normally for me.

If anyone is still facing this problem, please let me know? It would be helpful if you could create a temporary account for me if possible, so I can connect and try to debug it there.

h3man1 commented 5 years ago

Still having issues. Sent you an email. edit: sorry sent it to the wrong address

midwan commented 5 years ago

@h3man1 Thanks, I'll try to look into this over the next few days and get back.

midwan commented 5 years ago

@h3man1 This looks a bit weird, I'm not sure if it's a bug in Airsonic?

In your installation, you have 2 available Music Folders (from the getMusicFolders API call), with the following IDs:

- musicFolder id="0" name="Musik" - musicFolder id="2" name="Playlists"

So far, so good. But when we attempt to get the contents of "Musik" with its ID, we get back an error: API call: getMusicDirectory for id="0":

error code ="70" message="Directory not found"

Mind you, the above tests were done with Postman, not the plugin, to rule out anything misbehaving there. The Airsonic API returned the above results...

Edit: looking back, this is the same issue as mentioned above. The API reports certain Music IDs, but when you try to browse using them, it reports it cannot find them. At the same time, browsing by Tags/Indexes works normally. I will need to implement this option in the plugin as a workaround, in an updated version.

RudyAlbertoAcostaMarmalade commented 5 years ago

I am also experiencing this issue.

tesshucom commented 5 years ago

The data specifications for Subsonic and Airsonic are slightly different. The value of parent is different when directory is the top level of tree. In any case, the directory instance of musicFolder can not be obtained by design.

This phenomenon may be related to #48.

Browsing by Tags is not the root solution. getArtists is used in ID3 tags, so that getIndexes is used in File structure.

itchykill commented 5 years ago

Same issue here.

"Directory not found" when trying to get data from the Root Dir while using MusicBee (and Subsonic).

Reinstalling the plugin does nothing.

It finds absolutely zero of the library.

itchykill commented 5 years ago

Also, it won't save the cache. Filename was not found in the path.

CarbonMac commented 4 years ago

I am getting this but at least getting back an album list when selecting the Subsonic entry. I cannot select my root "Music" folder. I also have all of my albums showing up as individual songs and my only way to play them are by drilling down into the folder and playing songs individually from an album

midwan commented 4 years ago

Sorry I've been away for a while, busy with other projects. I should be able to revisit this soon and make some progress.

CarbonMac commented 4 years ago

Just wanna give you an update on things that are different since last update. I am still getting the initial directory not found issue for the "Music" subdirectory under the "Subsonic" listing, but I am finally able to list all the songs by just clicking "Subsonic"! I am curious if it is possibly a permissions issue or if since the path isnt in the root of the server, ie /Music, then it sees nothing there and gives that error.

midwan commented 3 years ago

This should be fixed with the latest release: https://github.com/midwan/MB_SubSonic/releases/tag/v2.30

Please let me know if not, and we'll re-open the case.

h3man1 commented 3 years ago

Hi Midwan. I appreciate your effort on solving this issue but it's still not working for me. Uninstalled the old plugin and installed ver 2.3. Root folder still shows no information. At least there is no more error message.

midwan commented 3 years ago

The Root folder is not supposed to show any "files" under it, but it should expand to show any folders (that are the Indexes from the Subsonic server really). What do you see with this version?

h3man1 commented 3 years ago

I have a main folder called music. When I click on it I was expecting to see the sub folders in my album pane. If this is not the expected behaviour I have to appologise for reopening this issue. Screenshot 2021-02-05 205700

midwan commented 3 years ago

Hm, I'm not sure what you expected to see, but MusicBee does not show folders on the filenames list. Here's an example of how it looks here:

With Subsonic selected: no files image

With my Root folder "Music" selected: no files image

With my Blues subfolder folder selected, which actually has some files there: image

This is how that folder looks on the filesystem: image

Selecting another folder which only has subfolders and no files: image

midwan commented 3 years ago

To clarify: I could show you the folders in the file list as well, but then MusicBee would incorrectly try to parse them as "files" when you double clicked on them, which would throw an error (since they are directories, not files).

midwan commented 3 years ago

And one more note: This is also done for performance considerations: we could do a recursive scan on a folder, and get ALL the files from ALL the subfolders there, but it would take a long time. On local HDDs that may be fine, but through the Subsonic API that could potentially take much more than you're willing to wait for.

So the choice was made to only show things on-demand, not recursively. :)

h3man1 commented 3 years ago

This was a big misunderstanding on my side. I thought this was only due to the error message I got on my root folder. Was hoping once this got fixed I could treat my subsonic like a local drive and display it the same way as my local library.

midwan commented 3 years ago

@h3man1 No worries, at least we fixed the error!