mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2025-02-18 12:28:26 +00:00
Merge pull request #260 from WebTools-NG/#255-warn-if-no-output-dir
Fixed #255
This commit is contained in:
commit
88938de310
4 changed files with 55 additions and 7 deletions
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
* [#257 Plex.TV Export notify when done](https://github.com/WebTools-NG/WebTools-NG/issues/257)
|
* [#257 Plex.TV Export notify when done](https://github.com/WebTools-NG/WebTools-NG/issues/257)
|
||||||
* [#256 PMS Export notify when done](https://github.com/WebTools-NG/WebTools-NG/issues/256)
|
* [#256 PMS Export notify when done](https://github.com/WebTools-NG/WebTools-NG/issues/256)
|
||||||
|
* [#255 Warn if no output dir](https://github.com/WebTools-NG/WebTools-NG/issues/255)
|
||||||
|
|
||||||
## V0.1.15
|
## V0.1.15
|
||||||
|
|
||||||
|
|
|
@ -160,6 +160,18 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
exportSettings: async function(){
|
exportSettings: async function(){
|
||||||
|
if (wtconfig.get('General.ExportPath', "") == "")
|
||||||
|
{
|
||||||
|
log.info('ET: No output dir defined')
|
||||||
|
this.$bvToast.toast(this.$t("Common.ErrorNoOutDirMsg"), {
|
||||||
|
title: this.$t("Common.ErrorNoOutDirTitle"),
|
||||||
|
autoHideDelay: 3000,
|
||||||
|
solid: true,
|
||||||
|
variant: 'primary',
|
||||||
|
toaster: 'b-toaster-bottom-right'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
log.info(`Export Group Settings: ${this.selSection}`);
|
log.info(`Export Group Settings: ${this.selSection}`);
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const dirPath = path.join(i18n.t("Modules.PMS.Name"), i18n.t("Modules.PMS.Settings.Settings"));
|
const dirPath = path.join(i18n.t("Modules.PMS.Name"), i18n.t("Modules.PMS.Settings.Settings"));
|
||||||
|
@ -174,6 +186,18 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
exportAllSettings: async function(){
|
exportAllSettings: async function(){
|
||||||
|
if (wtconfig.get('General.ExportPath', "") == "")
|
||||||
|
{
|
||||||
|
log.info('ET: No output dir defined')
|
||||||
|
this.$bvToast.toast(this.$t("Common.ErrorNoOutDirMsg"), {
|
||||||
|
title: this.$t("Common.ErrorNoOutDirTitle"),
|
||||||
|
autoHideDelay: 3000,
|
||||||
|
solid: true,
|
||||||
|
variant: 'primary',
|
||||||
|
toaster: 'b-toaster-bottom-right'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
log.info(`Export All Settings: ${this.selSection}`);
|
log.info(`Export All Settings: ${this.selSection}`);
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const dirPath = path.join(i18n.t("Modules.PMS.Name"), i18n.t("Modules.PMS.Settings.Settings"));
|
const dirPath = path.join(i18n.t("Modules.PMS.Name"), i18n.t("Modules.PMS.Settings.Settings"));
|
||||||
|
|
|
@ -64,8 +64,7 @@
|
||||||
import store from '../../../store';
|
import store from '../../../store';
|
||||||
import { plextv } from "./scripts/plextv";
|
import { plextv } from "./scripts/plextv";
|
||||||
import i18n from '../../../i18n';
|
import i18n from '../../../i18n';
|
||||||
|
import { wtconfig } from '../General/wtutils';
|
||||||
plextv
|
|
||||||
|
|
||||||
const log = require("electron-log");
|
const log = require("electron-log");
|
||||||
export default {
|
export default {
|
||||||
|
@ -108,6 +107,18 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
exportUsr: async function(){
|
exportUsr: async function(){
|
||||||
|
if (wtconfig.get('General.ExportPath', "") == "")
|
||||||
|
{
|
||||||
|
log.info('ET: No output dir defined')
|
||||||
|
this.$bvToast.toast(this.$t("Common.ErrorNoOutDirMsg"), {
|
||||||
|
title: this.$t("Common.ErrorNoOutDirTitle"),
|
||||||
|
autoHideDelay: 3000,
|
||||||
|
solid: true,
|
||||||
|
variant: 'primary',
|
||||||
|
toaster: 'b-toaster-bottom-right'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
log.info(`Export Plex.TV User: ${this.usrName}`);
|
log.info(`Export Plex.TV User: ${this.usrName}`);
|
||||||
let Data = this.selUserDetails;
|
let Data = this.selUserDetails;
|
||||||
const outFile = await plextv.exportUsr({Module: i18n.t("Modules.PlexTV.Name"), Usr: this.usrID, Data: Data});
|
const outFile = await plextv.exportUsr({Module: i18n.t("Modules.PlexTV.Name"), Usr: this.usrID, Data: Data});
|
||||||
|
@ -121,6 +132,18 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
exportAllUsr: async function(){
|
exportAllUsr: async function(){
|
||||||
|
if (wtconfig.get('General.ExportPath', "") == "")
|
||||||
|
{
|
||||||
|
log.info('ET: No output dir defined')
|
||||||
|
this.$bvToast.toast(this.$t("Common.ErrorNoOutDirMsg"), {
|
||||||
|
title: this.$t("Common.ErrorNoOutDirTitle"),
|
||||||
|
autoHideDelay: 3000,
|
||||||
|
solid: true,
|
||||||
|
variant: 'primary',
|
||||||
|
toaster: 'b-toaster-bottom-right'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
log.info(`Export All Plex.TV Users`)
|
log.info(`Export All Plex.TV Users`)
|
||||||
let Data = this.$store.getters.getUsers;
|
let Data = this.$store.getters.getUsers;
|
||||||
const outFile = await plextv.exportUsr({Module: i18n.t("Modules.PlexTV.Name"), Usr: 'All', Data: Data});
|
const outFile = await plextv.exportUsr({Module: i18n.t("Modules.PlexTV.Name"), Usr: 'All', Data: Data});
|
||||||
|
|
Loading…
Add table
Reference in a new issue