Author Topic: [Subsonic] Getting playlist contents not working as expected  (Read 6412 times)

MiDWaN

  • Jr. Member
  • **
  • Posts: 78
Using the latest version of MusicBee (currently 3.4.7805 P).
It seems that when using the MB_Subsonic plugin and trying to access playlists on the Subsonic server, there is a bug in MB:

MusicBee calls "GetPlaylists" first (correctly, to get the list of playlists on the server), but when you click on one of those playlists, instead of calling "GetPlaylistFiles()" it calls "GetPlaylists" again.

The result is that no content is displayed inside the playlists.

I have an open ticket about this on the plugin's Github page here: https://github.com/midwan/MB_SubSonic/issues/60

It would be great if we could verify this from MB's side.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 33595
There is no GetPlaylistFiles function in the api.
If you are trying to read files in a local musicbee playlist files ie. the playlist is not on the subsonic server then use either:
Its either the old obsolete way:
Playlist_QueryFiles(playlistUrl) first
and check the boolean result is true to indicate the query worked. If its false then these wont work
Playlist_QueryGetAllFiles() returns a string with all playlist files null separated
Playlist_QueryGetNextFile() to iterate one by one

or the current recommended method:
Playlist_QueryFilesEx(playlistUrl, out string[] filenames)

MiDWaN

  • Jr. Member
  • **
  • Posts: 78
I must have mistaken the name for what is in the plugin, sorry.

But still, this problem occurs when trying to access playlists on the Subsonic server (not locally, those work).
It works fine in 3.3 releases (tried with the latest one I could find, Update 6), but not in 3.4 releases of MusicBee.

Something must have changed in how it handles this case, but I don't know what.

In 3.3 Update 6 (works as expected):


In 3.4 (no content shown in the playlist):



In both cases, the plugin and back-end subsonic server (with the playlist) are the same.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 33595
But still, this problem occurs when trying to access playlists on the Subsonic server (not locally, those work).
It works fine in 3.3 releases (tried with the latest one I could find, Update 6), but not in 3.4 releases of MusicBee.
I can see now there was a change made that would impact the subsonic plugin, although not quite how described. I should be able to fix it

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 33595

MiDWaN

  • Jr. Member
  • **
  • Posts: 78
The patched version shows an improvement, but it doesn't completely solve the problem I'm afraid:
- The playlists now show their contents
- However, trying to play back any of the selected items results in an error:


Testing the same on the 3.3 version works as expected, without errors.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 33595
i am not seeing any obvious differences with 3.3 in that regard. Are you happy to run a debug version tomorrow?

MiDWaN

  • Jr. Member
  • **
  • Posts: 78

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 33595
when the plugin returns file details, does it use "/" or "\" as the folder separator
and when the plugin receives a GetStream(url) request, does it expect "/" or "\" as the folder separator

Could you use this version. It will log to the error log (help/ support/ view error log) the urls returned by subsonic in the playlist
and then when you play the file, what url it is using
https://www.mediafire.com/file/l0227txi505v4j1/MusicBeeDebugSubsonic.zip/file
unzip and replace musicbee.exe

MiDWaN

  • Jr. Member
  • **
  • Posts: 78
Thanks for the debug version.

The plugin will detect and translate "\" to "/" internally, so that should not be a problem (at least, it wasn't until now).
Here's the output from the debug version, when double clicking on an item in the playlist (and getting the error message on-screen):

Code
2021-08-31 10:41:04 - get playlist files for:Subsonic:\1
Subsonic:\Music\Blues\The Blues Brothers\03-Gimme Some Lovin'.MP3
Subsonic:\Music\Metal\In Flames\In Flames - I, the Mask (2019)\In Flames - I, the Mask.mp3
2021-08-31 10:41:06 - get stream for:Subsonic:\Music\Blues\The Blues Brothers\03-Gimme Some Lovin'.MP3 --> Music\Blues\The Blues Brothers\03-Gimme Some Lovin'.MP3
null stream
2021-08-31 10:41:06 - 10.0.19042.0 - 3.4.7913.33261P - url: Subsonic:\Music\Blues\The Blues Brothers\03-Gimme Some Lovin'.MP3
System.IO.FileNotFoundException: Unable to find the specified file.
   at #=zGAA6s8sNeIk2s8e3MbgPKBc=.#=zHgvYRBZz03zp(#=z7m_eXApVW6Fi #=zDDvHhv8=, #=zOq7nVsKmVAN45X2dUhPXHjw= #=zobVaPak=, Boolean #=zUniNyG_$2MCsxXI5Pg==, Boolean #=zt7g6WGS26h0Y, Boolean #=z_v7nJkCerFdL, Boolean #=zofFkpTY$b_cY, Int32 #=zUUctO58OuoIE)
   at #=zGAA6s8sNeIk2s8e3MbgPKBc=.#=zT8yqmiXjHpYk(Object #=zziQJQTM=)



Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 33595
I cant see anything wrong
subsonic returned the playlist filename as: Subsonic:\Music\Blues\The Blues Brothers\03-Gimme Some Lovin'.MP3
and MB sent the stream request as: Music\Blues\The Blues Brothers\03-Gimme Some Lovin'.MP3
i cant see anywhere in v3.3 where its changing "\" --> "/"

perhaps you can log what subsonic receives as the url parameter for the getstream(url) function and compare v3.3 with v3.4

MiDWaN

  • Jr. Member
  • **
  • Posts: 78
I think I found something, and it looks like it's in my plugin. Tried a few older versions and I found one that works in both 3.3 and 3.4, so I'll start checking the changes since that version, to narrow down what caused this.
Thanks for the assistance so far, I think you can leave this case for now. I'll let you know if I find anything else that might require your attention.

MiDWaN

  • Jr. Member
  • **
  • Posts: 78
I managed to track down and fix the issue on the plugin's side, with a new release: https://github.com/midwan/MB_SubSonic/releases/tag/v2.33

This still requires the patched MB 3.4 version that you posted above, however. I've made a note regarding that in the release.