danielvijge / SqueezeCloud

SoundCloud plugin for Squeezebox
GNU General Public License v2.0
25 stars 11 forks source link

SqueezeCloud confuses menu entries #21

Closed geni1105 closed 2 years ago

geni1105 commented 6 years ago

SqueezeCloud seems to confuse menu entries when walking down a menu tree. E.g. when going through a particular "Following" entry to "Tracks" and then selecting a particular track might end up with SqueezeCloud playing a totally different track from a different friend. Going stepwise back up the menu tree usually shows a different track list (from a different friend), then a different friend, and finally friends in different order than initially shown.

Looking at the debug output in server.log, the reason seems to be that SqueezeCloud always traverses the menu tree anew from top, when a deeper menu item is selected. E.g. selecting track 3 of friend 2 of the "Following" list starts again with a new query http://api.soundcloud.com/me/followings.json?offset=0&oauth_token=xxxxx& and then consecutively goes deeper until it reaches the track level. Apparently this is based on static menu indices from the initial query results, but as the JSON object lists returned by SoundCloud are in random order and change with every new request, the static indices do not point to the correct menu items on subsequent queries any more.

geni1105 commented 6 years ago

Forgot to mention versions: this is with Squeezecloud 0.9.3, LMS 7.9.1 running on a Mac Mini with Macos 10.13.3

jtbr commented 4 years ago

I'm also seeing this with version 0.9.5. Unfortunately the randomness makes it nearly impossible to choose tracks/playlists from followed artists.

schnillerman commented 4 years ago

Is this a bigger issue? It's over 2 years old. Just asking for expectation management, well aware of the fact that this is a non commercial job. Or is it a cannot reproduce problem?

danielvijge commented 4 years ago

Yes, it's also present in the Mixcloud plugin. I took over the maintenance of these plugins to keep them alive, so I'm not the original author. Not sure if this is an issue related to these plugins, or to the general architecture of LMS plugins in general.

(out of the top of my head, it's been a while since I looked at it properly) Whenever you open a submenu entry, instead of just requesting the URL for that entry, it it requests everything from the parent entries and down, fetching everything again. It just state "a click on the 2nd menu entry". If in the new fetch the 2nd menu entry changed, it will play the wrong item.

Any help is appreciated, and if you are able to do some perl hacking to debug or make it work, I'm happy to merge a pull request.

jtbr commented 3 years ago

I had a look, and it does seem that it keys on the user id for the 'Following' users in the menus. So that shouldn't be affected by ordering. It seems something else must be going wrong. Perhaps some caching or something with the parsing. If I have more time at some point I'll try to dig a bit deeper but it's been a long time since I've used perl.

sedeca commented 3 years ago

I understand that danielvijge has no ressources to put into this bug. Does anyone know if there is a possibility to hire a programmer to look into the issue? How much would it cost? How would I find someone like that. Is there a myhammer analogue? I find myself not using lms as much as i would, because I cannot use soundcloud... I'd be willing to contribute within my meager means to solving the issue but I can't start learning pearl...

kwarklabs commented 2 years ago

Pull request #39 should resolve this.

danielvijge commented 2 years ago

Fixed in #39 (6798579e2106f088423affab3f15c5cc61e296e8), released as 0.14