Add tracklist single mode
This commit is contained in:
parent
7322aa40d7
commit
b19d275b6c
@ -442,6 +442,7 @@
|
||||
<a href="#" onclick="doRandom(); return false" title="Random"><i class="fa fa-random" id="randombt"></i></a>
|
||||
<a href="#" onclick="doRepeat(); return false" title="Repeat"><i class="fa fa-repeat" id="repeatbt"></i></a>
|
||||
<a href="#" onclick="doConsume(); return false" title="Consume"><i class="fa fa-cutlery" id="consumebt"></i></a>
|
||||
<a href="#" onclick="doSingle(); return false" title="Single"><i class="fa fa-dot-circle-o" id="singlebt"></i></a>
|
||||
<a href="#" onclick="doShuffle(); return false" title="Shuffle"><i class="fa fa-arrows-v" id="shufflebt"></i></a>
|
||||
</p>
|
||||
|
||||
|
||||
10
mopidy_musicbox_webclient/static/js/controls.js
vendored
10
mopidy_musicbox_webclient/static/js/controls.js
vendored
@ -335,6 +335,12 @@ function setConsume(nwconsume) {
|
||||
}
|
||||
}
|
||||
|
||||
function setSingle(nwsingle) {
|
||||
if (single != nwsingle) {
|
||||
single = setTracklistOption("single", nwsingle);
|
||||
}
|
||||
}
|
||||
|
||||
function doRandom() {
|
||||
mopidy.tracklist.setRandom(!random).then();
|
||||
}
|
||||
@ -347,6 +353,10 @@ function doConsume() {
|
||||
mopidy.tracklist.setConsume(!consume).then();
|
||||
}
|
||||
|
||||
function doSingle() {
|
||||
mopidy.tracklist.setSingle(!single).then();
|
||||
}
|
||||
|
||||
|
||||
/*********************
|
||||
* Track Slider
|
||||
|
||||
@ -17,6 +17,7 @@ var play = false;
|
||||
var random;
|
||||
var repeat;
|
||||
var consume;
|
||||
var single;
|
||||
var currentVolume = -1;
|
||||
var muteVolume = -1;
|
||||
var volumeChanging = false;
|
||||
|
||||
@ -345,6 +345,7 @@ function updateOptions() {
|
||||
mopidy.tracklist.getRepeat().then(processRepeat, console.error);
|
||||
mopidy.tracklist.getRandom().then(processRandom, console.error);
|
||||
mopidy.tracklist.getConsume().then(processConsume, console.error);
|
||||
mopidy.tracklist.getSingle().then(processSingle, console.error);
|
||||
}
|
||||
|
||||
//update everything as if reloaded
|
||||
|
||||
@ -42,6 +42,13 @@ function processConsume(data) {
|
||||
setConsume(data);
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
* process results of single
|
||||
*********************************************************/
|
||||
function processSingle(data) {
|
||||
setSingle(data);
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
* process results of current position
|
||||
*********************************************************/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user