Fixed error where sub with no videos would crash if none existed and redownload fresh uploads was enabled (#480)

pull/657/head
Isaac Abadi 3 years ago
parent 573cca0b2f
commit a4a0045475

@ -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, '')) {

Loading…
Cancel
Save