Skip to content

Commit 859a330

Browse files
committed
Display subscription images in square format (160x160).
1 parent 4ef18c8 commit 859a330

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

bin/gtk-youtube-viewer

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2490,16 +2490,16 @@ sub set_entry_tooltip {
24902490
sub set_thumbnail {
24912491
my ($entry, $liststore, $iter) = @_;
24922492

2493-
$liststore->set_value($iter, 1, $default_thumb);
2493+
$liststore->set($iter, 1, $default_thumb);
24942494

24952495
Glib::Idle->add(
24962496
sub {
24972497
my ($entry, $liststore, $iter) = @{$_[0]};
24982498

2499-
my $thumb_url = $yv_utils->get_thumbnail_url($entry, $CONFIG{thumbnail_type});
2500-
my $pixbuf = get_pixbuf_thumbnail($thumb_url, ($yv_utils->is_channel($entry) ? (160, 160) : ()));
2501-
$liststore->set_value($iter, 1, $pixbuf);
2502-
2499+
my $thumb_url = $yv_utils->get_thumbnail_url($entry, $CONFIG{thumbnail_type});
2500+
my $square_format = $yv_utils->is_channel($entry) || $yv_utils->is_subscription($entry);
2501+
my $pixbuf = get_pixbuf_thumbnail($thumb_url, ($square_format ? (160, 160) : ()));
2502+
$liststore->set($iter, 1, $pixbuf);
25032503
return 0;
25042504
},
25052505
[$entry, $liststore, $iter],

bin/gtk3-youtube-viewer

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2509,8 +2509,9 @@ sub set_thumbnail {
25092509
sub {
25102510
my ($entry, $liststore, $iter) = @{$_[0]};
25112511

2512-
my $thumb_url = $yv_utils->get_thumbnail_url($entry, $CONFIG{thumbnail_type});
2513-
my $pixbuf = get_pixbuf_thumbnail($thumb_url, ($yv_utils->is_channel($entry) ? (160, 160) : ()));
2512+
my $thumb_url = $yv_utils->get_thumbnail_url($entry, $CONFIG{thumbnail_type});
2513+
my $square_format = $yv_utils->is_channel($entry) || $yv_utils->is_subscription($entry);
2514+
my $pixbuf = get_pixbuf_thumbnail($thumb_url, ($square_format ? (160, 160) : ()));
25142515
$liststore->set($iter, 1, $pixbuf);
25152516
return 0;
25162517
},

0 commit comments

Comments
 (0)