diff --git a/webapp/alpha/m.js b/webapp/alpha/m.js
index 8b219d5..a80c10b 100644
--- a/webapp/alpha/m.js
+++ b/webapp/alpha/m.js
@@ -473,6 +473,7 @@ async function init() {
document.getElementById('set_live_playlist').classList.remove('green');
document.getElementById('set_live_playlist').classList.add('blue');
document.getElementById('set_live_playlist').value = 'Disable Live Playlist';
+ document.getElementById('live-playlist-hide-these').hidden = true;
}
}catch(err) {}
@@ -868,6 +869,16 @@ async function setLivePlaylist() {
try{
document.getElementById('set_live_playlist').disabled = true;
+ if (VUEPLAYERCORE.livePlaylist.name !== false) {
+ VUEPLAYERCORE.livePlaylist.name = false;
+ document.getElementById('set_live_playlist').classList.remove('blue');
+ document.getElementById('set_live_playlist').classList.add('green');
+ document.getElementById('set_live_playlist').value = 'Enable Live Playlist';
+ document.getElementById('live-playlist-hide-these').hidden = false;
+ myModal.close();
+ return;
+ }
+
let livePlaylistName;
if (document.getElementById('radio-use-existing').checked === true) {
@@ -893,38 +904,32 @@ async function setLivePlaylist() {
localStorage.removeItem('live-playlist-auto-start');
}
- if (VUEPLAYERCORE.livePlaylist.name !== false) {
- VUEPLAYERCORE.livePlaylist.name = false;
- document.getElementById('set_live_playlist').classList.remove('blue');
- document.getElementById('set_live_playlist').classList.add('green');
- document.getElementById('set_live_playlist').value = 'Enable Live Playlist';
+ // set live var
+ VUEPLAYERCORE.livePlaylist.name = livePlaylistName;
+
+ // get current playlist
+ const response = await MSTREAMAPI.loadPlaylist(VUEPLAYERCORE.livePlaylist.name);
+
+ // set the queue to the current playlist
+ if (response.length > 0) {
+ MSTREAMPLAYER.clearPlaylist();
+ response.forEach(value => {
+ VUEPLAYERCORE.addSongWizard(value.filepath, value.metadata, false, undefined, false, true);
+ });
} else {
- // set live var
- VUEPLAYERCORE.livePlaylist.name = livePlaylistName;
-
- // get current playlist
- const response = await MSTREAMAPI.loadPlaylist(VUEPLAYERCORE.livePlaylist.name);
-
- // set the queue to the current playlist
- if (response.length > 0) {
- MSTREAMPLAYER.clearPlaylist();
- response.forEach(value => {
- VUEPLAYERCORE.addSongWizard(value.filepath, value.metadata, false, undefined, false, true);
- });
- } else {
- // save current queue
- const songs = [];
- for (let i = 0; i < MSTREAMPLAYER.playlist.length; i++) {
- songs.push(MSTREAMPLAYER.playlist[i].filepath);
- }
- MSTREAMAPI.savePlaylist(livePlaylistName, songs, true);
+ // save current queue
+ const songs = [];
+ for (let i = 0; i < MSTREAMPLAYER.playlist.length; i++) {
+ songs.push(MSTREAMPLAYER.playlist[i].filepath);
}
-
- document.getElementById('set_live_playlist').classList.remove('green');
- document.getElementById('set_live_playlist').classList.add('blue');
- document.getElementById('set_live_playlist').value = 'Disable Live Playlist';
+ MSTREAMAPI.savePlaylist(livePlaylistName, songs, true);
}
+ document.getElementById('set_live_playlist').classList.remove('green');
+ document.getElementById('set_live_playlist').classList.add('blue');
+ document.getElementById('set_live_playlist').value = 'Disable Live Playlist';
+ document.getElementById('live-playlist-hide-these').hidden = true;
+
// close modal
myModal.close();
} catch(err) {
diff --git a/webapp/index.html b/webapp/index.html
index a7a62aa..00f6d3c 100644
--- a/webapp/index.html
+++ b/webapp/index.html
@@ -171,26 +171,29 @@
-
- - -
++ + +
+ ++ +
++ + +
+- -
-- - -