mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-06 03:49:56 +02:00
Add 'fake' directory to Subsonic streaming url when cUrl unavailable
This commit is contained in:
parent
89b12c8f0a
commit
c3b3a8021e
5 changed files with 20 additions and 10 deletions
|
@ -86,6 +86,10 @@ class Subsonic_Api
|
|||
curl_close($ch);
|
||||
} else {
|
||||
// Stream media using http redirect if no curl support
|
||||
|
||||
// Bug fix for android clients looking for /rest/ in destination url
|
||||
// Warning: external catalogs will not work!
|
||||
$url = str_replace('/play/', '/rest/fake/', $url);
|
||||
header("Location: " . $url);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,4 +3,5 @@
|
|||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-s
|
||||
RewriteRule ^(.+)\.view$ index.php?action=$1 [PT,L,QSA]
|
||||
RewriteRule ^fake/(.+)$ ../play/$1 [PT,L,QSA]
|
||||
</IfModule>
|
|
@ -28,6 +28,11 @@ if (!AmpConfig::get('subsonic_backend')) {
|
|||
exit;
|
||||
}
|
||||
|
||||
$ssid = $_GET['ssid'];
|
||||
if (!empty($ssid)) {
|
||||
print_r('test', 'found!', '5');
|
||||
}
|
||||
|
||||
$action = strtolower($_GET['action']);
|
||||
$f = $_GET['f'];
|
||||
$callback = $_GET['callback'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue