Moode Forum

Full Version: Instant play album & random
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey Tim,

When i instant play an album with random actived, random become disabled. Is there a particular reason for this ? If not, could it be possible to keep the random state (when auto shuffle is off of course) ? I'm using 5.2.
I think you can find some answers here (and following) :-)

JST
Thank you for the thread, if auto-shuffle is on then disabling random is OK of course.

But when auto-shuffle is off, why disabling random ? The idea would be, when random is on and you instant play an album, then the titles of the album would be play randomnly.

In the current state, to do that, i need to instant play an album, and activating random each time.
I can see that usage scenario but the logic gets a bit tricky with auto-shuffle vs MPD random play. The auto-shuffle ON/OFF setting in Audio config determines whether the Random button functions as MPD random play or auto-shuffle random play.

Try commenting out the "else" block as indicated in the code below from /var/www/command/moode.php, then turn OFF Auto-shuffle in Audio config and toggle the Random button ON in Playback. This should enable MPD random for Instant album play.

Code:
        // turn off auto-shuffle or random play when playqueue cmds submitted
        if (in_array($_GET['cmd'], $playqueue_cmds)) {
            if ($_SESSION['ashuffle'] == '1') {
                playerSession('write', 'ashuffle', '0');
                sysCmd('killall -s 9 ashuffle > /dev/null');
                sendMpdCmd($sock, 'consume 0');
                $resp = readMpdResp($sock);
            }
            /*else {
                sendMpdCmd($sock, 'random 0');
                $resp = readMpdResp($sock);
            }*/            
        }
Just perfect, thank you, it work also with the random album feature Smile