Skip to content

Commit 0ad1425

Browse files
committed
fix: fallback to low res thumbnail if failed
1 parent 75c3715 commit 0ad1425

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

lib/controller/thumbnail_manager.dart

+9-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,15 @@ class ThumbnailManager {
164164
lowerResYTID: false,
165165
);
166166

167-
return downloaded;
167+
if (downloaded != null) return downloaded;
168+
169+
if (!isTemp) {
170+
// return the low res if high res failed
171+
final filetemp = imageUrlToCacheFile(id: id, url: customUrl, isTemp: isTemp, type: type);
172+
if (filetemp != null && filetemp.existsSync()) return filetemp;
173+
}
174+
175+
return null;
168176
}
169177

170178
Future<File?> getLowResYoutubeVideoThumbnail(String? videoId, {String? symlinkId, bool useHighQualityIfEnoughListens = true, VoidCallback? onNotFound}) async {

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: namida
22
description: A Beautiful and Feature-rich Music Player, With YouTube & Video Support Built in Flutter
33
publish_to: "none"
4-
version: 4.5.45-beta+241011010
4+
version: 4.5.47-beta+241011011
55

66
environment:
77
sdk: ">=3.4.0 <4.0.0"

0 commit comments

Comments
 (0)