From 50fcf39cef1d06c6134440a1b3cbe489c9b82708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20S=C3=A9nica?= Date: Tue, 31 Dec 2024 17:39:54 +0000 Subject: [PATCH] Vodafone.pt Grabber - load channel.list by using the grabber path --- grab/pt_vodafone/tv_grab_pt_vodafone | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/grab/pt_vodafone/tv_grab_pt_vodafone b/grab/pt_vodafone/tv_grab_pt_vodafone index 6e595780..2c623190 100755 --- a/grab/pt_vodafone/tv_grab_pt_vodafone +++ b/grab/pt_vodafone/tv_grab_pt_vodafone @@ -118,6 +118,10 @@ use URI::Escape qw/ uri_escape /; use URI::Encode qw/ uri_encode uri_decode/; # use Data::Dump qw/pp/; # uncomment to debug +# needed to find the channel.list location +use File::Basename; +my $dirname = dirname(__FILE__); + my $maxdays = 1+6; # data source is limited to 7 days (including today) my $grabber_name = 'tv_grab_pt_vodafone'; @@ -127,7 +131,7 @@ my $json_baseurl = 'https://cdn.pt.vtv.vodafone.com/epg/'; # Generate with: # jq -r '.channels[]|(.epgId,.title,.logo.color.uri)' channel.list.new | sed 'N;N; s/\n/\t/g' | sort > channel.list -my $input_file = 'channel.list'; +my $input_file = $dirname . '/channel.list'; my $ua = LWP::UserAgent->new(ssl_opts => { SSL_cipher_list => 'DEFAULT:!DH',