aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/fair-viewer11
-rwxr-xr-xbin/gtk-fair-viewer7
2 files changed, 7 insertions, 11 deletions
diff --git a/bin/fair-viewer b/bin/fair-viewer
index cc01fa3..526297d 100755
--- a/bin/fair-viewer
+++ b/bin/fair-viewer
@@ -209,8 +209,7 @@ my %CONFIG = (
get_captions => 1,
auto_captions => 0,
copy_caption => 0,
- captions_dir => catdir(tmpdir(), 'fair-viewer'),
- cache_dir => catdir(tmpdir(), 'fair-viewer'),
+ cache_dir => undef,
# API
api_host => "https://invidio.us",
@@ -547,7 +546,7 @@ sub load_config {
dump_configuration($config_file) if $update_config;
-foreach my $path($CONFIG{cache_dir}, $CONFIG{captions_dir}) {
+foreach my $path($CONFIG{cache_dir}) {
next if -d $path;
require File::Path;
File::Path::make_path($path)
@@ -773,7 +772,6 @@ usage: $execname [options] ([url] | [keywords])
* Closed-captions
--get-captions! : download closed-captions for videos
--auto-captions! : include or exclude auto-generated captions
- --captions-dir=s : directory where to save the .srt files
* Config
--config=s : configuration file
@@ -1624,7 +1622,6 @@ sub parse_arguments {
'get-captions|get_captions!' => \$opt{get_captions},
'auto-captions|auto_captions!' => \$opt{auto_captions},
'copy-caption|copy_caption!' => \$opt{copy_caption},
- 'captions-dir|captions_dir=s' => \$opt{captions_dir},
'skip-if-exists|skip_if_exists!' => \$opt{skip_if_exists},
'downloads-dir|download-dir=s' => \$opt{downloads_dir},
'fat32safe!' => \$opt{fat32safe},
@@ -3027,7 +3024,7 @@ sub get_streaming_url {
require WWW::FairViewer::GetCaption;
my $yv_cap = WWW::FairViewer::GetCaption->new(
auto_captions => $opt{auto_captions},
- captions_dir => $opt{captions_dir},
+ captions_dir => $opt{cache_dir},
captions => $captions,
languages => $CONFIG{srt_languages},
);
@@ -3288,7 +3285,7 @@ sub download_video {
}
}
- # Copy the .srt file from captions-dir to downloads-dir
+ # Copy the .srt file to downloads-dir
if ( $opt{copy_caption}
and -e $video_filename
and defined($streaming->{srt_file})
diff --git a/bin/gtk-fair-viewer b/bin/gtk-fair-viewer
index 7636192..7dfd4c7 100755
--- a/bin/gtk-fair-viewer
+++ b/bin/gtk-fair-viewer
@@ -216,8 +216,7 @@ my %CONFIG = (
srt_languages => ['en', 'es'],
get_captions => 1,
auto_captions => 0,
- captions_dir => catdir(tmpdir(), 'fair-viewer'),
- cache_dir => catdir(tmpdir(), 'fair-viewer'),
+ cache_dir => undef,
# Others
env_proxy => 1,
@@ -460,7 +459,7 @@ if (not defined $CONFIG{cache_dir}) {
$CONFIG{cache_dir} = catdir($cache_dir, 'fair-viewer');
}
-foreach my $path($CONFIG{cache_dir}, $CONFIG{captions_dir}) {
+foreach my $path($CONFIG{cache_dir}) {
next if -d $path;
require File::Path;
File::Path::make_path($path)
@@ -3006,7 +3005,7 @@ sub get_streaming_url {
require WWW::FairViewer::GetCaption;
my $yv_cap = WWW::FairViewer::GetCaption->new(
auto_captions => $CONFIG{auto_captions},
- captions_dir => $CONFIG{captions_dir},
+ captions_dir => $CONFIG{cache_dir},
captions => $captions,
languages => $CONFIG{srt_languages},
);