From 239ea81fdf2fa2bda8a8556e19412264396fe52a Mon Sep 17 00:00:00 2001 From: Paul Arthur Date: Thu, 7 Feb 2013 14:24:40 -0500 Subject: 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. --- play/index.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'play/index.php') 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(); -- cgit