mirror of
https://github.com/SuperBFG7/ympd
synced 2025-10-23 18:07:42 +00:00
Merge remote-tracking branch 'origin/send-message'
This commit is contained in:
@@ -561,6 +561,8 @@ function webSocketConnect() {
|
||||
$('#album').text("");
|
||||
$('#artist').text("");
|
||||
|
||||
$('#btnlove').removeClass("active");
|
||||
|
||||
$('#currenttrack').text(" " + obj.data.title);
|
||||
var notification = "<strong><h4>" + obj.data.title + "</h4></strong>";
|
||||
|
||||
@@ -759,6 +761,14 @@ function basename(path) {
|
||||
return path.split('/').reverse()[0];
|
||||
}
|
||||
|
||||
function clickLove() {
|
||||
socket.send("MPD_API_SEND_MESSAGE,mpdas," + ($('#btnlove').hasClass('active') ? "unlove" : "love"));
|
||||
if ( $('#btnlove').hasClass('active') )
|
||||
$('#btnlove').removeClass("active");
|
||||
else
|
||||
$('#btnlove').addClass("active");
|
||||
}
|
||||
|
||||
$('#btnrandom').on('click', function (e) {
|
||||
socket.send("MPD_API_TOGGLE_RANDOM," + ($(this).hasClass('active') ? 0 : 1));
|
||||
|
||||
|
Reference in New Issue
Block a user