1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Added soundcloud to scrobbler

This commit is contained in:
Krateng 2019-06-25 16:50:09 +02:00
parent 2cbe67f149
commit 3d78d124ef
3 changed files with 21 additions and 1 deletions

View File

@ -68,7 +68,7 @@ If you didn't install Maloja from the package (and therefore don't have it in `/
### Native API
If you use Plex Web, Spotify, Bandcamp or Youtube Music on Chromium, you can use the included extension (also available on the [Chrome Web Store](https://chrome.google.com/webstore/detail/maloja-scrobbler/cfnbifdmgbnaalphodcbandoopgbfeeh)). Make sure to enter the random key Maloja generates on first startup in the extension settings.
If you use Plex Web, Spotify, Bandcamp, Soundcloud or Youtube Music on Chromium, you can use the included extension (also available on the [Chrome Web Store](https://chrome.google.com/webstore/detail/maloja-scrobbler/cfnbifdmgbnaalphodcbandoopgbfeeh)). Make sure to enter the random key Maloja generates on first startup in the extension settings.
If you want to implement your own method of scrobbling, it's very simple: You only need one POST request to `/api/newscrobble` with the keys `artist`, `title` and `key` - either as form-data or json.

View File

@ -34,6 +34,12 @@ pages = {
"bandcamp.com"
],
"script":"bandcamp.js"
},
"Soundcloud":{
"patterns":[
"https://soundcloud.com"
],
"script":"soundcloud.js"
}
}

View File

@ -0,0 +1,14 @@
maloja_scrobbler_selector_playbar = "//div[contains(@class,'playControls')]"
maloja_scrobbler_selector_metadata = ".//div[contains(@class,'playControls__soundBadge')]//div[contains(@class,'playbackSoundBadge__titleContextContainer')]"
maloja_scrobbler_selector_title = ".//div/a/@title"
maloja_scrobbler_selector_artist = ".//a/text()"
maloja_scrobbler_selector_duration = ".//div[contains(@class,'playbackTimeline__duration')]//span[@aria-hidden='true']/text()"
maloja_scrobbler_selector_control = ".//button[contains(@class,'playControl')]/@title"
maloja_scrobbler_label_playing = "Pause current"
maloja_scrobbler_label_paused = "Play current"