mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-22 11:03:13 +00:00
fixed #395
This commit is contained in:
parent
829ac9ab6b
commit
a6d716bf69
9 changed files with 38 additions and 17 deletions
|
@ -1,5 +1,9 @@
|
|||
# ![Logo](https://github.com/WebTools-NG/WebTools-NG/blob/master/src/assets/WebTools-48x48.png) WebTools-ng Change log
|
||||
|
||||
## V0.3.13
|
||||
|
||||
* [#395 Show alert if we can't connect to plex.tv](https://github.com/WebTools-NG/WebTools-NG/issues/395)
|
||||
|
||||
## V0.3.12
|
||||
|
||||
* [#382 Exporting Posters and Art not working (Revisit)](https://github.com/WebTools-NG/WebTools-NG/issues/382)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "webtools-ng",
|
||||
"productName": "WebTools-NG",
|
||||
"version": "0.3.12",
|
||||
"version": "0.3.13",
|
||||
"description": "WebTools Next Generation 4 Plex",
|
||||
"author": "dane22 & CPSO",
|
||||
"license": "MPL-2.0",
|
||||
|
|
|
@ -40,7 +40,9 @@
|
|||
"LoginBtn": "Sign in",
|
||||
"twoFA": "2Factor Authentication verification code",
|
||||
"twoFAPrompt": "If using 2FA, enter your code here, else leave as blank (optional)",
|
||||
"Missing2FACode": "Please enter the verification code"
|
||||
"Missing2FACode": "Please enter the verification code",
|
||||
"LoginConnectErrToken": "Could not connect to plex.tv with a Token",
|
||||
"LoginConnectErr": "Could not connect to plex.tv"
|
||||
},
|
||||
"SelServer": "Select Server",
|
||||
"Menu": {
|
||||
|
|
|
@ -30,6 +30,7 @@ function createWindow () {
|
|||
// Create the browser window.
|
||||
win = new BrowserWindow({ width: 1024, height: 768, icon: __dirname + "/../src/assets/WebTools-512.png", webPreferences: {
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false,
|
||||
webSecurity: false,
|
||||
enableRemoteModule: true
|
||||
} })
|
||||
|
|
|
@ -382,7 +382,12 @@
|
|||
this.selLibrary = '';
|
||||
this.selLibraryOptions = [];
|
||||
this.exportLevels = [];
|
||||
this.selExpTypeMain= arguments[0];
|
||||
this.selExpTypeMain = arguments[0];
|
||||
console.log('Ged 99: ' + JSON.stringify(arguments[0]))
|
||||
console.log('Ged 99-2: ' + JSON.stringify(et.selSecOption[arguments[0]]))
|
||||
console.log('Ged 99-3: ' + i18n.t('Modules.ET.optExpType.SecMovies'))
|
||||
console.log('Ged 99-4: ' + JSON.stringify(et.selSecOption2[arguments[0]]))
|
||||
|
||||
this.optExpTypeSec = et.selSecOption[arguments[0]]
|
||||
log.verbose(`Export Main type selected: ${arguments[0]}`);
|
||||
},
|
||||
|
|
|
@ -9,7 +9,9 @@ const defpostURI = '?checkFiles=1&includeRelated=0&includeExtras=1&includeBandwi
|
|||
import {wtconfig, wtutils} from '../../General/wtutils';
|
||||
import {csv} from './csv';
|
||||
import {etHelper} from './ethelper';
|
||||
import i18n from '../../../../i18n';
|
||||
//import i18n from '../../../../i18n';
|
||||
|
||||
import i18n from '../../../../i18n'
|
||||
|
||||
import {ipcRenderer} from 'electron';
|
||||
//const fs = require('fs');
|
||||
|
@ -75,6 +77,10 @@ const et = new class ET {
|
|||
2003: 'Photo',
|
||||
3001: 'Playlists'
|
||||
},
|
||||
this.selSecOption2 = {
|
||||
1: ['Modules.ET.optExpType.SecMovies'],
|
||||
2: ['Modules.ET.optExpType.SecTVEpisodes']
|
||||
}
|
||||
this.selSecOption = {
|
||||
1: [
|
||||
{
|
||||
|
@ -301,9 +307,7 @@ const et = new class ET {
|
|||
//await csv.addHeaderToTmp({ stream: stream, item: fields});
|
||||
// TODO: Add XLS Header
|
||||
}
|
||||
console.log('Ged 4-5')
|
||||
|
||||
|
||||
log.debug(`Got level as: ${etHelper.Settings.Level} and libType as: ${etHelper.Settings.libType}`)
|
||||
|
||||
// Get element and postURI
|
||||
|
@ -313,8 +317,7 @@ const et = new class ET {
|
|||
|
||||
element, postURI
|
||||
|
||||
console.log(`Ged 55-1 Element: ` + element)
|
||||
console.log(`Ged 55-2 postURI: ` + postURI)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ const etHelper = new class ETHELPER {
|
|||
default:
|
||||
element = '/library/sections/' + this.selLibKey + '/all';
|
||||
}
|
||||
log.debug(`Got element as ${element}`);
|
||||
return element;
|
||||
}
|
||||
|
||||
|
@ -104,6 +105,7 @@ const etHelper = new class ETHELPER {
|
|||
default:
|
||||
postURI = `?X-Plex-Container-Size=${step}&type=${this.Settings.libTypeSec}&${this.uriParams}&X-Plex-Container-Start=`;
|
||||
}
|
||||
log.debug(`Got postURI as ${postURI}`);
|
||||
return postURI;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,15 +8,15 @@ log.transports.file.fileName = wtutils.logFileName;
|
|||
|
||||
Vue.use(VueI18n)
|
||||
|
||||
function loadLocaleMessages () {
|
||||
function loadLocaleMessages () {
|
||||
wtutils.MoveToHome();
|
||||
const messages = {}
|
||||
const fs = require('fs')
|
||||
// Force read en lang, since it's the fallback
|
||||
const langCode = 'en'
|
||||
var langFile = wtutils.Home + '/locales/' + langCode + '.json'
|
||||
log.debug(`Loading language: ${langCode}`)
|
||||
messages[langCode] = JSON.parse(fs.readFileSync(langFile, 'utf8'));
|
||||
var langFile = wtutils.Home + '/locales/' + langCode + '.json'
|
||||
log.debug(`Loading language: ${langCode}`)
|
||||
messages[langCode] = JSON.parse(fs.readFileSync(langFile, 'utf8'));
|
||||
log.debug(`Defined language: ${wtconfig.get('General.language')}`)
|
||||
if (wtconfig.get('General.language', 'en') != 'en'){
|
||||
// We need to preload an additional language
|
||||
|
|
|
@ -173,7 +173,9 @@ const actions = {
|
|||
// The request was made but no response was received
|
||||
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
||||
// http.ClientRequest in node.js
|
||||
log.error('loginToPlex: ' + error.request)
|
||||
// log.error('loginToPlex: ' + error.request)
|
||||
log.error('Could not connect to plex.tv');
|
||||
alert(i18n.t('Common.Login.LoginConnectErr'));
|
||||
} else {
|
||||
// Something happened in setting up the request that triggered an Error
|
||||
log.error('loginToPlex: ' + error.message)
|
||||
|
@ -199,18 +201,20 @@ const actions = {
|
|||
if (error.response) {
|
||||
// The request was made and the server responded with a status code
|
||||
// that falls out of the range of 2xx
|
||||
log.error('loginToPlex: ' + error.response.status);
|
||||
log.error('loginToPlex: ' + JSON.stringify(error.response.data));
|
||||
log.error('loginToPlexToken1: ' + error.response.status);
|
||||
log.error('loginToPlexToken2: ' + JSON.stringify(error.response.data));
|
||||
alert(error.response.data.error)
|
||||
//this.danger(error.response.status, error.response.data.error);
|
||||
} else if (error.request) {
|
||||
// The request was made but no response was received
|
||||
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
||||
// http.ClientRequest in node.js
|
||||
log.error('loginToPlex: ' + error.request)
|
||||
// log.error('loginToPlexToken3: ' + JSON.stringify(error.request));
|
||||
log.error('Could not connect to plex.tv with a Token');
|
||||
alert(i18n.t('Common.Login.LoginConnectErrToken'));
|
||||
} else {
|
||||
// Something happened in setting up the request that triggered an Error
|
||||
log.error('loginToPlex: ' + error.message)
|
||||
log.error('loginToPlexToken4: ' + error.message)
|
||||
}})
|
||||
},
|
||||
updatingServerAddress({ commit}, status){
|
||||
|
|
Loading…
Reference in a new issue