Do Not Flush
C E Macfarlane
c.e.macfarlane at macfh.co.uk
Sun Nov 23 04:58:26 PST 2014
Thanks.
However, really I'm looking for a simple way of preventing GIP redownloading
the cache just to get a programme that one can be certain should still be in
it. Nigel's contribution, for which I'm grateful, looks to be the best bet
so far, but is a little unwieldy as my aging brain either has to recall what
would be a sensible numerical value, such as the MAX_INT value or whatever
the equivalent in PERL may be, or work one out. It would be more convenient
just to have a command-line option such as --no-refresh, which would
probably be more appropriate than --no-flush as I originally implied in the
thread title, as the latter would imply updating the cache without
discarding the previous data, which, as you suggest, would be quite complex.
I usually run GIP without -g to load the cache(s), then give a series of
bash commands separated by ';' to leave GIP downloading overnight, but if
one of them relies on an index number, I don't want the cache reloaded by
that or any of the preceding commands, as that will change the index number.
Also occasionally I come down in the morning to find that, in such a series
of bash commands, I'd given one of them wrong in some way, and wish to give
the correct command using the same cache information as the night before.
BTW, like you I also run GIP from my own script, gip.sh, which merges the
configuration, cache, and download_history data between two machines, to
prevent them redownloading the caches and/or the same programmes, and so
that a configuration change made to one, or a new search term added to one,
will replicate to the other. It calls GIP based on search terms in a list,
and, as you have suggested, backs up the cache before running the merge,
also it backs up the configuration file, download_history, and search list.
www.macfh.co.uk/CEMH.html
UK Residents:
If you feel can possibly support it
please sign the following ePetition
before closing time of 30/03/2015 23:59:-
http://epetitions.direct.gov.uk/petitions/71556
> -----Original Message-----
> From: get_iplayer [mailto:get_iplayer-bounces at lists.infradead.org]On
> Behalf Of Jeremy Nicoll - ml get_iplayer
> Sent: 20 November 2014 12:37
> To: get_iplayer at lists.infradead.org
> Subject: Re: Do Not Flush
>
>
> "C E Macfarlane" <c.e.macfarlane at macfh.co.uk> wrote:
>
> >I can't a GIP command-line option to prevent the cache being
> flushed and
> >re-downloaded. If there isn't one, can we have one?
> Occasionally it would
> >be very useful.
>
> In my home-grown wrap-around for get_iplayer, I've been
> contemplating having
> it make a backup of an existing cache before attempting a
> refresh, as I'd
> rather have a slightly outofdate cache than none at all...
> which is what
> happens if the refresh code runs when I'm offline or the connection is
> having a go-slow (eg when my anti-virus/malware app is doing
> an definitions
> update). Perhaps an easier alternative would be to make a
> backup each time
> a new cache is created, so one could reinstate an older one if needed.
>
> I also have code that sanity checks the size of a cache file
> before doing
> anything with it, as sometimes a refresh that's been
> incomplete just needs
> run again.
>
> I'd go further and say that it would be useful if cache
> entries which are
> created from a specific source (or maybe for a specific
> channel or station)
> don't get removed if that single source is unreachable during
> a refresh.
>
> Maybe such logic would need to have a time threshhold (a day,
> two?) after
> which it would remove old cache entries. I think that's the
> sort of thing
> that different people would have quite different views on.
>
> I guess that'd add quite a lot of complexity to the refresh
> code though.
>
> --
> Jeremy Nicoll - my opinions are my own.
>
> _______________________________________________
> get_iplayer mailing list
> get_iplayer at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/get_iplayer
More information about the get_iplayer
mailing list