mirror of
https://github.com/SuperBFG7/ympd
synced 2025-10-20 08:37:39 +00:00
Feat: add rescan database command
This commit is contained in:
@@ -309,6 +309,16 @@ function appInit() {
|
||||
sendAPI({"cmd": "MPD_API_PLAYER_SEEK", "data": {"songid": currentSong.currentSongId, "seek": seekVal}});
|
||||
}
|
||||
}, false);
|
||||
|
||||
document.getElementById('navDBupdate').addEventListener('click', function(event) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
var icon = this.getElementsByTagName('span')[0];
|
||||
if (icon.innerText == 'keyboard_arrow_right')
|
||||
icon.innerText = 'keyboard_arrow_down';
|
||||
else
|
||||
icon.innerText = 'keyboard_arrow_right';
|
||||
}, false);
|
||||
|
||||
document.getElementById('volumeIcon').parentNode.addEventListener('show.bs.dropdown', function () {
|
||||
sendAPI({"cmd": "MPD_API_PLAYER_OUTPUT_LIST"}, parseOutputs);
|
||||
@@ -1840,6 +1850,11 @@ function updateDB() {
|
||||
updateDBstarted(true);
|
||||
}
|
||||
|
||||
function rescanDB() {
|
||||
sendAPI({"cmd": "MPD_API_DATABASE_RESCAN"});
|
||||
updateDBstarted(true);
|
||||
}
|
||||
|
||||
function updateDBstarted(showModal) {
|
||||
if (showModal == true) {
|
||||
document.getElementById('updateDBfinished').innerText = '';
|
||||
|
Reference in New Issue
Block a user