Skip to content

Commit

Permalink
Merge pull request #570 from lamarios/fix/small-issues
Browse files Browse the repository at this point in the history
fix issue where servers are missing the genreUrl
  • Loading branch information
lamarios authored Jul 24, 2024
2 parents 0158c82 + 82c0a53 commit 6a0fae6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
31 changes: 15 additions & 16 deletions lib/channels/views/components/info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class ChannelInfo extends StatelessWidget {
var textTheme = Theme.of(context).textTheme;

final deviceType = getDeviceType();

List<Widget> widgets = [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
Expand Down Expand Up @@ -106,26 +105,26 @@ class ChannelInfo extends StatelessWidget {
}).toList() ??
[]));

final bannerUrl = ImageObject.getBestThumbnail(channel.authorBanners)?.url;

return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding:
const EdgeInsets.symmetric(horizontal: innerHorizontalPadding),
child: SizedBox(
height: deviceType == DeviceType.phone ? 100 : 230,
child: Thumbnail(
width: double.infinity,
thumbnailUrl:
ImageObject.getBestThumbnail(channel.authorBanners)
?.url ??
'',
decoration: BoxDecoration(
color: colors.secondaryContainer,
borderRadius: BorderRadius.circular(10))),
if (bannerUrl != null)
Padding(
padding: const EdgeInsets.symmetric(
horizontal: innerHorizontalPadding),
child: SizedBox(
height: deviceType == DeviceType.phone ? 100 : 230,
child: Thumbnail(
width: double.infinity,
thumbnailUrl: bannerUrl,
decoration: BoxDecoration(
color: colors.secondaryContainer,
borderRadius: BorderRadius.circular(10))),
),
),
),
const SizedBox(
height: 10,
),
Expand Down
2 changes: 1 addition & 1 deletion lib/videos/models/video.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Video extends BaseVideo {
bool isFamilyFriendly;
List<String> allowedRegions;
String genre;
String genreUrl;
String? genreUrl;

List<ImageObject> authorThumbnails;
String subCountText;
Expand Down
2 changes: 1 addition & 1 deletion lib/videos/models/video.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: invidious
version: 1.19.11+4056
version: 1.19.12+4057
publish_to: none
description: A new Flutter project.
environment:
Expand Down

0 comments on commit 6a0fae6

Please sign in to comment.