XMLTV / xmltv

Utilities to obtain, generate, and post-process TV listings data in XMLTV format
GNU General Public License v2.0
269 stars 93 forks source link

tv_grab_uk_tvguide - channels have been shifted 1 day back #177

Closed DatafoxChris closed 2 years ago

DatafoxChris commented 2 years ago

Thanks for taking the time to report an issue. Please take a moment to review our open/closed issues above, in case your issue has already been reported.

If you are reporting a new issue, please give your issue a descriptive title and fill out the blanks below, providing as much information as possible.

XMLTV Version?

(Please specify release version or git commit ID) XMLTV module version 1.1.2 This program version : tv_grab_uk_tvguide 2022-04-04.1245

XMLTV Component?

(Grabber name or utility) tv_grab_uk_tvguide

Perl Version

Perl v5.28.1

Operating System

Debian GNU/Linux 10 (buster)

Local time: Thu 2022-04-21 10:57:55 CEST Universal time: Thu 2022-04-21 08:57:55 UTC RTC time: Thu 2022-04-21 08:57:55 Time zone: Europe/Amsterdam (CEST, +0200) System clock synchronized: yes NTP service: inactive RTC in local TZ: no

What happened?

The guide for all channels have been shifted 1 day back, for example (see below) ITV2 (id 180))

What did you expect to happen?

Correct program-dates in the guide :)

Did you see any warnings/errors?

(Please paste any warnings/errors, if available) No errors, no warnings.

What steps are needed to reproduce this issue?

(Please provide the full commands you are running)

As root i run a bash script: echo "Downloading guide data" /usr/local/bin/tv_grab_uk_tvguide --output /home/hts/.xmltv/xmltv.xml --config-file /home/hts/.xmltv/tv_grab_uk_tvguide.conf echo "Download completed" cat /home/hts/.xmltv/xmltv.xml | socat - unix-connect:/home/hts/.hts/tvheadend/epggrab/xmltv.sock echo "Sent data into tvheadend"

How to reproduce this: Download guide for itv2 (180) and you will see that programs for tomorrow (2022-04-22) are shown in the XML as today (2022-04-21) -->

programme start="20220421200000 +0100" stop="20220421211500 +0100" channel="180.tvguide.co.uk"

Spectre (2015)

/programme

Note: tvguide.co.uk reports: Fri 22 Apr 8:00pm-9:15pm (1 hour 15 minutes) https://www.tvguide.co.uk/detail/2301042/66123687/spectre

Please attach your config file below:

(Remember to remove any usernames/passwords cachedir=/home/hts/.xmltv/cache channel=382 # CITV channel=642 # ITV London HD channel=697 # ITV London+1 channel=180 # ITV2 channel=376 # ITV2+1 channel=360 # ITV3 channel=474 # ITV3+1 channel=367 # ITV4 channel=530 # ITV4+1 channel=926 # ITVBe channel=476 # Channel 4 HD channel=428 # Channel 4 +1 channel=1172 # Channel 5 +1 Freeview channel=657 # Channel 5 HD channel=1173 # Channels 24 channel=361 # More4 channel=429 # More4 +1 channel=751 # PBS America channel=145 # Film4 channel=146 # Film4 +1 channel=1571 # GB News HD channel=139 # E4 channel=371 # E4 +1 channel=742 # GREAT! movies channel=500 # GREAT! movies action channel=993 # GREAT! movies classic channel=633 # GREAT! tv channel=493 # CBS Drama channel=498 # CBS Justice channel=385 # CBS Reality channel=1728 # BBC Three HD channel=893 # BBC Four HD channel=894 # BBC News Channel HD channel=1251 # NOW 70s channel=1743 # NOW 80s channel=1223 # NOW 90s channel=468 # Pop channel=602 # Pop Max channel=477 # Tiny Pop channel=654 # ITV STV HD channel=672 # ITV UTV HD channel=257 # Sky News channel=1244 # Smithsonian HD channel=1004 # TVC News channel=320 # Yesterday channel=752 # 4seven channel=374 # 5STAR channel=901 # 5STAR +1 channel=1225 # 5Action channel=571 # 5SELECT channel=375 # 5USA channel=422 # Really channel=322 # HGTV channel=358 # HGTV +1 channel=1230 # Quest HD channel=1014 # Quest Red channel=506 # 4Music channel=596 # Food Network channel=595 # Food Network +1 channel=1185 # FreeSports HD channel=1183 # France 24 HD channel=1290 # Foodxp channel=1186 # Sportystuff TV HD channel=586 # Create and Craft channel=572 # 5USA +1 channel=1176 # CNN HD channel=1175 # CNBC HD channel=1156 # Bloomberg HD channel=1270 # NHK World HD channel=1238 # S4C HD channel=123 # Trace Hits channel=1273 # Trace Vault

Any other information?

(For example, is this a new or intermittent issue?) Issue didn't change, it is stable

Other reports: https://tvheadend.org/boards/12/topics/45930 https://tvheadend.org/boards/12/topics/39256

Current workaround:


$xml  = simplexml_load_file('/home/hts/.xmltv/xmltv.xml');

foreach ( $xml->programme as $programme ) {
    //$programme['start'] = $programme['start'].' -0100';
    //$programme['stop'] = $programme['stop'].' -0100';
    $programme['start'] = str_replace("+0100", "-2300", $programme['start']);
    $programme['stop'] = str_replace("+0100", "-2300", $programme['stop']);
}
echo $xml->asXML();

Execute: php /tvheadend/shiftonedayforward.php > /home/hts/.xmltv/xmltv2.xml

misar1 commented 2 years ago

Just downloaded with correct day and times for ITV2 (180). Version tv_grab_uk_tvguide 2022-04-04.1245 using XMLTV 1.1.1 on Windows 10 in UK.

honir commented 2 years ago

Thanks for the report (especially the timezone info ;) )

Fixed version available in github (right-click the 'Raw' link and click 'Save Link As…'). Version tv_grab_uk_tvguide 2022-04-21.1403

DatafoxChris commented 2 years ago

Thanks! will let you know once the grab is finished

DatafoxChris commented 2 years ago

Yes it works.

Great!

honir commented 2 years ago

Thanks for the feedback.