Skip to content
dinkypumpkin edited this page Aug 26, 2017 · 25 revisions

Setting preferences

Click here for all config options (Return to ToC)

Saving options

Default user preferences can be added, removed or changed as shown in the following examples:

Save or update proxy settings and verbose mode as user defaults in get_iplayer profile directory ($HOME/.get_iplayer/options or %USERPROFILE%\.get_iplayer\options in Windows):

get_iplayer --prefs-add --verbose --proxy=http://proxy.domain.com:3128

See below for options file format.

Additionally save programme type settings (this will only update the specified options - existing options will be retained):

get_iplayer --prefs-add --type=radio,tv

Change your default file prefix:

get_iplayer --prefs-add --file-prefix="<name> - <dldate> <pid> <version>"

Change your default output directory:

get_iplayer --prefs-add --output="/home/user/get_iplayer"

Always create subdirectories in output directory and retain whitespace in file names:

get_iplayer --prefs-add --subdir --whitespace

Set default recording qualities:

get_iplayer --prefs-add --tvmode=best --radiomode=better

Remove a boolean option from those saved (e.g. --subdir):

get_iplayer --prefs-del --subdir

Remove a string-valued option from those saved (e.g. --tvmode):

get_iplayer --prefs-del --tvmode=best

You don't necessarily need to know the existing string value. A placeholder string will do:

get_iplayer --prefs-del --tvmode=X

Show all saved default options:

get_iplayer --prefs-show

Completely clear all saved default options:

get_iplayer --prefs-clear

System-wide defaults can be added to /etc/get_iplayer/options on Unix/macOS and %ALLUSERSPROFILE%\get_iplayer\options in Windows. The format is as follows:

<option key> <option value>

The key and value are separated by a space. The option key is the option name with hyphens removed (except for --tag-xxx options, where hyphens are replaced by underscores). For example, --file-prefix becomes fileprefix and --tag-utf8 becomes tag_utf8. Boolean options (those that do not take an argument) have a value in the options file of 0 (off) or 1 (on). Example entries:

output /path/for/output
fileprefix <name>-<episode>
raw 1

Option presets

User-defined groups of options can be added, removed or changed as presets. Preset files have the same format as the user settings files (see above).

Save or update several options in the preset named 'my_preset' (saved in ~/.get_iplayer/presets/my_preset or %USERPROFILE%\.get_iplayer\presets\my_preset in Windows):

get_iplayer --preset=my_preset --prefs-add --hide --since=24

Additionally save programme type for preset named 'my_preset' (this will only update the specified preset - existing preset options will be retained):

get_iplayer --preset=my_preset --prefs-add --type=radio,tv

Custom commands can be saved in presets:

Unix/macOS

get_iplayer --preset=mp3_320k --prefs-add --command-radio='ffmpeg -i "<filename>" -c:v copy -c:a libmp3lame -ab 320k -y "<dir>/<fileprefix>.mp3"'

Windows

get_iplayer --preset=mp3_320k --prefs-add --command-radio="ffmpeg -i \""<filename>"\" -c:v copy -c:a libmp3lame -ab 320k -id3v2_version 3 -write_id3v1 1 -y \""<dir>/<fileprefix>.mp3"\""

Remove a specific option from those saved in the preset named 'my_preset' (e.g. --since=24):

get_iplayer --preset=my_preset --prefs-del --since=24

Show all saved options in preset named 'my_preset':

get_iplayer --preset=my_preset --prefs-show

Completely clear all saved options in preset named 'my_preset':

get_iplayer --preset=my_preset --prefs-clear

Use the preset named 'my_preset' to search for programmes with names containing 'news':

get_iplayer --preset=my_preset news

Here is a more useful example: a preset that shows me the BBC iPlayer TV programmes added to my cache in the last 24hrs, hides ones I've already downloaded, and exclude some channels.

get_iplayer --prefs-add --preset=last24 --type=tv --since=24 --hide --versionlist=default --exclude-channel=alba,cbbc,cbeebies,parliament

Now, to run the preset at any time simply type:

get_iplayer --preset=last24
Clone this wiki locally