diff options
-rwxr-xr-x | docs/CHANGELOG | 3 | ||||
-rw-r--r-- | play/index.php | 28 | ||||
-rw-r--r-- | server/ajax.server.php | 4 | ||||
-rw-r--r-- | templates/rightbar.inc.php | 2 |
4 files changed, 21 insertions, 16 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG index c8dd7d39..1717e4dd 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,9 @@ -------------------------------------------------------------------------- v.3.5-Alpha1 + - Fixed Dynamic Random/Related URLs with players that always send + a byte offset (MPD) + - Added Checkbox to use existing Database - Updated language code and Fixed catalan language code - Added Emulate gettext() from upgradephp-15 (http://freshmeat.net/p/upgradephp) diff --git a/play/index.php b/play/index.php index 2e1baad4..cae5b800 100644 --- a/play/index.php +++ b/play/index.php @@ -137,7 +137,7 @@ if ($demo_id) { * if we are doing random let's pull the random object */ if ($random) { - if (!isset($start)) { + if ($start < 1) { $song_id = Random::get_single_song($_REQUEST['type']); // Save this one incase we do a seek $_SESSION['random']['last'] = $song_id; @@ -158,19 +158,7 @@ if (!make_bool($song->enabled)) { exit; } -/* If we don't have a file, or the file is not readable */ -if (!$song->file OR ( !is_readable($song->file) AND $catalog->catalog_type != 'remote' ) ) { - - // We need to make sure this isn't democratic play, if it is then remove the song - // from the vote list - if (is_object($tmp_playlist)) { - $tmp_playlist->delete_track($song_id); - } - debug_event('file_not_found',"Error song $song->file ($song->title) does not have a valid filename specified",'2'); - echo "Error: Invalid Song Specified, file not found or file unreadable"; - exit; -} // If we are running in Legalize mode, don't play songs already playing @@ -212,6 +200,20 @@ if ($catalog->catalog_type == 'remote') { exit; } // end if remote catalog +/* If we don't have a file, or the file is not readable */ +if (!$song->file OR !is_readable($song->file)) { + + // We need to make sure this isn't democratic play, if it is then remove the song + // from the vote list + if (is_object($tmp_playlist)) { + $tmp_playlist->delete_track($song_id); + } + + debug_event('file_not_found',"Error song $song->file ($song->title) does not have a valid filename specified",'2'); + echo "Error: Invalid Song Specified, file not found or file unreadable"; + exit; +} + // make fread binary safe set_magic_quotes_runtime(0); diff --git a/server/ajax.server.php b/server/ajax.server.php index 6abaf89f..5c51a2c8 100644 --- a/server/ajax.server.php +++ b/server/ajax.server.php @@ -233,7 +233,7 @@ switch ($_REQUEST['action']) { switch ($_REQUEST['type']) { case 'album': case 'artist': - case 'genre': + case 'tag': $object = new $_REQUEST['type']($_REQUEST['id']); $songs = $object->get_songs(); foreach ($songs as $song_id) { @@ -249,7 +249,7 @@ switch ($_REQUEST['action']) { break; case 'album_random': case 'artist_random': - case 'genre_random': + case 'tag_random': $data = explode('_',$_REQUEST['type']); $type = $data['0']; $object = new $type($_REQUEST['id']); diff --git a/templates/rightbar.inc.php b/templates/rightbar.inc.php index 4a264b16..fab81de3 100644 --- a/templates/rightbar.inc.php +++ b/templates/rightbar.inc.php @@ -65,7 +65,7 @@ <?php echo Ajax::text('?action=basket&type=dynamic&random_type=album',_('Related Album'),'rb_add_related_album'); ?> </li> <li> - <?php echo Ajax::text('?action=basket&type=dynamic&random_type=genre',_('Related Genre'),'rb_add_related_genre'); ?> + <?php echo Ajax::text('?action=basket&type=dynamic&random_type=tag',_('Related Tag'),'rb_add_related_tag'); ?> </li> </ul> </li> |