aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortrizen <trizen@protonmail.com>2020-08-24 13:19:48 +0300
committerJesús <heckyel@hyperbola.info>2020-09-14 10:37:57 -0500
commit0d69c7e8a6edce5e2f345fb43c56af849491eb91 (patch)
tree8a70abeed2f7fd7dade0f7cc6c0a00299a91edb9
parent519e45375172d6de1cf3d2450939006c7701bfcf (diff)
downloadfair-viewer-0d69c7e8a6edce5e2f345fb43c56af849491eb91.tar.lz
fair-viewer-0d69c7e8a6edce5e2f345fb43c56af849491eb91.tar.xz
fair-viewer-0d69c7e8a6edce5e2f345fb43c56af849491eb91.zip
- Fixed the support for closed-captions for some videos.
Also fixes the JSON warning ", or } expected while parsing object/hash". (closes https://github.com/trizen/fair-viewer/issues/21) Signed-off-by: Jesús <heckyel@hyperbola.info>
-rw-r--r--lib/WWW/FairViewer.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/WWW/FairViewer.pm b/lib/WWW/FairViewer.pm
index 037f469..ffd8c93 100644
--- a/lib/WWW/FairViewer.pm
+++ b/lib/WWW/FairViewer.pm
@@ -889,8 +889,7 @@ sub get_streaming_urls {
my @caption_urls;
if (exists $info{player_response}) {
- require URI::Escape;
- my $captions_json = URI::Escape::uri_unescape($info{player_response});
+ my $captions_json = $info{player_response}; # don't run uri_unescape() on this
my $caption_data = $self->parse_json_string($captions_json);
if (eval { ref($caption_data->{captions}{playerCaptionsTracklistRenderer}{captionTracks}) eq 'ARRAY' }) {