A bug in get_iplayer-3.01?

RS richard22j at zoho.com
Mon Jun 5 15:55:58 PDT 2017


>From: Vangelis forthnet Sent: Monday, June 5, 2017 20:12

>>On Mon Jun 5 14:51:45 BST 2017, I wrote:

>> I take it the answer is that substitute needs to be called
>> before create_dir, so that the sub-directory name
>>is sanitised by removal of the /
>> before the sub-directory is created.

>Hello Richard and many thanks for your analysis :-)
>I am otherwise occupied lately, apologies I can't
>contribute to the list to the extent I'd wish for...

>Remember, I DO NOT KNOW perl, but patching the code like:

># Create a subdir for programme sorting option
>elsif ( $opt->{subdir} ) {
> my $subdir = $prog->substitute( $opt->{subdirformat} || '<longname>', 1 );
>+# Replace forwardslashes in $subdir with _
>+$subdir =~ s/\//_/g;
> $prog->{dir} = File::Spec->catdir($prog->{dir}, $subdir);

>has allowed for:

>get_iplayer --type=tv --pid=b08r69t1 --subdir -i | FindStr dir =>

>dir:            D:\Vangelis\iPlayer Recordings\Vets_24_7_Series_4

>and

>get_iplayer --type=tv --pid=b08r69t1 --subdir -i | FindStr filename =>

>filename:       D:\Vangelis\iPlayer 
>Recordings\Vets_24_7_Series_4\Vets_24_7_Series_4_-_4._Episode_4_b08r69t1_default.EXT

>Obviously, someone with proper perl-fu can write
>less crude code to deal with this bug; tested on
>Windows only; am confident the maintainer
>will address this in next release...

Thanks Vangelis, that should work.  Maybe artisticforge can try it in Linux. 
I was trying to work out how the procedures substitute and sanitize_path 
were intended to interact.  They both seem to be doing the same job in 
different ways which are hard to follow.  Your approach is far simpler.





More information about the get_iplayer mailing list