mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-17 07:21:29 +03:00
Subscriptions with the same URL can now be added as long as the new subscription is named
This commit is contained in:
@@ -40,9 +40,9 @@ async function subscribe(sub, user_uid = null) {
|
|||||||
else
|
else
|
||||||
url_exists = !!db.get('subscriptions').find({url: sub.url}).value();
|
url_exists = !!db.get('subscriptions').find({url: sub.url}).value();
|
||||||
|
|
||||||
if (url_exists) {
|
if (!sub.name && url_exists) {
|
||||||
logger.info('Sub already exists');
|
logger.error(`Sub with the same URL already exists -- please provide a custom name for this new subscription.`);
|
||||||
result_obj.error = 'Subcription with URL ' + sub.url + ' already exists!';
|
result_obj.error = 'Subcription with URL ' + sub.url + ' already exists! Custom name is required.';
|
||||||
resolve(result_obj);
|
resolve(result_obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user