These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

tvcommand/radiocommand in options file

user-1350

You need to use different ffmpeg commands to generate mp3/mkv output, but there's no way I can see to include those commands in the options file so they are used for every get-iplayer run. I edited my local copy to include these bits:

jason@dino:/mnt/3tb_0/iplayer_downloads$ diff ~/bin/gip_test $(which get-iplayer)
4419,4426c4419
<                               if ( $prog->{type} =~ /radio/ ) {
<                                       ( $opt->{radiocommand} = $opt->{command} ) if $opt->{command};
<                                       $prog->run_user_command( $opt->{radiocommand} ) if $opt->{radiocommand};
<                               }
<                               if ( $prog->{type} =~ /tv/ ) {
<                                       ( $opt->{tvcommand} = $opt->{command} ) if $opt->{command};
<                                       $prog->run_user_command( $opt->{tvcommand} ) if $opt->{tvcommand};
<                               }
---
>                               $prog->run_user_command( $opt->{command} ) if $opt->{command};
4443,4449c4436,4437
<                               if ( $prog->{type} =~ /radio/ ) {
<                                       ( $opt->{radiocommand} = $opt->{command} ) if $opt->{command};
<                                       $prog->run_user_command( $opt->{radiocommand} ) if $opt->{radiocommand};
<                               }
<                               if ( $prog->{type} =~ /tv/ ) {
<                                       ( $opt->{tvcommand} = $opt->{command} ) if $opt->{command};
<                                       $prog->run_user_command( $opt->{tvcommand} ) if $opt->{tvcommand};
---
>                               if ( $opt->{command} && ! $opt->{nowrite} ) {
>                                       $prog->run_user_command( $opt->{command} );
8235d8222
<               tvcommand               => [ 1, "tvc|tvcommand=s", 'Output', '--tvcommand, -tvc <command>', "Run user command after successful recording using args such as <pid>, <name> etc"],
9511d9497
<               radiocommand    => [ 1, "rc|radiocommand=s", 'Output', '--radiocommand, -rc <command>', "Run user command after successful recording using args such as <pid>, <name> etc"],

That allows me to have radiocommand and tvcommand lines as defaults in options, which are happily parsed and seem to be correctly used when fetching programmes. Any chance you can implement something similar, or point me at the options that make it unnecessary?

user-2

I'll implement this for the next release. Thanks for the suggestion.

user-1350

Did this get overlooked? It's not in 2.97, but the same changes seem to work with that version.

user-2

I removed it from 2.97, which was an unanticipated bug fix release. It's back in the development version.

user-2

Implemented in 2.98

These forums are archived

See this post for further info