We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit c228f6dc authored by Mike Sheldon's avatar Mike Sheldon

Implement librefm://user//loved station URL, for listening to only tracks that...

Implement librefm://user//loved station URL, for listening to only tracks that have been marked as 'loved'
parent a9d1f2c0
......@@ -34,7 +34,7 @@ if(!$res) {
die("BADSESSION\n");
}
if(ereg('^(globaltags|artist)/[^:]+$', $url, $regs)) {
if(ereg('^(globaltags|artist|user)/[^:]+$', $url, $regs)) {
$url = 'librefm://' . $url; // compensate for shell-fm sending incomplete urls
}
......
......@@ -28,6 +28,10 @@ function radio_title_from_url($url) {
$artist = $regs[2];
return 'Libre.fm ' . $artist . ' Artist Radio';
}
if(ereg('l(ast|ibre)fm://user/(.*)/loved', $url, $regs) {
$user = $regs[2];
return 'Libre.fm ' . $user . '\'s Loved Radio';
}
return 'FAILED';
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment