Added download manager to home page if autoplay is disabled

Fixed bug where the UI attempted to generate a preview URL for placeholder file cards

Fixed bug where file renaming was always attempted even when not necessary
This commit is contained in:
Isaac Abadi
2021-09-13 22:42:37 -06:00
parent acad7cc057
commit 3241d6aaaf
7 changed files with 33 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
import { Component, OnInit, OnDestroy, ViewChild, Input } from '@angular/core';
import { PostsService } from 'app/posts.services';
import { trigger, transition, animateChild, stagger, query, style, animate } from '@angular/animations';
import { Router } from '@angular/router';
@@ -39,6 +39,8 @@ import { MatSort } from '@angular/material/sort';
})
export class DownloadsComponent implements OnInit, OnDestroy {
@Input() uids = null;
downloads_check_interval = 1000;
downloads = [];
finished_downloads = [];
@@ -100,7 +102,7 @@ export class DownloadsComponent implements OnInit, OnDestroy {
}
getCurrentDownloads(): void {
this.postsService.getCurrentDownloads().subscribe(res => {
this.postsService.getCurrentDownloads(this.uids).subscribe(res => {
this.downloads_retrieved = true;
if (res['downloads'] !== null
&& res['downloads'] !== undefined