honir/tv_grab_uk_atlas — pull request #4 by ta264 (2014-07-30 10:49:33+00:00)
Title: Fix undefined value as array reference error when no programmes found

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.