On 23/06/2013 17:50, Arthur Murray wrote:
On occasion my internet or the bbc site is temp down and get_iplayer
is trying to update in the background at that very moment, fails, and
my tv.cache is deleted.  When get_iplayer next runs all programs are
listed as being new, which is rather frustrating.  Is there a reason
not to preserve the cache in this situation?

ie: In the get_links sub:

$xml = main::request_url_retry($ua, $url, 3, '.', "WARNING: Failed to
get programme index feed for $_ from iplayer site\n");
#  perhaps "return 1 if ($xml eq '');" if the 3 retries fail rather
than continuing to create a empty cache based on no data?
decode_entities($xml);

I'm not 100% convinced about your solution. You're suggesting that the entire cache rebuild should be halted if even one channel doesn't refresh. That's something that happens from time to time, so a single failed channel could prevent your cache refreshing for a day or more. But then, what should the threshold be? I guess it's arbitrary, so I'll leave it up to you. Put whatever you think best into a patch or pull request we'll go with that.


_______________________________________________
get_iplayer mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/get_iplayer

Reply via email to