Skip to content

Commit 6f941d9

Browse files
committed
GUI: extended the right-click menu in the Saved Channels window. (implemented and closes #149)
1 parent 087252d commit 6f941d9

File tree

2 files changed

+61
-7
lines changed

2 files changed

+61
-7
lines changed

bin/gtk-pipe-viewer

+60-6
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ my %CONFIG = (
196196
arg => q{--really-quiet --force-media-title=*TITLE* --no-ytdl --no-terminal *VIDEO*},
197197
},
198198
mpvraw => {
199-
arg => q{--ytdl-raw-options-append="format-sort=ext,res:*RESOLUTION*" *URL*},
200199
cmd => q{mpv},
200+
arg => q{--ytdl-raw-options-append="format-sort=ext,res:*RESOLUTION*" --no-terminal *URL*},
201201
fs => q{--fullscreen},
202202
srt => q{--sub-file=*SUB*},
203203
},
@@ -1413,7 +1413,7 @@ sub get_treeview_popup_menu {
14131413
# Playlists created by this author
14141414
{
14151415
my $item = 'Gtk3::ImageMenuItem'->new("Playlists");
1416-
$item->signal_connect(activate => \&show_playlists_from_selected_author);
1416+
$item->signal_connect(activate => sub { list_channel_playlists($channel_id) });
14171417
$item->set_property(tooltip_text => "Show playlists created by this author");
14181418
$item->set_image('Gtk3::Image'->new_from_icon_name("emblem-documents-symbolic", q{menu}));
14191419
$item->show;
@@ -1592,12 +1592,66 @@ sub get_users_list_popup_menu {
15921592
$menu->append($item);
15931593
}
15941594

1595-
# Playlists from channel
1595+
# Recent shorts from this author
1596+
{
1597+
my $item = 'Gtk3::ImageMenuItem'->new("Shorts");
1598+
$item->signal_connect(activate => sub { list_channel_shorts($channel_id) });
1599+
$item->set_property(tooltip_text => "Show the most recent shorts from this author");
1600+
$item->set_image('Gtk3::Image'->new_from_icon_name("emblem-shared-symbolic", q{menu}));
1601+
$item->show;
1602+
$menu->append($item);
1603+
}
1604+
1605+
# Recent streams from this author
1606+
{
1607+
my $item = 'Gtk3::ImageMenuItem'->new("Streams");
1608+
$item->signal_connect(activate => sub { list_channel_streams($channel_id) });
1609+
$item->set_property(tooltip_text => "Show the most recent streams from this author");
1610+
$item->set_image('Gtk3::Image'->new_from_icon_name("media-record-symbolic", q{menu}));
1611+
$item->show;
1612+
$menu->append($item);
1613+
}
1614+
1615+
# Playlists created by this author
15961616
{
15971617
my $item = 'Gtk3::ImageMenuItem'->new("Playlists");
1598-
$item->set_image('Gtk3::Image'->new_from_icon_name("emblem-documents", q{menu}));
1599-
$item->set_property(tooltip_text => "List the playlists created by this channel");
1600-
$item->signal_connect(activate => \&playlists_from_selected_username);
1618+
$item->signal_connect(activate => sub { list_channel_playlists($channel_id) });
1619+
$item->set_property(tooltip_text => "Show playlists created by this author");
1620+
$item->set_image('Gtk3::Image'->new_from_icon_name("emblem-documents-symbolic", q{menu}));
1621+
$item->show;
1622+
$menu->append($item);
1623+
}
1624+
1625+
# Separator
1626+
{
1627+
my $item = 'Gtk3::SeparatorMenuItem'->new;
1628+
$item->show;
1629+
$menu->append($item);
1630+
}
1631+
1632+
# Most popular videos from this author
1633+
{
1634+
my $item = 'Gtk3::ImageMenuItem'->new("Popular videos");
1635+
$item->signal_connect(activate => sub { popular_uploads($channel_id) });
1636+
$item->set_property(tooltip_text => "Show the most popular videos from this author");
1637+
$item->set_image('Gtk3::Image'->new_from_icon_name("emblem-favorite", q{menu}));
1638+
$item->show;
1639+
$menu->append($item);
1640+
}
1641+
1642+
# Most popular streams from this author
1643+
{
1644+
my $item = 'Gtk3::ImageMenuItem'->new("Popular streams");
1645+
$item->signal_connect(activate => sub { popular_streams($channel_id) });
1646+
$item->set_property(tooltip_text => "Show the most popular livestreams from this author");
1647+
$item->set_image('Gtk3::Image'->new_from_icon_name("media-record", q{menu}));
1648+
$item->show;
1649+
$menu->append($item);
1650+
}
1651+
1652+
# Separator
1653+
{
1654+
my $item = 'Gtk3::SeparatorMenuItem'->new;
16011655
$item->show;
16021656
$menu->append($item);
16031657
}

bin/pipe-viewer

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ my %CONFIG = (
207207
},
208208

209209
mpvraw => {
210-
arg => q{--ytdl-raw-options-append="format-sort=ext,res:*RESOLUTION*" *URL*},
211210
cmd => q{mpv},
211+
arg => q{--ytdl-raw-options-append="format-sort=ext,res:*RESOLUTION*" *URL*},
212212
fs => q{--fullscreen},
213213
novideo => q{--no-video},
214214
srt => q{--sub-file=*SUB*},

0 commit comments

Comments
 (0)