Changeset 1713

Show
Ignore:
Timestamp:
08/30/08 13:08:59 (3 months ago)
Author:
vollmerk
Message:

fixed pure random when playing to mpd

Location:
branches/3.4
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/3.4/docs/CHANGELOG

    r1687 r1713  
    55-------------------------------------------------------------------------- 
    66  v.3.4.3  
     7        - Fixed Dynamic Random/Related URLs with players that always send 
     8                a byte offset (MPD) 
     9        - Added checkbox to allow use of existing database 
    710        - Fixed prevent_multiple_logins, preventing all logins (Thx hugh) 
    811        - Fixed headers on the Export 
  • branches/3.4/play/index.php

    r1708 r1713  
    138138 */ 
    139139if ($random) {  
    140         if (!isset($start)) {  
     140        if ($start < 1) {  
    141141                $song_id = Random::get_single_song($_REQUEST['type']);  
    142142                // Save this one incase we do a seek 
     
    159159} 
    160160 
    161 /* If we don't have a file, or the file is not readable */ 
    162 if (!$song->file OR ( !is_readable($song->file) AND $catalog->catalog_type != 'remote' ) ) {  
    163  
    164         // We need to make sure this isn't democratic play, if it is then remove the song 
    165         // from the vote list 
    166         if (is_object($tmp_playlist)) {  
    167                 $tmp_playlist->delete_track($song_id);  
    168         } 
    169  
    170         debug_event('file_not_found',"Error song $song->file ($song->title) does not have a valid filename specified",'2'); 
    171         echo "Error: Invalid Song Specified, file not found or file unreadable";  
    172         exit;  
    173 } 
    174  
    175          
    176161// If we are running in Legalize mode, don't play songs already playing 
    177162if (Config::get('lock_songs')) { 
     
    212197        exit; 
    213198} // end if remote catalog 
     199 
     200/* If we don't have a file, or the file is not readable */ 
     201if (!$song->file OR ( !is_readable($song->file) AND $catalog->catalog_type != 'remote' ) ) {  
     202 
     203        // We need to make sure this isn't democratic play, if it is then remove the song 
     204        // from the vote list 
     205        if (is_object($tmp_playlist)) {  
     206                $tmp_playlist->delete_track($song_id);  
     207        } 
     208 
     209        debug_event('file_not_found',"Error song $song->file ($song->title) does not have a valid filename specified",'2'); 
     210        echo "Error: Invalid Song Specified, file not found or file unreadable";  
     211        exit;  
     212} 
    214213 
    215214// make fread binary safe