mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-24 12:03:03 +00:00
#580 WIP
This commit is contained in:
parent
65f20dc837
commit
63a3bbafc1
4 changed files with 401 additions and 262 deletions
|
@ -26,7 +26,7 @@
|
|||
</b-navbar-nav>
|
||||
|
||||
<b-navbar-nav class="ml-auto mr-2">
|
||||
<b-img :src="getAvatar()" rounded="circle" alt="Circle image" width="32" height="32" class="m1"></b-img>
|
||||
<b-img :src="getAvatar()" rounded="circle" alt="Circle image" width="32" height="32" class="m1"></b-img>
|
||||
</b-navbar-nav>
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
|
||||
|
||||
|
||||
<!--
|
||||
<!--
|
||||
<section class="hero is-dark is-small">
|
||||
<div class="hero-body">
|
||||
<div class="level">
|
||||
|
@ -52,7 +52,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="level-item">
|
||||
<div class="select is-dark">
|
||||
<div class="select is-dark">
|
||||
<b-select v-bind:placeholder="$t('Common.SelServer')"
|
||||
v-model="selectedOption"
|
||||
@input="selected">
|
||||
|
@ -64,7 +64,7 @@
|
|||
</option>
|
||||
</b-select>
|
||||
</div>
|
||||
<b-button id="sync-button" @click="fetchServers" type="is-warning"
|
||||
<b-button id="sync-button" @click="fetchServers" type="is-warning"
|
||||
icon-left="fas fa-sync" icon-pack="fas" class="is-pulled-right" >
|
||||
</b-button>
|
||||
</div>
|
||||
|
@ -105,8 +105,8 @@ export default {
|
|||
this.active = e;
|
||||
},
|
||||
selected: function () {
|
||||
log.info(`[Headers.vue] (selected) Selected server: ${this.selectedOption.name}`)
|
||||
ptv.checkServerConnect(this.selectedOption)
|
||||
log.info(`[Headers.vue] (selected) Selected server: ${this.selectedOption.name}`);
|
||||
ptv.checkServerConnect(this.selectedOption);
|
||||
this.$store.commit("UPDATE_SELECTED_SERVER", this.selectedOption);
|
||||
},
|
||||
onChange(event) {
|
||||
|
|
|
@ -130,7 +130,9 @@
|
|||
import statusDiv from '../General/status.vue';
|
||||
import { status } from '../General/status';
|
||||
import WTNGttlabel from '../General/wtng-ttlabel.vue'
|
||||
//import { ptv } from '../General/plextv';
|
||||
const log = require("electron-log");
|
||||
//const {JSONPath} = require('jsonpath-plus');
|
||||
export default {
|
||||
components: {
|
||||
statusDiv,
|
||||
|
@ -262,11 +264,28 @@
|
|||
if ( wtconfig.get("Developer.ET.Prefill")) {
|
||||
/* We should req. the following in the json under Developer.ET:
|
||||
See docs/dev/Sample conf file...
|
||||
KNOWN ISSUE!!!! Server selector in the header is not updated
|
||||
*/
|
||||
|
||||
log.debug(`[Export.vue] (created) DEV Mode on: We prefill ET screen`);
|
||||
const active = wtconfig.get("Developer.ET.Active");
|
||||
log.debug(`[Export.vue] (created) Active fill profile is: ${active}`);
|
||||
|
||||
/*
|
||||
// Get servers avail
|
||||
const PMSServers = this.$store.getters.getPlexServers;
|
||||
// Get info for the one we want
|
||||
const selectedServerInfo = JSONPath({path: `$..[?(@.name=="${wtconfig.get(`Developer.ET.Settings.${active}.Server`)}")]`, json: PMSServers})[0];
|
||||
console.log('Ged 889', JSON.stringify(selectedServerInfo))
|
||||
// Get address of the server
|
||||
await ptv.checkServerConnect(selectedServerInfo);
|
||||
|
||||
|
||||
// Update store with the info
|
||||
//this.$store.commit("UPDATE_SELECTED_SERVER", JSONPath({path: `$..[?(@.name=="${wtconfig.get(`Developer.ET.Settings.${active}.Server`)}")]`, json: PMSServers})[0]);
|
||||
this.$store.commit("UPDATE_SELECTED_SERVER", selectedServerInfo);
|
||||
*/
|
||||
|
||||
// Now populate the form
|
||||
this.selMediaType = etHelper.ETmediaType[wtconfig.get(`Developer.ET.Settings.${active}.TypeName`)];
|
||||
etHelper.Settings.fileMajor = wtconfig.get(`Developer.ET.Settings.${active}.TypeName`);
|
||||
this.selExpTypeMain = this.selMediaType;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -662,7 +662,6 @@ const etHelper = new class ETHELPER {
|
|||
}
|
||||
break;
|
||||
case "Missing":
|
||||
console.log('Ged 44-3 Hit Missing')
|
||||
retVal = i18n.t('Common.Ok');
|
||||
if ( this.Settings.showInfo['Episode Count (Cloud)'] != this.Settings.showInfo['Episode Count (PMS)']){
|
||||
retVal = "Episode mismatch"
|
||||
|
@ -1637,7 +1636,8 @@ const etHelper = new class ETHELPER {
|
|||
var fieldDef = JSONPath({path: '$.fields.' + this.Settings.fields[x], json: defFields})[0];
|
||||
rowEntryJSON["name"] = this.Settings.fields[x];
|
||||
rowEntryJSON["value"] = (JSONPath({path: fieldDef["key"], json: data})[0]);
|
||||
rowEntryJSON["type"] = fieldDef["type"];
|
||||
//rowEntryJSON["value"] = (JSONPath({path: fieldDef["key"], json: data}));
|
||||
rowEntryJSON["type"] = String(fieldDef["type"]);
|
||||
rowEntryJSON["subType"] = fieldDef["subtype"];
|
||||
rowEntryJSON["subKey"] = fieldDef["subkey"];
|
||||
rowEntryJSON["postProcess"] = fieldDef["postProcess"];
|
||||
|
@ -1645,12 +1645,12 @@ const etHelper = new class ETHELPER {
|
|||
let tmpValue, tmpArr;
|
||||
switch(rowEntryJSON["type"]) {
|
||||
case "array":
|
||||
tmpValue = JSONPath({path: rowEntryJSON["subKey"], json: rowEntryJSON["value"]});
|
||||
tmpArr = [];
|
||||
switch(rowEntryJSON["subType"]) {
|
||||
case "string":
|
||||
for (const idx in tmpValue){
|
||||
tmpArr.push(tmpValue[idx]);
|
||||
rowEntryJSON["value"] = (JSONPath({path: fieldDef["key"], json: data}));
|
||||
for (const idx in rowEntryJSON["value"]){
|
||||
tmpArr.push(rowEntryJSON["value"][idx]);
|
||||
}
|
||||
break;
|
||||
case "time":
|
||||
|
@ -1674,7 +1674,6 @@ const etHelper = new class ETHELPER {
|
|||
|
||||
if (fieldDef["postProcess"]){
|
||||
if ( rowEntryJSON["value"] ){
|
||||
console.log('Ged 7-3 Need to do post process')
|
||||
const title = JSONPath({path: String('$.title'), json: data})[0];
|
||||
log.silly(`[ethelper.js] (addRowToTmpJSON) DoPostProcess needed - Name is: ${rowEntryJSON["name"]} - Title is: ${title} - Val is: ${rowEntryJSON["value"]}`);
|
||||
rowEntryJSON["value"] = await this.postProcessJSON( {name: rowEntryJSON["name"], val: rowEntryJSON["value"], title: title, data: data} );
|
||||
|
@ -2475,9 +2474,6 @@ const etHelper = new class ETHELPER {
|
|||
catch (error){
|
||||
log.error(`[etHelper] (createOutFile) Exception happened when creating xlsx stream as: ${error}`);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
var sectionData, x;
|
||||
|
|
Loading…
Reference in a new issue