Skip to content
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.

Commit

Permalink
Upon loading a playlist automatically start playing the queue if not …
Browse files Browse the repository at this point in the history
…already - This cuts down the amount of interactions required when driving offroad
  • Loading branch information
anthony-mills committed Jan 18, 2017
1 parent c085bc2 commit 8700293
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions www/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,13 @@ angular.module('landcruiser.controllers', [])
mpdClient.loadPlaylistIntoQueue(playlistPath);

growl.success("Playlist loaded to queue");

// Get the play state if music is not already playing start the playlist
var playState = mpdClient.getPlaystate();

if ( playState === 'stop' ) {
mpdClient.play();
}
}
})

Expand Down

0 comments on commit 8700293

Please sign in to comment.