} return; } else { if ($other_action == "add_current_track") { if (file_exists($w->data() . '/update_library_in_progress')) { displayNotificationWithArtwork("Cannot modify library while update is in progress", './images/warning.png', 'Error!'); return; } addCurrentTrackToAlfredPlaylistOrYourMusic($w); if ($userid != 'vdesabou') { stathat_ez_count('AlfredSpotifyMiniPlayer', 'add_or_remove', 1); } return; } else { if ($other_action == "random") { list($track_uri, $track_name, $artist_name, $album_name, $duration) = getRandomTrack($w); // start now playing if needed $mopidy_arg = ""; if ($use_mopidy) { $mopidy_arg = "MOPIDY"; } exec("./src/spotify_mini_player_notifications.ksh -d \"" . $w->data() . "\" -a start -m \"" . $mopidy_arg . "\" >> \"" . $w->cache() . "/action.log\" 2>&1 & "); if (!$use_mopidy) { exec("./src/track_info.ksh 2>&1", $retArr, $retVal); if ($retVal != 0) { displayNotificationWithArtwork('AppleScript Exception: ' . htmlspecialchars($retArr[0]) . ' use spot_mini_debug command', './images/warning.png', 'Error!'); exec("osascript -e 'tell application \"Alfred 2\" to search \"spot_mini_debug AppleScript Exception: " . htmlspecialchars($retArr[0]) . "\"'"); return; } } if ($use_mopidy) {
<p>(<?php echo getYearRecorded($info); ?> )</p> <?php $track_list = getTrackList($info); $track_num = 1; foreach ($track_list as $song) { echo "<p>" . $track_num . ". " . $song["name"] . "</p>"; $track_num += 1; } ?> <?php $track = getRandomTrack($info); $preview = getTrackPreview($track); ?> </div> </div> <div class="audio"> <audio src="<?php echo $preview; ?> " preload="none" /> </div> <div class="spotify-url"><a href="<?php echo getTrackURL($track); ?> " target="_blank"></a></div> </div>