Re: can I populate the download_history without actualy downloading

2016-09-08 Thread Dave Widgery
Hi

Jimmys solution of temporarily modifying the get_player script did
exactly what I wanted.

But in answer to your suggestion.

I use an old notebook running xp to do my downloads, then copy the
files onto a usb disk that I plug directly into my tv. The downloads I
keep I sort into different folders depending on what they are.

But mostly I use it like a video recorder and a lot of things like
quiz programs get deleted again afterwards, therefore I do not have
the downloaded files available.

But even if I did surly it would only error because the file was
there, it still wouldn't add an entry to the download history
therefore it would continue to try to download and error every time
until the bbc stopped making it available.

But I appreciate everyone's suggestions.

Dave

On 8 September 2016 at 01:07, Vangelis forthnet
 wrote:
> On Tue Sep 6 14:30:03 BST 2016, Dave Widgery wrote:
>>
>> due to a disk crash I have had to rebuild my system. One problem I have is
>> the download_history file is missing a lot of entries of programs I have
>> already downloaded.
>
>
> On Wed Sep 7 23:18:02 BST 2016, Jon Davies wrote:
>>
>> If get-iplayer tries to download a programme that already exists on disk,
>> it won't download it again.
>
>
> ... This was my immediate thought, too, when I read about Dave's
> predicament; indeed, if --overwrite is not specified, then GiP won't
> re-record an existing download, provided that the new recording attempt
> would have produced a file with the same  substitution parameter
> (same file name and download directory), i.e.  =
> \.EXT
>
> Dave informed us that he had lost his original history file due to disk
> failure, but maybe he has salvaged (some?) of his downloads via backups in
> other disks (???)
>
> So, for this idea to work, he should place all "programs he had already
> downloaded" to the same location that GiP is currently configured to place
> downloads (output directory), provided the  parameter is still
> the same as before the disk crash...
>
> Regards, Vangelis.
>
> Edit: I now see Alan beat me to it!
>
>
>
> ___
> get_iplayer mailing list
> get_iplayer@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/get_iplayer

___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: can I populate the download_history without actualy downloading

2016-09-07 Thread Alan Milewczyk

On 07/09/16 23:18, Jon Davies wrote:

On 6 September 2016 at 14:30, Dave Widgery  wrote:

... due to a disk crash I have had to rebuild my system.

http://www.worldbackupday.com/en/



one problem I have is the download_history file is missing a lot of
entries of programs I have already downloaded.

[...]

Is there a way to fool get_iplayer to add entries to the
download_history without actually downloading the program.

you probably don't need to.  If get-iplayer tries to download a
programme that already exists on disk, it won't download it again.
Only if it is in the original download folder - if you've moved it to 
another folder then it will download again. I would think most of us 
move programmes from the original download folder, especially if we're 
going to keep the programmes.


A

___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: can I populate the download_history without actualy downloading

2016-09-07 Thread Jon Davies
On 6 September 2016 at 14:30, Dave Widgery  wrote:
>... due to a disk crash I have had to rebuild my system.

http://www.worldbackupday.com/en/


> one problem I have is the download_history file is missing a lot of
> entries of programs I have already downloaded.
[...]
> Is there a way to fool get_iplayer to add entries to the
> download_history without actually downloading the program.

you probably don't need to.  If get-iplayer tries to download a
programme that already exists on disk, it won't download it again.

Jon

___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: can I populate the download_history without actualy downloading

2016-09-07 Thread Dave Widgery
Cheers Jimmy,

That is exactly what I needed, tried it and it has done the trick, I
currently use a batch file containing the following line.

for /F "tokens=*" %%A in (tvprog.txt) do get_iplayer --get  %%A
--tvmode=flashbetter  --output=c:\iplayer\tv\
--file-prefix="-"

and a text file "tvprog,txt" that I just add keywords like eggheads or
"university challenge"  or even --pid= if I need to.

(I have a similar setup for radio programs)

This gets run each night as a windows scheduled task, there are lots
of programs in my tvprog.txt file that are not current at the moment,
but it picks them up automaticaly if there is a new series or
somthing. I am sure that I have reinvedted the wheel, but it works for
me.

So I just ran my batch file with your modification and it has
populated the history file with anything that is current and in my
tvprog list.

Again thanks to anyone who had a think about my problem.

Dave


On 7 September 2016 at 10:13, Jimmy Aitken  wrote:
> On Tue, Sep 6, 2016 at 7:45 PM, Dave Widgery  wrote:
>>
>> Hi thanks for the suggestion, but I am running windows not linux, i
>> will give it a try but not sure that it will work.
>>
>> Dave
>>
>> On 6 September 2016 at 17:10, David Walters  wrote:
>> > On Tue, Sep 6, 2016 at 3:45 PM, Dave Widgery  
>> > wrote:
>> >>
>> >> get_iplayer creates the entries in the file each time it has a
>> >> sucsessful downloads a file,
>> >
>
> A quick (in code change, not in execution) and dirty way to do this
> would be to add the following line to the function
> mode_ver_download_retry_loop
> at around 4377 of get_iplayer version 2.95.  Add the following line
> after the one "my $retcode;"
>
> $hist->add($prog);return;
>
> This will never download any program, but will update your history
> file instead.  Now call get_iplayer with whatever programmes you want
> to have added to your history file and it will be updated.
> e.g. get_iplayer -g .
> will add everything that is current to the history file.
> get_iplayer -g egg
> will only add programmes that match 'egg' to the history file
>
> It will take a long time, and the code to add to the history file is
> not optimised to do this sort of write since it rewrites the complete
> history file for each file it finds, and there are doubtless many
> other ways to do this.
>
> Howerver, this does has the advantage of just being a one line change
> to the current code, though so it's easy to put in place and revert
> afterwards.
>
> Remember to remove the line after you've finished through
>
> J.

___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: can I populate the download_history without actualy downloading

2016-09-07 Thread Jimmy Aitken
On Tue, Sep 6, 2016 at 7:45 PM, Dave Widgery  wrote:
>
> Hi thanks for the suggestion, but I am running windows not linux, i
> will give it a try but not sure that it will work.
>
> Dave
>
> On 6 September 2016 at 17:10, David Walters  wrote:
> > On Tue, Sep 6, 2016 at 3:45 PM, Dave Widgery  wrote:
> >>
> >> get_iplayer creates the entries in the file each time it has a
> >> sucsessful downloads a file,
> >

A quick (in code change, not in execution) and dirty way to do this
would be to add the following line to the function
mode_ver_download_retry_loop
at around 4377 of get_iplayer version 2.95.  Add the following line
after the one "my $retcode;"

$hist->add($prog);return;

This will never download any program, but will update your history
file instead.  Now call get_iplayer with whatever programmes you want
to have added to your history file and it will be updated.
e.g. get_iplayer -g .
will add everything that is current to the history file.
get_iplayer -g egg
will only add programmes that match 'egg' to the history file

It will take a long time, and the code to add to the history file is
not optimised to do this sort of write since it rewrites the complete
history file for each file it finds, and there are doubtless many
other ways to do this.

Howerver, this does has the advantage of just being a one line change
to the current code, though so it's easy to put in place and revert
afterwards.

Remember to remove the line after you've finished through

J.

___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: can I populate the download_history without actualy downloading

2016-09-06 Thread Tony Quinn

On 06-Sep-16 3:25 PM, mccarthy kevin wrote:

I'm using Windows 7.
In my

C:\Documents and Settings\username\.Get_iPlayer

directory

there's a file called download_history.
If you open it with a text file you'll see the format.
I'm assuming all you have to do is add an entry for each show you've downloaded,
though there are one or two references it contains I dont understand so I hope
this helps until an expert comes along...

Out of curiosity how do you use this file? if you dont use it for anything then
there's no need to add the missing entries.


I was under the impression that it was checked by GiP to prevent files 
being downloaded more than once


___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: can I populate the download_history without actualy downloading

2016-09-06 Thread mccarthy kevin
I'm using Windows 7.
In my

C:\Documents and Settings\username\.Get_iPlayer

directory

there's a file called download_history.
If you open it with a text file you'll see the format.
I'm assuming all you have to do is add an entry for each show you've downloaded,
though there are one or two references it contains I dont understand so I hope
this helps until an expert comes along...

Out of curiosity how do you use this file? if you dont use it for anything then
there's no need to add the missing entries.

Regards
Kevin



> 
> ___
> get_iplayer mailing list
> get_iplayer@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/get_iplayer

___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer