mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-30 16:40:55 +03:00
Fixed error where sub with no videos would crash if none existed and redownload fresh uploads was enabled (#480)
This commit is contained in:
@@ -476,6 +476,7 @@ async function updateSubscriptionProperty(sub, assignment_obj) {
|
||||
|
||||
async function setFreshUploads(sub) {
|
||||
const sub_files = await db_api.getRecords('files', {sub_id: sub.id});
|
||||
if (!sub_files) return;
|
||||
const current_date = new Date().toISOString().split('T')[0].replace(/-/g, '');
|
||||
sub_files.forEach(async file => {
|
||||
if (current_date === file['upload_date'].replace(/-/g, '')) {
|
||||
|
||||
Reference in New Issue
Block a user