mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-23 11:33:14 +00:00
Merge pull request #162 from WebTools-NG/#94-Export-Episodes-as-well
#94 Loglevels changed a tad
This commit is contained in:
commit
f6db5f808a
7 changed files with 16 additions and 16 deletions
|
@ -105,7 +105,7 @@ export default {
|
|||
this.active = e;
|
||||
},
|
||||
selected: function () {
|
||||
log.info('HEADER: selected server: ' + this.selectedOption.name)
|
||||
log.info('Selected server: ' + this.selectedOption.name)
|
||||
ptv.checkServerConnect(this.selectedOption)
|
||||
this.$store.commit("UPDATE_SELECTED_SERVER", this.selectedOption);
|
||||
},
|
||||
|
|
|
@ -261,7 +261,7 @@
|
|||
this.$store.dispatch("exportMedias");
|
||||
},
|
||||
async fetchSelection() {
|
||||
log.debug("fetchSelection");
|
||||
log.debug("fetchSelection started");
|
||||
let serverCheck = this.$store.getters.getSelectedServer;
|
||||
if (serverCheck !== "none") {
|
||||
log.debug("serverCheck is not null, running fetchSections ");
|
||||
|
|
|
@ -627,7 +627,7 @@ const excel2 = new class Excel {
|
|||
break;
|
||||
case "time":
|
||||
val = JSONPath({path: String(lookup), json: data});
|
||||
if ( typeof val !== 'undefined' && val )
|
||||
if ( typeof val !== 'undefined' && val && val != '')
|
||||
{
|
||||
seconds = '0' + (Math.round(val/1000)%60).toString();
|
||||
minutes = '0' + (Math.round((val/(1000 * 60))) % 60).toString();
|
||||
|
@ -637,7 +637,7 @@ const excel2 = new class Excel {
|
|||
}
|
||||
else
|
||||
{
|
||||
val = null
|
||||
val = wtconfig.get('ET.NotAvail', 'N/A')
|
||||
}
|
||||
break;
|
||||
case "datetime":
|
||||
|
|
|
@ -7,7 +7,7 @@ const ptv = new class PTV {
|
|||
constructor() {
|
||||
}
|
||||
async checkServerConnect(server) {
|
||||
log.info(`Checking address for server: ${server.name}`);
|
||||
log.verbose(`Checking address for server: ${server.name}`);
|
||||
// Set WaitState
|
||||
store.commit("UPDATE_PLEX_SELECTED_SERVER_STATUS", true);
|
||||
let PMSAddress = '';
|
||||
|
@ -16,7 +16,7 @@ const ptv = new class PTV {
|
|||
for (var i = 0; i < server.connections.length; i++) {
|
||||
//server.connections.forEach((val) => {
|
||||
let val = server.connections[i];
|
||||
log.info(`Checking: ${val.uri}`);
|
||||
log.verbose(`Checking: ${val.uri}`);
|
||||
let baseurl = val.uri;
|
||||
await axios.get(baseurl + '/identity', {
|
||||
headers: {
|
||||
|
@ -26,12 +26,12 @@ const ptv = new class PTV {
|
|||
})
|
||||
.then(response => {
|
||||
if(response.status == 200){
|
||||
log.info(`Address ${baseurl} is alive, so check if local`);
|
||||
log.verbose(`Address ${baseurl} is alive, so check if local`);
|
||||
if ( val.local == true){
|
||||
log.info(`It's a local server, so need to check if correct one`);
|
||||
log.verbose(`It's a local server, so need to check if correct one`);
|
||||
const machineIdentifier = response.data['MediaContainer']['machineIdentifier'];
|
||||
if (machineIdentifier == server.clientIdentifier){
|
||||
log.info(`Local server found as: ${baseurl}`);
|
||||
log.verbose(`Local server found as: ${baseurl}`);
|
||||
PMSAddress = baseurl;
|
||||
local = true;
|
||||
}
|
||||
|
@ -41,10 +41,10 @@ const ptv = new class PTV {
|
|||
// only if we didn't find the local one?
|
||||
if ( local == false)
|
||||
{
|
||||
log.info(`No local server found yet, so checking ${baseurl}`)
|
||||
log.verbose(`No local server found yet, so checking ${baseurl}`)
|
||||
const machineIdentifier = response.data['MediaContainer']['machineIdentifier'];
|
||||
if (machineIdentifier == server.clientIdentifier){
|
||||
log.info(`Remote server found as: ${baseurl}`);
|
||||
log.verbose(`Remote server found as: ${baseurl}`);
|
||||
PMSAddress = baseurl;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -174,8 +174,8 @@ const wtutils = new class WTUtils {
|
|||
}
|
||||
|
||||
UpdateConfigFile() {
|
||||
// Update config file with defaults if missing
|
||||
console.log('Updating config file')
|
||||
// Update config file with defaults if missing
|
||||
log.verbose('Updating config file');
|
||||
// General section
|
||||
if ( wtconfig.get('General.username', 'N/A') == 'N/A' ){
|
||||
wtconfig.set('General.username', '')
|
||||
|
|
|
@ -47,11 +47,11 @@ if (wtconfig.get("general.version", "") != wtutils.AppVersion){
|
|||
i18n.locale = wtconfig.get('General.language', 'en')
|
||||
|
||||
// App Menu Bar
|
||||
log.info('Starting to build App Menu')
|
||||
log.verbose('Starting to build App Menu')
|
||||
const menuTemplate = require('./components/layout/script/menubar')
|
||||
const menu = require('electron').remote.Menu.buildFromTemplate(menuTemplate.default)
|
||||
require('electron').remote.Menu.setApplicationMenu(menu)
|
||||
log.info('App Menu builded')
|
||||
log.verbose('App Menu builded')
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ const actions = {
|
|||
pmsServer['accessToken'] = req.accessToken;
|
||||
pmsServer['connections'] = req.connections;
|
||||
pmsServer['clientIdentifier'] = req.clientIdentifier
|
||||
log.verbose('fetchPlexServers : See not owned servers as well')
|
||||
log.debug('fetchPlexServers : See not owned servers as well')
|
||||
result.push(pmsServer);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue