bandcamp-streamer
bandcamp-streamer copied to clipboard
Suggestion: add support for discover page
I would be awesome if the player would also work on the bandcamp discover page: https://bandcamp.com/discover
Just see that is mentioned on the welcome page :) https://github.com/AFlowOfCode/bandcamp-streamer/blob/master/welcome.html#L120 I did not found it on the github. Maybe good to add the Potential feature (wish)list to the readme?
Any guideline where to get started to contribute code to get this working? Where is it defined on which bandcamp pages the player starts to parse albums? Maybe I can have a quick try somewhere in the holiday.
Hey, yeah you're right I should add the potential feature wishlist to the readme. Will do on the next update.
BC's pretty inconsistent with how their players work. Each page tends to have a different type with a different set of javascript needed to manipulate it into doing what we want. For example on the feed page if you look in the console, it's window.playerview, on a user's profile it's window.collectionPlayer, and on a regular album page it's window.gplayerviews[0]._playlist._player.
That's basically where you need to start - figuring out the player they already use & how to manipulate it. I haven't looked into how the Discover page works yet, but I know it doesn't have any of those 3 types of players. So you'd have to do some tests to figure out how they handle playing a track on that page, then pretty much just start experimenting with feeding it the next audio file in order of how they appear on the page. The js files they load probably have some clues, even if they're minimized.
Unfortunately I'm fairly certain it will need its own set of code to make it work, & I doubt any of the code for the extension's currently supported pages will be directly usable. At least at the moment I don't have the time to look into it.
It'd be awesome if you want to give it a shot. If you manage to get something working or even make some steps toward a solution I'd be happy to check it out. I think it's always the first steps that take the longest, or at least they requires the most effort just to actually get started! If you can get past that, maybe it wouldn't be too hard to iron out any wrinkles.