Fixed some bugs

This commit is contained in:
IrosTheBeggar 2017-10-26 18:05:07 -04:00
parent 0fe0feffb7
commit 547709641f
5 changed files with 20 additions and 11 deletions

View File

@ -41,17 +41,19 @@ exports.setup = function(args){
program3.salt = program.salt;
}
program3.folders = {
'media': {root: program.musicdir}
}
// User account
if(program.user && program.password){
program3.users = {};
program3.users[program.user] = {
password:program.password,
musicDir:program.musicdir
};
password: program.password,
vpaths: ['media']
}
}else{
console.log('USER SYSTEM NOT ENABLED!');
// Store the musicDir to be used in setup
program3.musicDir = program.musicdir;
}
// db plugins

View File

@ -41,7 +41,6 @@ exports.setup = function(loadJson, rootDir){
}
}
console.log(loadJson.users)
if(!loadJson.users || typeof loadJson.users !== 'object'){
errorArray.push('No Users');
loadJson.error = errorArray;
@ -52,7 +51,6 @@ exports.setup = function(loadJson, rootDir){
if(typeof loadJson.users[user].vpaths === 'string'){
loadJson.users[user].vpaths = [loadJson.users[user].vpaths];
}
}
if(errorArray.length > 0){

View File

@ -12,7 +12,6 @@ if(process.versions['electron']){
var program;
try{
console.log(fs.readFileSync(process.argv[process.argv.length-1], "utf8"))
if(fe.extname(process.argv[process.argv.length-1]) === '.json' && fs.statSync(process.argv[process.argv.length-1]).isFile()){
let loadJson = JSON.parse(fs.readFileSync(process.argv[process.argv.length-1], 'utf8'));
program = require('./modules/configure-json-file.js').setup(loadJson, __dirname);

View File

@ -465,6 +465,16 @@ h3 {
supported by Chrome and Opera */
}
.autoselect{
-webkit-touch-callout: auto; /* iOS Safari */
-webkit-user-select: auto; /* Safari */
-khtml-user-select: auto; /* Konqueror HTML */
-moz-user-select: auto; /* Firefox */
-ms-user-select: auto; /* Internet Explorer/Edge */
user-select: auto; /* Non-prefixed version, currently
supported by Chrome and Opera */
}
.meta-box{

View File

@ -177,7 +177,7 @@ $(document).ready(function(){
fileExplorerArray = [];
fileExplorerScrollPosition = [];
if(MSTREAMAPI.currentServer.vpaths.length === 1){
if(MSTREAMAPI.currentServer.vpaths && MSTREAMAPI.currentServer.vpaths.length === 1){
fileExplorerArray.push(MSTREAMAPI.currentServer.vpaths[0]);
fileExplorerScrollPosition.push(0);
}
@ -759,7 +759,7 @@ $(document).ready(function(){
});
function createJukeboxPanel(){
var returnHtml = '<p class="jukebox-panel">';
var returnHtml = '<div class="jukebox-panel autoselect">';
if(JUKEBOX.stats.error !== false){
return returnHtml + 'An error occurred. Please refresh the page and try again</p>';
@ -775,7 +775,7 @@ $(document).ready(function(){
var adrs = window.location.protocol + '//' + window.location.host + '/remote';
returnHtml += '<br><h4>Remote Jukebox Controls: <a target="_blank" href="' + adrs + '"> ' + adrs + '</a><h4>';
return returnHtml + '</p>';
return returnHtml + '</div>';
}