mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00

* feat: concurrent download service & download prorvider * feat: implement chunked downloader * fix: no audio-tags in Linux and duration not showing up for local tracks * feat: show matching tracks in queue as well * feat: always uses piped api for download to avoid IP block * fix: invalid downloadCount
27 lines
494 B
Dart
27 lines
494 B
Dart
enum DownloadStatus {
|
|
queued,
|
|
downloading,
|
|
completed,
|
|
failed,
|
|
paused,
|
|
canceled;
|
|
|
|
bool get isCompleted {
|
|
switch (this) {
|
|
case DownloadStatus.queued:
|
|
return false;
|
|
case DownloadStatus.downloading:
|
|
return false;
|
|
case DownloadStatus.paused:
|
|
return false;
|
|
case DownloadStatus.completed:
|
|
return true;
|
|
case DownloadStatus.failed:
|
|
return true;
|
|
|
|
case DownloadStatus.canceled:
|
|
return true;
|
|
}
|
|
}
|
|
}
|