Fix outdated thumbnails

This commit is contained in:
tommyxchow 2022-01-15 12:31:16 -05:00
parent 84ac125b7a
commit 5227b80f71

View file

@ -28,8 +28,11 @@ class StreamCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final time = DateTime.now();
final cacheUrlExtension = time.day.toString() + time.hour.toString() + (time.minute ~/ 5).toString();
final thumbnail = CachedNetworkImage(
imageUrl: streamInfo.thumbnailUrl.replaceFirst('-{width}x{height}', '-440x248') + (DateTime.now().minute ~/ 5).toString(),
imageUrl: streamInfo.thumbnailUrl.replaceFirst('-{width}x{height}', '-440x248') + cacheUrlExtension,
useOldImageOnUrlChange: true,
);