summaryrefslogtreecommitdiffstats
path: root/play/index.php
diff options
context:
space:
mode:
authorPaul Arthur <paul.arthur@flowerysong.com>2013-02-07 14:24:40 -0500
committerPaul Arthur <paul.arthur@flowerysong.com>2013-02-07 14:24:40 -0500
commit239ea81fdf2fa2bda8a8556e19412264396fe52a (patch)
tree0d753486ec6ded74cb4adb1a7e70dd9ce4ccfda6 /play/index.php
parent31afde9fc07a766229681a13d2cce0825e9fec93 (diff)
downloadampache-239ea81fdf2fa2bda8a8556e19412264396fe52a.tar.gz
ampache-239ea81fdf2fa2bda8a8556e19412264396fe52a.tar.bz2
ampache-239ea81fdf2fa2bda8a8556e19412264396fe52a.zip
Some cleanup of play URL handling
Move parsing from Song into Stream_URL and make it parse more things. Add the type parameter to all generated URLs instead of adding video to Video URLs.
Diffstat (limited to 'play/index.php')
-rw-r--r--play/index.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/play/index.php b/play/index.php
index 238e963f..db965f33 100644
--- a/play/index.php
+++ b/play/index.php
@@ -37,12 +37,23 @@ $oid = $_REQUEST['oid']
// FIXME: Any place that doesn't use oid should be fixed
? scrub_in($_REQUEST['oid'])
: scrub_in($_REQUEST['song']);
+$otype = scrub_in($_REQUEST['otype']);
$sid = scrub_in($_REQUEST['ssid']);
$xml_rpc = scrub_in($_REQUEST['xml_rpc']);
$video = make_bool($_REQUEST['video']);
$type = scrub_in($_REQUEST['type']);
$transcode_to = scrub_in($_REQUEST['transcode_to']);
+if ($video) {
+ // FIXME: Compatibility hack, should eventually be removed
+ $type = 'video';
+}
+
+if (!$type) {
+ // FIXME: Compatibility hack, should eventually be removed
+ $type = 'song';
+}
+
if ($type == 'playlist') {
$playlist_type = scrub_in($_REQUEST['playlist_type']);
$oid = $sid;
@@ -174,7 +185,7 @@ if ($random) {
}
} // if random
-if (!$video) {
+if ($type == 'song') {
/* Base Checks passed create the song object */
$media = new Song($oid);
$media->format();