mirror of
https://github.com/sakaljurgis/kodi-api-server.git
synced 2026-07-09 04:47:41 +00:00
add ability to download to multiple locations, based which one has more space
This commit is contained in:
@@ -6,19 +6,26 @@ export class VideoFilesConfig {
|
||||
}
|
||||
|
||||
public getVideoFilesFolders(): string[] {
|
||||
return [this.configService.getEnv('VIDEO_FILES_FOLDER')];
|
||||
const folders: string[] = [];
|
||||
Object.keys(process.env).forEach((key) => {
|
||||
if (key.startsWith('VIDEO_FILES_FOLDER') && process.env[key]) {
|
||||
folders.push(process.env[key]);
|
||||
}
|
||||
});
|
||||
|
||||
return folders;
|
||||
}
|
||||
|
||||
public getVideoFilesExt(): string[] {
|
||||
return JSON.parse(this.configService.getEnv('VIDEO_FILES_EXT'));
|
||||
return ['.mkv', '.mp4', '.avi'];
|
||||
}
|
||||
|
||||
public getPathPatternsToIgnore(): string[] {
|
||||
return JSON.parse(this.configService.getEnv('PATTERNS_TO_IGNORE'));
|
||||
}
|
||||
|
||||
public getTorrentDownloadDir(): string {
|
||||
return this.configService.getEnv('VIDEO_FILES_FOLDER');
|
||||
public getTorrentDownloadDirs(): string[] {
|
||||
return this.getVideoFilesFolders();
|
||||
}
|
||||
|
||||
public getTransmissionOptions() {
|
||||
|
||||
Reference in New Issue
Block a user