Skip to content

Commit

Permalink
fix: yt playlists/channels thumbnail not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
MSOB7YY committed Mar 3, 2024
1 parent 2fa656a commit 060dcb8
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions lib/controller/thumbnail_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,23 +140,21 @@ class ThumbnailManager {
final bytes = await getYoutubeThumbnailAsBytes(youtubeId: id, url: channelUrlOrID, keepInMemory: false);
_printie('Downloading Thumbnail Finished with ${bytes?.length} bytes');

final savedFile = (id != null
? saveThumbnailToStorage(
videoPath: null,
bytes: bytes,
isLocal: false,
idOrFileNameWOExt: id,
isExtracted: false,
)
: _saveChannelThumbnailToStorage(
file: file,
bytes: bytes,
))
.then((savedFile) {
trySavingLastAccessed(savedFile);
});

return savedFile;
final savedFileFuture = id != null
? saveThumbnailToStorage(
videoPath: null,
bytes: bytes,
isLocal: false,
idOrFileNameWOExt: id,
isExtracted: false,
)
: _saveChannelThumbnailToStorage(
file: file,
bytes: bytes,
);

savedFileFuture.then(trySavingLastAccessed);
return savedFileFuture;
}

void closeThumbnailClients(List<String?> links) {
Expand Down

0 comments on commit 060dcb8

Please sign in to comment.