This commit is contained in:
Izuco 2022-03-17 17:57:39 +01:00
parent 8021dbea5e
commit ef054dafed
No known key found for this signature in database
GPG key ID: E9CBE9E4EF3A1BFA
5 changed files with 13 additions and 13 deletions

View file

@ -50,7 +50,7 @@ const template: (MenuItemConstructorOptions | MenuItem)[] = [
{
label: 'Open settings folder',
click: () => {
shell.openPath(path.join(getDataDirectory(), 'config'))
shell.openPath(path.join(getDataDirectory(), 'config'));
}
},
{
@ -59,20 +59,20 @@ const template: (MenuItemConstructorOptions | MenuItem)[] = [
{
label: 'FFmpeg/Mkvmerge path',
click: () => {
shell.openPath(path.join(getDataDirectory(), 'config', 'bin-path.yml'))
shell.openPath(path.join(getDataDirectory(), 'config', 'bin-path.yml'));
}
},
{
label: 'Advanced options',
sublabel: 'See the documention for the options you may enter here',
click: () => {
shell.openPath(path.join(getDataDirectory(), 'config', 'cli-defaults.yml'))
shell.openPath(path.join(getDataDirectory(), 'config', 'cli-defaults.yml'));
}
},
{
label: 'Output path',
click: () => {
shell.openPath(path.join(getDataDirectory(), 'config', 'dir-path.yml'))
shell.openPath(path.join(getDataDirectory(), 'config', 'dir-path.yml'));
}
}
]

View file

@ -36,7 +36,7 @@ class CrunchyHandler extends Base implements MessageHandler {
}
public async resolveItems(data: ResolveItemsData): Promise<ResponseBase<QueueItem[]>> {
console.log(`[DEBUG] Got resolve options: ${JSON.stringify(data)}`)
console.log(`[DEBUG] Got resolve options: ${JSON.stringify(data)}`);
const res = await this.crunchy.downloadFromSeriesID(data.id, data);
if (!res.isOk)
return res;
@ -56,7 +56,7 @@ class CrunchyHandler extends Base implements MessageHandler {
}
public async search(data: SearchData): Promise<SearchResponse> {
console.log(`[DEBUG] Got search options: ${JSON.stringify(data)}`)
console.log(`[DEBUG] Got search options: ${JSON.stringify(data)}`);
const crunchySearch = await this.crunchy.doSearch(data);
if (!crunchySearch.isOk)
return crunchySearch;
@ -76,7 +76,7 @@ class CrunchyHandler extends Base implements MessageHandler {
}
public async downloadItem(data: DownloadData) {
console.log(`[DEBUG] Got download options: ${JSON.stringify(data)}`)
console.log(`[DEBUG] Got download options: ${JSON.stringify(data)}`);
this.setDownloading(true);
const _default = buildDefault() as ArgvType;
const res = await this.crunchy.downloadFromSeriesID(data.id, {

View file

@ -52,7 +52,7 @@ class FunimationHandler extends Base implements MessageHandler {
}
public async resolveItems(data: ResolveItemsData): Promise<ResponseBase<QueueItem[]>> {
console.log(`[DEBUG] Got resolve options: ${JSON.stringify(data)}`)
console.log(`[DEBUG] Got resolve options: ${JSON.stringify(data)}`);
const res = await this.funi.getShow(false, { ...data, id: parseInt(data.id) });
if (!res.isOk)
return res;
@ -72,7 +72,7 @@ class FunimationHandler extends Base implements MessageHandler {
}
public async search(data: SearchData): Promise<SearchResponse> {
console.log(`[DEBUG] Got search options: ${JSON.stringify(data)}`)
console.log(`[DEBUG] Got search options: ${JSON.stringify(data)}`);
const funiSearch = await this.funi.searchShow(false, data);
if (!funiSearch.isOk)
return funiSearch;
@ -96,7 +96,7 @@ class FunimationHandler extends Base implements MessageHandler {
public async downloadItem(data: DownloadData) {
this.setDownloading(true);
console.log(`[DEBUG] Got download options: ${JSON.stringify(data)}`)
console.log(`[DEBUG] Got download options: ${JSON.stringify(data)}`);
const res = await this.funi.getShow(false, { all: false, but: false, id: parseInt(data.id), e: data.e });
const _default = buildDefault() as ArgvType;
if (!res.isOk)

View file

@ -24,8 +24,8 @@ export const ensureConfig = () => {
[binCfgFile, dirCfgFile, cliCfgFile].forEach(a => {
if (!fs.existsSync(`${a}.yml`))
fs.copyFileSync(path.join(__dirname, '..', 'config', `${path.basename(a)}.yml`), `${a}.yml`);
})
}
});
};
const loadYamlCfgFile = <T extends Record<string, any>>(file: string, isSess?: boolean): T => {
if(fs.existsSync(`${file}.user.yml`) && !isSess){

View file

@ -125,7 +125,7 @@ export default (async (force = false) => {
fs.writeFileSync(path.join(__dirname, '..', a.path), a.content);
console.log('✓ Written %s', a.path);
} catch (er) {
console.log('✗ Error while writing %s', a.path)
console.log('✗ Error while writing %s', a.path);
}
});