diff options
author | Jesús Eduardo <heckyel@parabola.nu> | 2017-10-24 19:47:11 +0000 |
---|---|---|
committer | Jesús Eduardo <heckyel@parabola.nu> | 2017-10-24 19:47:11 +0000 |
commit | 395de22eda9c418d5092768b759569166cade184 (patch) | |
tree | b320e7f39524ac53e949707bd95b1e652ea71465 /pcr/youtube-viewer/libre.patch | |
parent | 8028228221deb673bd85b7af6a8b804c9df3dc54 (diff) | |
download | abslibre-395de22eda9c418d5092768b759569166cade184.tar.gz abslibre-395de22eda9c418d5092768b759569166cade184.tar.bz2 abslibre-395de22eda9c418d5092768b759569166cade184.zip |
Add youtube-viewer to [PCR]
Diffstat (limited to 'pcr/youtube-viewer/libre.patch')
-rw-r--r-- | pcr/youtube-viewer/libre.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pcr/youtube-viewer/libre.patch b/pcr/youtube-viewer/libre.patch new file mode 100644 index 000000000..491b34ee3 --- /dev/null +++ b/pcr/youtube-viewer/libre.patch @@ -0,0 +1,26 @@ +diff --git a/lib/WWW/YoutubeViewer.pm b/lib/WWW/YoutubeViewer.pm +index a68b11c..bdacb08 100644 +--- a/lib/WWW/YoutubeViewer.pm ++++ b/lib/WWW/YoutubeViewer.pm +@@ -535,10 +535,10 @@ sub get_video_tops { + sub _get_formats_from_ytdl { + my ($self, $videoID) = @_; + +- ((state $x = $self->proxy_system('youtube-dl', '--version')) == 0) ++ ((state $x = $self->proxy_system('avideo', '--version')) == 0) + || return; + +- my $json = $self->proxy_stdout('youtube-dl', '--all-formats', '--dump-single-json', ++ my $json = $self->proxy_stdout('avideo', '--all-formats', '--dump-single-json', + quotemeta("https://www.youtube.com/watch?v=" . $videoID)); + + my @array; +@@ -705,7 +705,7 @@ sub get_streaming_urls { + Data::Dump::pp(\@caption_urls); + } + +- # Try again with youtube-dl ++ # Try again with avideo + if (!@streaming_urls or $info{status} =~ /fail|error/i) { + @streaming_urls = $self->_get_formats_from_ytdl($videoID); + } |