diff --git a/client/src/app/torrent-status.pipe.ts b/client/src/app/torrent-status.pipe.ts index b2c64f6..232d3e0 100644 --- a/client/src/app/torrent-status.pipe.ts +++ b/client/src/app/torrent-status.pipe.ts @@ -6,7 +6,7 @@ import { RealDebridStatus, Torrent } from './models/torrent.model'; name: 'status', }) export class TorrentStatusPipe implements PipeTransform { - constructor(private pipe: FileSizePipe) {} + constructor(private pipe: FileSizePipe) { } transform(torrent: Torrent): string { if (torrent.error) { @@ -38,9 +38,8 @@ export class TorrentStatusPipe implements PipeTransform { speed = this.pipe.transform(allSpeeds, 'filesize'); - return `Downloading file ${downloading.length + downloaded.length}/${ - torrent.downloads.length - } (${progress.toFixed(2)}% - ${speed}/s)`; + return `Downloading file ${downloading.length + downloaded.length}/${torrent.downloads.length + } (${progress.toFixed(2)}% - ${speed}/s)`; } const unpacking = torrent.downloads.where((m) => m.unpackingStarted && !m.unpackingFinished && m.bytesDone > 0); @@ -87,6 +86,9 @@ export class TorrentStatusPipe implements PipeTransform { switch (torrent.rdStatus) { case RealDebridStatus.Downloading: + if (torrent.rdSeeders < 1) { + return `Torrent stalled` + } const speed = this.pipe.transform(torrent.rdSpeed, 'filesize'); return `Torrent downloading (${torrent.rdProgress}% - ${speed}/s)`; case RealDebridStatus.Processing: diff --git a/client/src/app/torrent-table/torrent-table.component.html b/client/src/app/torrent-table/torrent-table.component.html index bf0fab4..a85f2da 100644 --- a/client/src/app/torrent-table/torrent-table.component.html +++ b/client/src/app/torrent-table/torrent-table.component.html @@ -16,6 +16,7 @@ Name Category Priority + Seeders Files Downloads Size @@ -40,6 +41,9 @@ {{ torrent.priority }} + + {{ torrent.rdSeeders }} + {{ torrent.files.length | number }} @@ -74,7 +78,7 @@ > Retry Selected - +