This commit is contained in:
1 parent
7463d3ee26
commit
3ad371aa9d
1 file changed
+5
-2
@@ -120,7 +120,9 @@ class DownloadController extends ChangeNotifier {
|
||||
String episodeId, {
|
||||
DownloadLicense? license,
|
||||
}) async {
|
||||
if (_downloading.contains(episodeId)) return const DownloadActionResult(ok: true);
|
||||
if (_downloading.contains(episodeId)) {
|
||||
return const DownloadActionResult(ok: true);
|
||||
}
|
||||
final source = license ?? _licenseFor(episodeId);
|
||||
if (source == null) return const DownloadActionResult(ok: false);
|
||||
_beginDownload(episodeId);
|
||||
@@ -129,7 +131,8 @@ class DownloadController extends ChangeNotifier {
|
||||
final media = await _storage.download(
|
||||
episodeId: episodeId,
|
||||
url: resolved,
|
||||
onProgress: (received, total) => _onProgress(episodeId, received, total),
|
||||
onProgress: (received, total) =>
|
||||
_onProgress(episodeId, received, total),
|
||||
);
|
||||
_localPaths[episodeId] = media.filePath;
|
||||
_progress[episodeId] = 1;
|
||||
|
||||
Reference in new issue
Block a user