https://bugs.gpodder.org/show_bug.cgi?id=1013

Thomas Goirand <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #5 from Thomas Goirand <[email protected]> 2011-05-31 04:08:09 BST 
---
I believe that what should be done is *not* to retry after all download failed,
but to retry on a loop, if the connectivity to a single podcast file is weak.
My proposal goes like this:

complete=false;
failed=false;
downloaded_bytes=0;
retry=0;
retry_max_time=3;
while(!failed && !complete)
    ret = download_podcast();
    if(ret.result == failed){
        if(ret.downloaded_bytes > downloaded_bytes){
             downloaded_bytes = ret.downloaded_bytes;
             retry=0;
             continue;
        }else{
            if(retry >= retry_max_time){
                failed = 1;
                continue;
            }
            retry++;
        }
    }
    if(red.result == complete)
        complete = true;
}

In human words: retry all the time to download a podcast. Only consider that
the download is failed if we retried to download 3 times, and during these
retries, not a single byte of the podcast was downloaded. Best would be with
retry_max_time above being configurable by user. If it is set to 0, then
gpodder will never retry.

This way, we ensure that even with a bad connectivity (over 3G, bad WiFi, or
otherwise...) gpodder has chances to get the download done. Just retrying all
the download list once isn't a good idea, it wont improve things much to just
retry once.

-- 
Configure bugmail: https://bugs.gpodder.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
_______________________________________________
gPodder-Bugs mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/gpodder-bugs

Reply via email to