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);
|
curl_close($ch);
|
||||||
} else {
|
} else {
|
||||||
// Stream media using http redirect if no curl support
|
// 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);
|
header("Location: " . $url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,4 +3,5 @@
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteCond %{REQUEST_FILENAME} !-s
|
RewriteCond %{REQUEST_FILENAME} !-s
|
||||||
RewriteRule ^(.+)\.view$ index.php?action=$1 [PT,L,QSA]
|
RewriteRule ^(.+)\.view$ index.php?action=$1 [PT,L,QSA]
|
||||||
|
RewriteRule ^fake/(.+)$ ../play/$1 [PT,L,QSA]
|
||||||
</IfModule>
|
</IfModule>
|
|
@ -28,6 +28,11 @@ if (!AmpConfig::get('subsonic_backend')) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ssid = $_GET['ssid'];
|
||||||
|
if (!empty($ssid)) {
|
||||||
|
print_r('test', 'found!', '5');
|
||||||
|
}
|
||||||
|
|
||||||
$action = strtolower($_GET['action']);
|
$action = strtolower($_GET['action']);
|
||||||
$f = $_GET['f'];
|
$f = $_GET['f'];
|
||||||
$callback = $_GET['callback'];
|
$callback = $_GET['callback'];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue