honir / tv_grab_uk_atlas

XMLTV grabber for Atlas schedules
GNU General Public License v2.0
3 stars 3 forks source link

Fix undefined value as array reference error when no programmes found #4

Closed ta264 closed 10 years ago

ta264 commented 10 years ago

When I run mythfilldatabase, it keeps increasing the offset until it finds no data. It ends up running something like:

tv_grab_uk_atlas --offset 15

This fails for me with the error:

Can't use an undefined value as an ARRAY reference at /usr/bin/tv_grab_uk_atlas line 180.

I believe the problem is that atlas has no data for 15 days in the future so the array @{$programmes} is not defined. However this is used to update the progress bar and looped through in filter_listings(). My solution is to only create the progress bar or run filter_listings when $programmes is defined.

honir commented 10 years ago

Hi, Many thanks for the report and the patch. Fix applied in v1.25