Fixed an issue where subs would only display 10 of their videos in the subscription component (#851)

Fixed an issue where a sub would get stuck in the downloading state

Fixed UI bug in the subscriptions component
This commit is contained in:
Tzahi12345
2023-04-01 18:59:23 -04:00
parent 9f833d32a2
commit 1f2c5a0238
4 changed files with 9 additions and 4 deletions

View File

@@ -432,7 +432,8 @@ async function getAllSubscriptions() {
}
async function getSubscription(subID) {
const sub = await db_api.getRecord('subscriptions', {id: subID});
// stringify and parse because we may override the 'downloading' property
const sub = JSON.parse(JSON.stringify(await db_api.getRecord('subscriptions', {id: subID})));
// now with the download_queue, we may need to override 'downloading'
const current_downloads = await db_api.getRecords('download_queue', {running: true, sub_id: sub.id}, true);
if (!sub['downloading']) sub['downloading'] = current_downloads > 0;