aboutsummaryrefslogtreecommitdiffstats
path: root/bin/gtk-fair-viewer
diff options
context:
space:
mode:
Diffstat (limited to 'bin/gtk-fair-viewer')
-rwxr-xr-xbin/gtk-fair-viewer29
1 files changed, 19 insertions, 10 deletions
diff --git a/bin/gtk-fair-viewer b/bin/gtk-fair-viewer
index b79b547..401a47e 100755
--- a/bin/gtk-fair-viewer
+++ b/bin/gtk-fair-viewer
@@ -16,7 +16,7 @@
#-------------------------------------------------------
# GTK Fair Viewer
# Fork: 14 February 2020
-# Edit: 15 October 2020
+# Edit: 30 October 2020
# https://framagit.org/heckyel/fair-viewer
#-------------------------------------------------------
@@ -342,6 +342,7 @@ my %objects = (
'comboboxtext8' => \my $duration_combobox,
'comboboxtext3' => \my $caption_combobox,
'comboboxtext4' => \my $definition_combobox,
+ 'comboboxtext5' => \my $license_combobox,
'comboboxtext1' => \my $published_within_combobox,
'comboboxtext13' => \my $subscriptions_order_combobox,
'panel_user_entry' => \my $panel_user_entry,
@@ -854,7 +855,7 @@ sub apply_configuration {
$audio_only_checkbutton->set_active($CONFIG{audio_only});
# DASH mode
- $dash_checkbutton->set_active($CONFIG{dash_support});
+ $dash_checkbutton->set_active($CONFIG{dash_segmented});
$clear_list_checkbutton->set_active($CONFIG{clear_search_list});
$panel_account_type_combobox->set_active($CONFIG{active_panel_account_combobox});
@@ -1698,6 +1699,11 @@ sub combobox_definition_changed {
$yv_obj->set_videoDefinition($text);
}
+sub combobox_license_changed {
+ my $text = $license_combobox->get_active_text;
+ $yv_obj->set_videoLicense($text);
+}
+
sub combobox_published_within_changed {
my $period = $published_within_combobox->get_active_text;
@@ -1737,7 +1743,7 @@ sub toggled_audio_only {
# DASH mode
sub toggled_dash_support {
- $CONFIG{dash_support} = $dash_checkbutton->get_active() || 0;
+ $CONFIG{dash_segmented} = $dash_checkbutton->get_active() || 0;
}
# Check buttons toggles
@@ -2474,7 +2480,9 @@ sub display_results {
if (ref($items) ne 'ARRAY') {
my $current_instance = $yv_obj->get_api_host();
- $yv_obj->pick_and_set_random_instance(); # set a random invidious instance
+
+ # Server error. Pick another invidious instance.
+ # $yv_obj->pick_and_set_random_instance();
die "Probably $current_instance is down.\n"
. "\nTry changing the `api_host` in configuration file:\n\n"
@@ -3136,12 +3144,13 @@ sub run_cli_fair_viewer {
sub get_options_as_arguments {
my @args;
my %options = (
- 'no-interactive' => q{},
- 'resolution' => $CONFIG{resolution},
- 'download-dir' => quotemeta(rel2abs($CONFIG{downloads_dir})),
- 'fullscreen' => $CONFIG{fullscreen} ? q{} : undef,
- 'no-dash' => $CONFIG{dash_support} ? undef : q{},
- 'no-video' => $CONFIG{audio_only} ? q{} : undef,
+ 'no-interactive' => q{},
+ 'resolution' => $CONFIG{resolution},
+ 'download-dir' => quotemeta(rel2abs($CONFIG{downloads_dir})),
+ 'fullscreen' => $CONFIG{fullscreen} ? q{} : undef,
+ 'no-dash' => $CONFIG{dash_support} ? undef : q{},
+ 'no-dash-segmented' => $CONFIG{dash_segmented} ? undef : q{},
+ 'no-video' => $CONFIG{audio_only} ? q{} : undef,
);
while (my ($argv, $value) = each %options) {