XMLTV / xmltv

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

tv_grab_zz_sdjson no season and episode for program repeats #226

Open AndyHarvey99 opened 8 months ago

AndyHarvey99 commented 8 months 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?

version 1.3.0

XMLTV Component?

tv_grab_zz_sdjson

Perl Version

v5.38.2

Operating System

Fedora Linux fc39

What happened?

when there are multiple entries for a program episode only the first entry gets season & episode info. The info is present in the raw data received from Schedules Direct

What did you expect to happen?

All episodes to contain season & episode.

Did you see any warnings/errors?

None.

Any other information?

I did some debugging and I think what happens is that in get_program_episode when the while loop parsing meta data is exited by the last metadata if $is_gracenote; command the iterator for the metadata hash is not reset then the next time it is called not data is returned.

I am not a perl programmer so I'm not confident this would be a final solution but adding:

keys %{$metadata};

before

while(my ($key, $value) = each %{$metadata}) {

cured the problem for me. This is related to changes for #222

Thanks