diff --git a/mstream.js b/mstream.js index 1636437..d28a884 100755 --- a/mstream.js +++ b/mstream.js @@ -1,7 +1,6 @@ const winston = require('winston'); const express = require('express'); const fs = require('fs'); -const path = require('path'); const bodyParser = require('body-parser'); const jukebox = require('./modules/jukebox.js'); @@ -56,7 +55,6 @@ exports.serveIt = async configFile => { }); // Give access to public folder - mstream.use('/public', express.static(path.join(__dirname, 'public'))); mstream.use('/', express.static(config.program.webAppDirectory)); // JukeBox diff --git a/public/img/default.png b/webapp/assets/img/default.png similarity index 100% rename from public/img/default.png rename to webapp/assets/img/default.png diff --git a/public/img/drag-handle.svg b/webapp/assets/img/drag-handle.svg similarity index 100% rename from public/img/drag-handle.svg rename to webapp/assets/img/drag-handle.svg diff --git a/public/img/folder.svg b/webapp/assets/img/folder.svg similarity index 100% rename from public/img/folder.svg rename to webapp/assets/img/folder.svg diff --git a/public/img/loading.gif b/webapp/assets/img/loading.gif similarity index 100% rename from public/img/loading.gif rename to webapp/assets/img/loading.gif diff --git a/public/img/mstream-icon.svg b/webapp/assets/img/mstream-icon.svg similarity index 100% rename from public/img/mstream-icon.svg rename to webapp/assets/img/mstream-icon.svg diff --git a/public/img/mstream-logo.png b/webapp/assets/img/mstream-logo.png old mode 100755 new mode 100644 similarity index 100% rename from public/img/mstream-logo.png rename to webapp/assets/img/mstream-logo.png diff --git a/public/img/mstream-logo.svg b/webapp/assets/img/mstream-logo.svg similarity index 100% rename from public/img/mstream-logo.svg rename to webapp/assets/img/mstream-logo.svg diff --git a/public/img/music-note.svg b/webapp/assets/img/music-note.svg similarity index 100% rename from public/img/music-note.svg rename to webapp/assets/img/music-note.svg diff --git a/public/img/pause-white.svg b/webapp/assets/img/pause-white.svg similarity index 100% rename from public/img/pause-white.svg rename to webapp/assets/img/pause-white.svg diff --git a/public/img/play-white.svg b/webapp/assets/img/play-white.svg similarity index 100% rename from public/img/play-white.svg rename to webapp/assets/img/play-white.svg diff --git a/public/img/spinner.svg b/webapp/assets/img/spinner.svg similarity index 100% rename from public/img/spinner.svg rename to webapp/assets/img/spinner.svg diff --git a/public/img/star.svg b/webapp/assets/img/star.svg similarity index 100% rename from public/img/star.svg rename to webapp/assets/img/star.svg diff --git a/public/img/struckaxiom.png b/webapp/assets/img/struckaxiom.png old mode 100755 new mode 100644 similarity index 100% rename from public/img/struckaxiom.png rename to webapp/assets/img/struckaxiom.png diff --git a/public/img/struckaxiom_@2X.png b/webapp/assets/img/struckaxiom_@2X.png old mode 100755 new mode 100644 similarity index 100% rename from public/img/struckaxiom_@2X.png rename to webapp/assets/img/struckaxiom_@2X.png diff --git a/public/img/volume-mute.svg b/webapp/assets/img/volume-mute.svg similarity index 100% rename from public/img/volume-mute.svg rename to webapp/assets/img/volume-mute.svg diff --git a/public/img/volume.svg b/webapp/assets/img/volume.svg similarity index 100% rename from public/img/volume.svg rename to webapp/assets/img/volume.svg diff --git a/webapp/assets/js/mstream.js b/webapp/assets/js/mstream.js index b5be2f7..1a88fcf 100644 --- a/webapp/assets/js/mstream.js +++ b/webapp/assets/js/mstream.js @@ -34,7 +34,7 @@ function createFileplaylistHtml(dataDirectory) { } function createMusicfileHtml(fileLocation, title, titleClass) { - return '
' + title + '
'; + return '
' + title + '
'; } $(document).ready(function () { @@ -562,7 +562,7 @@ $(document).ready(function () { filelist += `
- + ${dir.name}
@@ -631,7 +631,7 @@ $(document).ready(function () { if (lowerCase.indexOf(searchVal.toLowerCase()) !== -1) { if (this.type === 'directory') { - filelist.push('
' + this.name + '
'); + filelist.push('
' + this.name + '
'); } else if (this.type === 'playlist') { filelist.push('
' + escapeHtml(this.name) + '
Delete
'); } else if (this.type === 'album') { @@ -641,18 +641,18 @@ $(document).ready(function () { if (this.album_art_file) { filelist.push('
' + albumString + '
'); } else { - filelist.push('
' + albumString + '
'); + filelist.push('
' + albumString + '
'); } } else if (this.type === 'artist') { filelist.push('
' + this.name + '
'); } else { if (programState[programState.length - 1].state === 'playlist') { if (!this.metadata || !this.metadata.title) { - filelist.push('
' + this.filepath + '
'); + filelist.push('
' + this.filepath + '
'); } else if (this.metadata['album-art']) { filelist.push('
' + this.metadata.artist + ' - ' + this.metadata.title + '
'); } else { - filelist.push('
' + this.metadata.artist + ' - ' + this.metadata.title + '
'); + filelist.push('
' + this.metadata.artist + ' - ' + this.metadata.title + '
'); } } else if (this.type == "m3u") { filelist.push(createFileplaylistHtml(this.name)); @@ -962,13 +962,13 @@ $(document).ready(function () { $.each(response, function (index, value) { if (!value.metadata || !value.metadata.title) { currentBrowsingList.push({ type: 'file', name: value.filepath, metadata: value.metadata }); - files.push('
' + value.filepath + '
remove
'); + files.push('
' + value.filepath + '
remove
'); } else if (value.metadata['album-art']) { currentBrowsingList.push({ type: 'file', name: value.metadata.artist + ' - ' + value.metadata.title, metadata: value.metadata }); files.push('
' + value.metadata.artist + ' - ' + value.metadata.title + '
remove
'); } else { currentBrowsingList.push({ type: 'file', name: value.metadata.artist + ' - ' + value.metadata.title, metadata: value.metadata }); - files.push('
' + value.metadata.artist + ' - ' + value.metadata.title + '
remove
'); + files.push('
' + value.metadata.artist + ' - ' + value.metadata.title + '
remove
'); } }); @@ -1071,10 +1071,10 @@ $(document).ready(function () { $.each(response, function () { if (this.metadata.title) { currentBrowsingList.push({ type: 'file', name: this.metadata.artist + ' - ' + this.metadata.title }) - filelist.push('
' + this.metadata.artist + ' - ' + this.metadata.title + '
'); + filelist.push('
' + this.metadata.artist + ' - ' + this.metadata.title + '
'); } else { currentBrowsingList.push({ type: 'file', name: this.metadata.filename }) - filelist.push('
' + this.metadata.filename + '
'); + filelist.push('
' + this.metadata.filename + '
'); } }); @@ -1114,7 +1114,7 @@ $(document).ready(function () { albums.push('
' + value.name + '
'); } else { currentBrowsingList.push({ type: 'album', name: value.name }); - albums.push('
' + value.name + '
'); + albums.push('
' + value.name + '
'); } }); @@ -1166,10 +1166,10 @@ $(document).ready(function () { $.each(response, function () { if (this.metadata.title) { currentBrowsingList.push({ type: 'file', name: this.metadata.title }) - filelist.push('
' + this.metadata.title + '
'); + filelist.push('
' + this.metadata.title + '
'); } else { currentBrowsingList.push({ type: 'file', name: this.metadata.filename }) - filelist.push('
' + this.metadata.filename + '
'); + filelist.push('
' + this.metadata.filename + '
'); } }); @@ -1248,7 +1248,7 @@ $(document).ready(function () { if (value.album_art_file) { albums.push('
' + albumString + '
'); } else { - albums.push('
' + albumString + '
'); + albums.push('
' + albumString + '
'); } currentBrowsingList.push({ type: 'album', name: value.name, artist: artist, album_art_file: value.album_art_file }) }); @@ -1300,13 +1300,13 @@ $(document).ready(function () { if (!value.metadata || !value.metadata.title) { currentBrowsingList.push({ type: 'file', name: value.filepath, metadata: value.metadata }); - files.push('
[' + rating + '] ' + value.filepath + ']
'); + files.push('
[' + rating + '] ' + value.filepath + ']
'); } else if (value.metadata['album-art']) { currentBrowsingList.push({ type: 'file', name: value.metadata.artist + ' - ' + value.metadata.title, metadata: value.metadata }); files.push('
[' + rating + '] ' + value.metadata.artist + ' - ' + value.metadata.title + '
'); } else { currentBrowsingList.push({ type: 'file', name: value.metadata.artist + ' - ' + value.metadata.title, metadata: value.metadata }); - files.push('
[' + rating + '] ' + value.metadata.artist + ' - ' + value.metadata.title + '
'); + files.push('
[' + rating + '] ' + value.metadata.artist + ' - ' + value.metadata.title + '
'); } }); @@ -1724,7 +1724,7 @@ $(document).ready(function () {

Jukebox Mode allows you to control this page remotely



\ \

\ - '; + '; } // Add the content diff --git a/webapp/assets/js/mstream.vue-player-controls.js b/webapp/assets/js/mstream.vue-player-controls.js index 7ec87ed..645453a 100644 --- a/webapp/assets/js/mstream.vue-player-controls.js +++ b/webapp/assets/js/mstream.vue-player-controls.js @@ -63,11 +63,11 @@ var VUEPLAYER = (function () { Vue.component('playlist-item', { template: '\
\ - {{ comtext }}\ + {{ comtext }}\
\ X\ \ - {{ratingNumber}}\ + {{ratingNumber}}\ \ \ \ @@ -244,10 +244,10 @@ var VUEPLAYER = (function () { }, computed: { imgsrc: function () { - return "/public/img/" + (this.playerStats.playing ? 'pause' : 'play') + "-white.svg"; + return "/assets/img/" + (this.playerStats.playing ? 'pause' : 'play') + "-white.svg"; }, volumeSrc: function () { - return "/public/img/" + (this.playerStats.volume !== 0 ? 'volume' : 'volume-mute') + ".svg"; + return "/assets/img/" + (this.playerStats.volume !== 0 ? 'volume' : 'volume-mute') + ".svg"; }, widthcss: function () { if (this.playerStats.duration === 0) { @@ -381,7 +381,7 @@ var VUEPLAYER = (function () { computed: { albumArtPath: function () { if (!this.meta['album-art']) { - return '/public/img/default.png'; + return '/assets/img/default.png'; } return '/album-art/' + this.meta['album-art'] + '?token=' + MSTREAMAPI.currentServer.token; } diff --git a/webapp/assets/js/mstream.vue.player.js b/webapp/assets/js/mstream.vue.player.js index 9a52720..dd27dd0 100644 --- a/webapp/assets/js/mstream.vue.player.js +++ b/webapp/assets/js/mstream.vue.player.js @@ -22,7 +22,7 @@ const VUEPLAYERCORE = (() => { }, albumArtPath: function () { if (!this.meta['album-art']) { - return '/public/img/default.png'; + return '/assets/img/default.png'; } return `/album-art/${this.meta['album-art']}?token=${MSTREAMPLAYER.getCurrentSong().authToken}`; }