BlitterStudio / MB_SubSonic

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

Playlist problem still exists #9

Closed phred13 closed 8 years ago

phred13 commented 8 years ago

In March I posted on the MusicBee forum that playlists were an issue with SubSonic on MB. That post is here http://getmusicbee.com/forum/index.php?topic=3620.msg106098#msg106098 "I'm not having much success with it. If I click on the SubSonic node, I see and have access to all my tracks. When expanding the node, my playlists show but there's a status bar message indicating that "Unable to access Subsonic: \xxx". Under the list of playlists, I have the Music node which opens and shows all my tracks by artist. So I guess everything works as expected except for playlists."

Sadly, the 2.2 release doesn't fix this.

midwan commented 8 years ago

Thanks for taking the trouble to report the problem here as well. Could you please mention the version of each component also, so I can setup a test environment and try to reproduce this? e.g. Subsonic server version, MusicBee version (I already know the plugin version).

It would also help if I had an idea of the kind of connection you are using, is it HTTP or HTTPS? Do you have a path after the server address, or is it the default "/"?

Thank you for helping narrowing this down further.

midwan commented 8 years ago

From what I remember, this was originally reported as a bug to Steven, who fixed it in the 3.0 beta version back then.

When trying to reproduce this on an installation I have here, with the latest version of MusicBee (3.0.5995) and my Subsonic 6.0 server, I didn't see the problem. I created two playlists from scratch, added several tracks in each and then refreshed the Subsonic node in MusicBee with F5. The playlists showed up, I selected them and I could see and play the tracks as expected.

musicbee_playlists

Let's see if we can find out why it doesn't work for you... :)

phred13 commented 8 years ago

Thanks for the "personal attention." :-)

I'm currently running MB 3.0.6053, which is today's patch version. But as you know, the problem appeared back in March when I first reported it. My playlists are mostly Auto-Playlists, with a few static thrown in. About 80 total, with about ten being static. It doesn't matter what type of playlist, the error still shows.

Also when I'm using the music node under SubSonic, no artwork shows. I reported this back in February with a screenshot http://getmusicbee.com/forum/index.php?topic=3620.msg104721#msg104721

There are also quite a number of artist folders under the SubSonic music node that are showing empty. But when looking at those folders with MB, or when connected to SubSonic via a web browser, the tracks are present.
Could 18,000+ tracks be too much for the plugin to handle? When Steven first introduced the plugin, these issues weren't present.

I've attached a screenshot showing both the no album art and the status bar error message.

Let me know if there's anything you want me to try, or info I can provide, in order to get to the bottom of this.

Thanks.

----- Original Message ----- From: Dimitris Panokostas notifications@github.com To: midwan/MB_SubSonic MB_SubSonic@noreply.github.com Cc: phred13, Author author@noreply.github.com Date: Thu, 28 Jul 2016 12:15:47 -0700 Subject: Re: [midwan/MB_SubSonic] Playlist problem still exists (#9)

When trying to reproduce this on an installation I have here, with the latest version of MusicBee (3.0.5995) and my Subsonic 6.0 server, I didn't see the problem. I created two playlists from scratch, added several tracks in each and then refreshed the Subsonic node in MusicBee with F5. The playlists showed up, I selected them and I could see and play the tracks as expected.

<img width="1280" alt="musicbee_playlists"

src="https://cloud.githubusercontent.com/assets/3877365/17226181/69ea2a14-5508-11e6-9da1-882a93186bfb.png">

Let's see if we can find out why it doesn't work for you... :)


You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/midwan/MB_SubSonic/issues/9#issuecomment-235996344

phred13 commented 8 years ago

Sorry - I didn't notice you sent this also. I would've combined them into one in order to cut down your traffic.

MB 3.0.6053 SubSonic 6.0 I'm using HTTP on port 13013 with a memory limit of 125mb and the server address is the default /

----- Original Message ----- From: Dimitris Panokostas notifications@github.com To: midwan/MB_SubSonic MB_SubSonic@noreply.github.com Cc: phred13, Author author@noreply.github.com Date: Thu, 28 Jul 2016 11:41:51 -0700 Subject: Re: [midwan/MB_SubSonic] Playlist problem still exists (#9)

Thanks for taking the trouble to report the problem here as well. Could you please mention the version of each component also, so I can setup a test environment and try to reproduce this? e.g. Subsonic server version, MusicBee version (I already know the plugin version).

It would also help if I had an idea of the kind of connection you are using, is it HTTP or HTTPS? Do you have a path after the server address, or is it the default "/"?

Thank you for helping narrowing this down further.


You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/midwan/MB_SubSonic/issues/9#issuecomment-235986991

midwan commented 8 years ago

Thanks for the info. It's certainly not a problem related to the number of tracks, as I'm using it with a bit over 22,000 tracks without a problem. I don't use a lot of playlists however, I just created a couple to test what you reported, but they worked for me as well (though I also got no cover art, the tracks did play normally).

To be able to fix this, I need to recreate it first and debug it while it's happening. If I can't do that in an environment I have here, would it be possible to give me a test user account on your server instead?

It would be much faster and easier to fix something once I can see what is happening exactly in the background...

phred13 commented 8 years ago

I'd certainly be willing to give you a test account on my SS server. I will be around until Tuesday and then gone for about a week. The server will not be accessable during my week away as I'll be shutting everything down. Let me know how you wish to proceed.

----- Original Message ----- From: Dimitris Panokostas notifications@github.com To: midwan/MB_SubSonic MB_SubSonic@noreply.github.com Cc: phred13, Author author@noreply.github.com Date: Thu, 28 Jul 2016 14:34:53 -0700 Subject: Re: [midwan/MB_SubSonic] Playlist problem still exists (#9)

Thanks for the info. It's certainly not a problem related to the number of tracks, as I'm using it with a bit over 22,000 tracks without a problem. I don't use a lot of playlists however, I just created a couple to test what you reported, but they worked for me as well (though I also got no cover art, the tracks did play normally).

To be able to fix this, I need to recreate it first and debug it while it's happening. If I can't do that in an environment I have here, would it be possible to give me a test user account on your server instead?

It would be much faster and easier to fix something once I can see what is happening exactly in the background...


You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/midwan/MB_SubSonic/issues/9#issuecomment-236032277

midwan commented 8 years ago

Please mail me the details as soon as you can then, I might have some time to look into it over the weekend. If I find out what is causing it, I can continue working on it even if the server is not available, we'll just have to wait until you're back in order to test it then.

phred13 commented 8 years ago

Sounds like a good plan. URL to the server is: Username: Password: ***

I've tested the login and all is fine. Let me know if you have issues logging in.

Thanks.

----- Original Message ----- From: Dimitris Panokostas notifications@github.com To: midwan/MB_SubSonic MB_SubSonic@noreply.github.com Cc: phred13, Author author@noreply.github.com Date: Fri, 29 Jul 2016 05:47:46 -0700 Subject: Re: [midwan/MB_SubSonic] Playlist problem still exists (#9)

Please mail me the details as soon as you can then, I might have some time to look into it over the weekend. If I find out what is causing it, I can continue working on it even if the server is not available, we'll just have to wait until you're back in order to test it then.


You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/midwan/MB_SubSonic/issues/9#issuecomment-236171294

midwan commented 8 years ago

Thanks, I've masked out the details on the comment, since it's public ;-)

I'll try it out in a bit and let you know if I have any problems, otherwise I can start working on this right away.

midwan commented 8 years ago

Great news, I've been able to recreate this in your server, and I have an idea of what might be causing it (invalid characters in the XML response received). I can probably fix this quickly, will let you know soon.

phred13 commented 8 years ago

Great news indeed!

On July 29, 2016 9:17:56 AM EDT, Dimitris Panokostas notifications@github.com wrote:

Great news, I've been able to recreate this in your server, and I have an idea of what might be causing it (invalid characters in the XML response received). I can probably fix this quickly, will let you know soon.


You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/midwan/MB_SubSonic/issues/9#issuecomment-236177706

phred13 commented 8 years ago

Thanks for masking. I didn't realize these were publicly posted as I'm replying via an email client.

----- Original Message ----- From: Dimitris Panokostas notifications@github.com To: midwan/MB_SubSonic MB_SubSonic@noreply.github.com Cc: phred13, Author author@noreply.github.com Date: Fri, 29 Jul 2016 06:10:08 -0700 Subject: Re: [midwan/MB_SubSonic] Playlist problem still exists (#9)

Thanks, I've masked out the details on the comment, since it's public ;-)

I'll try it out in a bit and let you know if I have any problems, otherwise I can start working on this right away.


You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/midwan/MB_SubSonic/issues/9#issuecomment-236175999

midwan commented 8 years ago

I just pushed a commit that should fix your problems. The issue was related to invalid characters which came back from your server responses (NULL or \0 characters in the XML data). It's strange because not all Subsonic server installations do that (mine doesn't) but it's now handled in the plugin anyway. I'm not sure if this is related to the platform Subsonic is installed on (I'm guessing yours is on Windows? Mine runs on MacOS), because I also saw that the EOF characters received are different in your server responses (\n\r) than on mine (\n).

It took me a few hours of troubleshooting to find out why none of the tracks would play from your server, until I realized that I didn't have permissions to do so... :P In the end, it was a good thing though, since it lead me to actually check for that and notify the user if it happens.

I've also implemented something I wanted to do for a long time: completely revised the method of communication with the server. Instead of the old (and somewhat buggy) code, it's now using RestSharp for all calls to the server. That should speed things up a bit and hopefully also fix the issues with things not showing up. We'll have to test it to make sure of course.

I'll prepare a beta release for now, until more people can test and verify that it works better than before. When that happens, it will be released as "stable" as well.

phred13 commented 8 years ago

NICE!! I'm now able to play from the playlists. Small issue is that no album art is appearing but that may be due to the fact that I didn't give it enough time to load. So later tonight I will open up a node and let it sit there for a while to see if the art show.

And yes, I'm running Windows 7. I don't understand why you couldn't play any tracks from my server. I test that when I set up the account, and I just tested it again. Music played both times.

Thanks again for taking care of this.

midwan commented 8 years ago

I could see the artwork from your server in Playlists, it took a few seconds but it was downloaded normally for several tracks.

As for playback, I got a response from Subsonic that "Dimitris is not allowed to download tracks", which is a standard response when a user lacks that permission. I could browse the playlists and the Music folder, see the artwork and the tracks, but I could not download/play them.

Perhaps streaming them would work, I forgot to try it (need to check the "Transcode" option in the plugin settings to enable that). Either way, it was no error but rather a normal Subsonic response, so I expect it was because of lack of permissions on the account you created for me.

phred13 commented 8 years ago

Yes, I had downloading disabled, but the playing of tracks was allowed.

As for the artwork, I get nothing. Not while playing, not while in Album view. I left MB connected to SS for more than two hours and at that point only one album had artwork out of more than 4,000.

And to add to the mystery, when in Album view, the track count for each album shows as zero. When I right-click on an album and select 'play now' the entire album queues and play. If I switch to track details view, all the tracks are present.

Again, neither of these quirks are deal-breakers for me, but thought you should know about them. If you decide it's worth your time to look into, let me know and I'll set up the account on the server again.

2016-07-31_08-18-39

midwan commented 8 years ago

Hm, it must be related to how the plugin / MB requests the tracks then, because currently it's using the "Download.view" call in order to play a track, or "stream.view" if it has the Transcode option enabled. I'll have another look at the Subsonic API to see if there's another way to get them also.

Regarding the artwork, I suspect it has to do with the "View" you have in MB. It may be related to the "Album view" for example. In my tests, I had "Album and tracks" view, but I could also see the artwork for the artists listed on the left and the album art for the "now playing" track on the right hand side. We'll have to run more tests to find out what's happening.

phred13 commented 8 years ago

I rarely use Album and Tracks view, but I just tried it and the artwork still doesn't appear. Nor does it appear when playing a track. But again, no big deal. 2016-07-31_10-34-54

midwan commented 8 years ago

OK, thanks for testing it, I will investigate more and see what I find.

Regarding playback, there are 2 ways to get a file from Subsonic in order to play it:

The plugin was configured to use Stream only when "Transcoding" was enabled, using download in other occasions. I'll see if we can always use Stream instead, it might make more sense - Download should actually save the file locally, if you want to (though not sure if we can add support from that from the plugin, if it's not supported from MB itself).

phred13 commented 8 years ago

Thanks for the explanation regarding 'stream' vs 'download' and how you are pulling the file for playing.

Take you're time on this because (as previously mentioned) I will be away for a week or so starting the middle of this coming week.

midwan commented 8 years ago

I've made the change to use Stream only under all scenarios and it seems to work fine. :)

Regarding the Artwork not showing for tracks/albums (it does show for Artists as you saw), my investigation lead me to believe that the problem is actually caused by MusicBee itself: it doesn't call the relevant functions that get the Artwork in the plugin.

I reported this to Steven, hoping that he can take a look at his code and validate my observations.

phred13 commented 8 years ago

Good news. Thanks for letting Steven know.

midwan commented 8 years ago

Steven just confirmed that it's a bug in MB indeed. He sent me a patched version to test, and I could see that it showed the Artwork with that version, at least in the various views (Albums and Tracks, Album covers, etc). It doesn't show any artwork if you select a track and go to "Edit", so I reported that to see if he can fix it as well.

One drawback is that because MB caches all artwork locally, in order to get the artwork fetched you'll need to first clear the cache, by going to Tools->Advanced->Reset Artwork Cache, from within MB. Small price to pay, but something you need to keep in mind.

phred13 commented 8 years ago

More good news! I usually grab every patch version that comes along, so I'll keep checking.

EDIT: I see on the MB site that it's fixed with the latest patch. Going to test now after I first clear the cache.

phred13 commented 8 years ago

Looking good!!! One issue still remains and that is the track count still shows as zero. Ignore the 'no cover art' in the screenshot - I'm reusing an old one that shows the zero tracks issue: de51259c-56f7-11e6-98f0-6d2e18f3515f

phred13 commented 8 years ago

Should I open a new ticket on the zero track count issue?

midwan commented 8 years ago

There's a good chance that's also a bug in MB, so I'm waiting for Steven to confirm. If it's not, then we can handle it as a separate issue.

phred13 commented 8 years ago

Ok - let me know where we wind up on this and if necessary I'll open a new issue. Thanks.

phred13 commented 8 years ago

Any news on this? I've still got "0 Tracks" showing in Album Art View.

midwan commented 8 years ago

Unfortunately I haven't heard back from Steven yet.

Have you tried with the latest official MB version? In my environment, I don't even have a number of tracks showing for playlists in this version: image

If you see something different, could you please let me know how? Though it may be a bug in MB at this point, before getting back to Steven it would be nice if we could recreate it and be certain.

phred13 commented 8 years ago

I had to create a Virtual Tag for the line under each album that shows the year and the number of tracks. It works when using the Artwork view directly within MB and my library. It's only in the Subsonic node that it doesn't work. Here's the tag in case you want to test it: $IsNull(<Year>,,<Year>" /") $If(<Album Track Count>=1,<Album Track Count>" Track",<Album Track Count>" Tracks")

Same behavior if I just use Album Track Count by itself

Subsonic node: subsonic

Full library node: mb

midwan commented 8 years ago

Thanks for this, it certainly helps. I'll try to reproduce it and if we see it's a bug in MB, report it to Steven. Otherwise, I'll fix it as soon as possible.

midwan commented 8 years ago

I must have done something different then, or we're testing on a different version. Here are my results: image

I used your Virtual tag above, added it in the Custom view for the panel and it seems to work differently. I get 0 tracks for one album, and larger amounts of tracks (more than what they really have) for other albums.

midwan commented 8 years ago

It seems to be reporting incorrect number of tracks, even though the number of tracks fetched from Subsonic (and from the plugin) are correct. I've just reported this on the MB forum.

image

phred13 commented 8 years ago

Thanks for reporting it to Steven.

On August 25, 2016 1:51:09 PM EDT, Dimitris Panokostas notifications@github.com wrote:

It seems to be reporting incorrect number of tracks, even though the number of tracks fetched from Subsonic (and from the plugin) are correct. I've just reported this on the MB forum.

image

You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/midwan/MB_SubSonic/issues/9#issuecomment-242480426

midwan commented 8 years ago

According to Steven, MB takes the numbers from your local library only. Forum discussion can be found here: http://getmusicbee.com/forum/index.php?topic=19483.0

This is not a bug in the plugin I'm afraid, there's not much I can do from my side besides try to convince Steven that it should report the actual number of tracks fetched. I'm closing the issue here, we can continue the discussion on the MB forum.