XMLTV / xmltv

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

Episode numbers offset #113

Closed Alvamiga closed 3 years ago

Alvamiga commented 4 years ago

XMLTV Version?

0.6.1

XMLTV Component?

tv_grab_uk_tvguide

What happened?

I am running the programme to update and output the current TV listing and the series and/or episode numbers are being shifted down one digit. Sometimes it's the series number, sometime the episode number, even though the tvguide site and the local cache files contain the correct values. I have checked many entries from multiple TV channels.

What did you expect to happen?

For example:

1.3/6.

Instead of:

0.2/6.

Did you see any warnings/errors?

No warnings or errors.

What steps are needed to reproduce this issue?

Run: /usr/bin/tv_grab_uk_tvguide

Any other information?

This happens every day I run the update.

What other software are you using?

Xubuntu 20.04LTS Perl v5.30.0

garybuhrmaster commented 4 years ago

Presuming this is the xmltv_ns numbering system, the episodes are numbered from zero (so what people may think of as the first episode, or episode one, the xmltv definition requires to be reported in the output as zero) as defined in the formal XMLTV DTD available for review at: https://github.com/XMLTV/xmltv/blob/master/xmltv.dtd

Alvamiga commented 4 years ago

Maybe I've found a few quirks. This does seem to be the case in the vast majority of instances. I will look for any discrepancies, but the update takes a couple of hours each time, so it may take a while.

Personally, I'm completely baffled in the logic of decrementing a number, that then needs to be incremented, 100% of the time, but if that's the way it needs to be, I will have to modify my code to correct the data back to the sensible values!

Thanks for your response; I assume any discrepancies (after adjusting) I came across are quirks, not the issue I had assumed! I will close this issue if it checks out when I have re-run everything

mkbloke commented 4 years ago

If you're not doing so already, it might be good to at least pull the tv_grab_uk_tvguide grabber from master and use that, as there have been a number of fixes to it since release 0.6.1.

I am using the tv_grab_uk_tvguide grabber from master, but with the back end supplied via the Debian package for 0.6.1. It works fine, but obviously comes with the caveat that you're not updating any changes related to the back end code.

Updated to add: I'm not suggesting it'll help with this issue, rather, it'll stop you running into other issues that have already been fixed in the past.

knowledgejunkie commented 3 years ago

@Alvamiga Have you been able to look into the discrepancies you reported above, after taking into account the zero-based indexing for programme numbering?

honir commented 3 years ago

Closed - no fault found