mirror of
https://github.com/SuperBFG7/ympd
synced 2025-01-12 10:20:34 +00:00
added shuffle queue function
This commit is contained in:
parent
de23d4d040
commit
222ee460d6
@ -112,12 +112,15 @@
|
||||
</button>
|
||||
</div>
|
||||
<div id="queue-actions" class="btn-group mr-2">
|
||||
<button type="button" class="btn btn-secondary" onclick="socket.send('MPD_API_SEND_SHUFFLE');" title="Shuffle queue">
|
||||
<span class="material-icons">shuffle</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="socket.send('MPD_API_RM_ALL');" title="Clear queue">
|
||||
<span class="material-icons">clear_all</span>
|
||||
</button>
|
||||
<a href="#" data-toggle="modal" data-target="#savequeue" class="btn btn-secondary" title="Save queue">
|
||||
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#savequeue" title="Save queue">
|
||||
<span class="material-icons">save</span>
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -248,6 +248,9 @@ out_save_queue:
|
||||
out_search:
|
||||
free(p_charbuf);
|
||||
break;
|
||||
case MPD_API_SEND_SHUFFLE:
|
||||
mpd_run_shuffle(mpd.conn);
|
||||
break;
|
||||
case MPD_API_SEND_MESSAGE:
|
||||
p_charbuf = strdup(c->content);
|
||||
if(strcmp(strtok(p_charbuf, ","), "MPD_API_SEND_MESSAGE"))
|
||||
|
@ -71,7 +71,8 @@
|
||||
X(MPD_API_TOGGLE_SINGLE) \
|
||||
X(MPD_API_TOGGLE_CROSSFADE) \
|
||||
X(MPD_API_TOGGLE_REPEAT) \
|
||||
X(MPD_API_GET_OPTIONS)
|
||||
X(MPD_API_GET_OPTIONS) \
|
||||
X(MPD_API_SEND_SHUFFLE)
|
||||
|
||||
enum mpd_cmd_ids {
|
||||
MPD_CMDS(GEN_ENUM)
|
||||
|
Loading…
Reference in New Issue
Block a user