mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-12 11:01:30 +03:00
Added scaffolding for tags
This commit is contained in:
@@ -101,6 +101,26 @@ function applyCategoryRules(file_json, rules, category_name) {
|
|||||||
return rules_apply;
|
return rules_apply;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function addTagToVideo(tag, video, user_uid) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async function removeTagFromVideo(tag, video, user_uid) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async function incrementTagCount(tag) {
|
||||||
|
const current_value = db.get(`stats.tags.${tag}`).value();
|
||||||
|
if (!current_value) {
|
||||||
|
db.set(`stats.tags.${tag}`, 1).write();
|
||||||
|
} else {
|
||||||
|
db.update(`stats.tags.${tag}`, n => n + 1).write();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function decrementTagCount(tag) {
|
||||||
|
db.update(`stats.tags.${tag}`, n => n - 1).write();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
Reference in New Issue
Block a user