Generic origin_url in Soundcloud connector
See original GitHub issueHello!
Describe the bug
When scrobbling from Souncloud, the resulting origin_url
(used for ListenBrainz submissions) is the current browser location.
This does not always represent the location of the track being played.
For example, listening to tracks from the home page, the origin_url
will be https://soundcloud.com/discover
for each track.
Similarly, if playing from a set (playlist) , the origin_url
will be that of the set rather than the URL of the track itself.
Expected behavior While getting the actual resource URL might prove a bit tricky without access to the Soundcloud player, I would expect the origin_url to represent the actual resource URL rather than a generic page.
Debug logs Output from browser console:
Web Scrobbler: {
"track": "Midnight Walk",
"artist": "Richard Griffith",
"album": null,
"albumArtist": null,
"uniqueID": null,
"duration": 120,
"currentTime": null,
"isPlaying": false,
"trackArt": "https://i1.sndcdn.com/artworks-000124055312-ghsz4i-t120x120.jpg",
"isPodcast": false,
"originUrl": "https://soundcloud.com/discover"
}
Web Scrobbler: isPlaying state changed to true
Additional context I am a developer for ListenBrainz and currently working on playback features on our website. It would be helpful to have access to a URL or unique ID for playback purposes, and more generally to have a more descriptive URL. I am happy to help implement an improvement but being new to the codebase I would appreciate help with pointing me in the right direction. Also happy to provide more information as necessary. Thanks for your time!
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (8 by maintainers)
Top GitHub Comments
This issue is still valid and current.
I’m terribly sorry, I got confused! That ticket was so old I forgot the issue was about Soundcloud and was focusing on Bandcamp.
Thank you for both of those fixes !
The Soundcloud PR fixed this issue perfectly.
For Bandcamp, now that you have set up the mechanism to retrieve the album URL, I’ll be able to open another PR if the mechanism ends up being different for the different Bandcamp pages.
Thanks again !