mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-21 17:03:20 +03:00
Minor categories refactor
This commit is contained in:
@@ -32,10 +32,8 @@ async function categorize(file_jsons) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < file_jsons.length; i++) {
|
for (const file_json of file_jsons) {
|
||||||
const file_json = file_jsons[i];
|
for (const category of categories) {
|
||||||
for (let j = 0; j < categories.length; j++) {
|
|
||||||
const category = categories[j];
|
|
||||||
const rules = category['rules'];
|
const rules = category['rules'];
|
||||||
|
|
||||||
// if rules for current category apply, then that is the selected category
|
// if rules for current category apply, then that is the selected category
|
||||||
|
|||||||
@@ -842,7 +842,7 @@ describe('Categories', async function() {
|
|||||||
rules: [],
|
rules: [],
|
||||||
custom_output: ''
|
custom_output: ''
|
||||||
};
|
};
|
||||||
|
await db_api.removeAllRecords('categories', {name: 'test_category'});
|
||||||
await db_api.insertRecordIntoTable('categories', new_category);
|
await db_api.insertRecordIntoTable('categories', new_category);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user