Added support for generate NFO files for Kodi

Minor UI updates to settings
This commit is contained in:
Isaac Abadi
2021-09-22 19:27:25 -06:00
parent ec7f04552f
commit 562eaa1b9b
12 changed files with 197 additions and 59 deletions

View File

@@ -339,4 +339,14 @@ describe('Downloader', function() {
const args = await downloader_api.generateArgs(url, 'video', sub_options, 'admin');
console.log(args);
});
it('Generate kodi NFO file', async function() {
const nfo_file_path = './test/sample.nfo';
if (fs.existsSync(nfo_file_path)) {
fs.unlinkSync(nfo_file_path);
}
const sample_json = fs.readJSONSync('./test/sample.info.json');
downloader_api.generateNFOFile(sample_json, nfo_file_path);
assert(fs.existsSync(nfo_file_path), true);
});
});