diff --git a/app/ytdl.py b/app/ytdl.py index 6bfa2e7..4eb5526 100644 --- a/app/ytdl.py +++ b/app/ytdl.py @@ -647,6 +647,7 @@ class Download: self.loop = asyncio.get_running_loop() self.notifier = notifier self.info.status = 'preparing' + self.info.download_phase = None await self.notifier.updated(self.info) self.status_task = asyncio.create_task(self.update_status()) await self.loop.run_in_executor(None, self.proc.join) @@ -673,6 +674,7 @@ class Download: self.paused = True self.start_generation += 1 self.info.status = 'paused' + self.info.download_phase = None self.info.speed = None self.info.eta = None if self.running(): @@ -705,6 +707,7 @@ class Download: return if self.paused: self.info.status = 'paused' + self.info.download_phase = None self.info.speed = None self.info.eta = None await self.notifier.updated(self.info) @@ -988,6 +991,7 @@ class DownloadQueue: key = getattr(download.info, 'key', download.info.url) if download.paused: download.info.status = 'paused' + download.info.download_phase = None download.info.speed = None download.info.eta = None download.close() diff --git a/ui/src/app/app.spec.ts b/ui/src/app/app.spec.ts index cdaf356..1eb31a7 100644 --- a/ui/src/app/app.spec.ts +++ b/ui/src/app/app.spec.ts @@ -5,6 +5,7 @@ import { App } from './app'; import { DownloadsService } from './services/downloads.service'; import { SubscriptionsService } from './services/subscriptions.service'; import { CookieService } from 'ngx-cookie-service'; +import { Download } from './interfaces'; class DownloadsServiceStub { loading = false; @@ -18,6 +19,7 @@ class DownloadsServiceStub { customDirsChanged = new Subject>(); ytdlOptionsChanged = new Subject>(); updated = new Subject(); + completedDownload = new Subject(); getCookieStatus() { return of({ status: 'ok', has_cookies: false }); diff --git a/ui/src/app/app.ts b/ui/src/app/app.ts index 8422895..8c5398a 100644 --- a/ui/src/app/app.ts +++ b/ui/src/app/app.ts @@ -1651,6 +1651,8 @@ export class App implements AfterViewInit, OnInit, OnDestroy { speed += download.speed || 0; } else if (download.status === 'preparing') { active++; + } else if (download.status === 'postprocessing') { + active++; } else if (download.status === 'pending' || download.status === 'paused') { queued++; }