filenames

dinkypumpkin edited this page Oct 23, 2018 · 9 revisions

Filenames and Directories

Click here for all output options (Return to ToC)

Default output directories

iPlayer Recordings on your desktop (Windows/mac OS) or current working directory (Linux/BSD)

Recording to alternate output directories

Use an alternate output directory for all programmes:

get_iplayer --get 123 --output="/home/user/recordings/"

Use different output directories for radio and TV programmes:

get_iplayer --get 123 --outputradio="/home/user/recordings-radio/"
get_iplayer --get 456 --outputtv="/home/user/recordings-tv/"

To make options permanent, you can save one or more of them to your preferences:

get_iplayer --prefs-add --output="/home/user/recordings/"
get_iplayer --prefs-add --outputradio="/home/user/recordings-radio/"
get_iplayer --prefs-add --outputtv="/home/user/recordings-tv/"

Subdirectories

Use a subdirectory for each programme name:

get_iplayer --get 123 --subdir 

Create a custom subdirectory format with substitution parameters:

get_iplayer --get 123 --subdir --subdir-format="<nameshort>-<seriesnum>"

Filenames

Create a custom filename prefix format with substitution parameters:

get_iplayer --get 123 --file-prefix="<name> - <episode> <pid> <version>"

(This is the default file prefix)

Use the download date instead of episode name:

get_iplayer --get 123 --file-prefix="<name> - <dldate> <pid> <version>"

Use an abbreviated format with first broadcast date instead of episode name:

get_iplayer --get 123 --file-prefix="<name> - <firstbcastdate>"

Valid characters

All filenames and subdirectories are converted to ASCII-only with most punctuation removed. However, you can specify that whitespace be allowed (by default it is converted to '_'):

get_iplayer --get 123 --whitespace

Conditional separators

If a substitution parameter has a separator as a prefix inside the left angle bracket, the prefix will be omitted if the associated parameter value is empty:

Use a filename format that is friendly to Kodi scrapers:

get_iplayer --get 123 --fileprefix="<nameshort><.senum><.episodeshort>"

This would produce a file prefix like "Dancing_on_the_Edge.s01e01.Episode_1" for a TV series episode, but just "The_Painted_Veil" for a film.

Use whitespace in Kodi-friendly filename:

get_iplayer --get 123 --fileprefix="<nameshort><.senum><.episodeshort>" --whitespace

This would produce a file prefix like "Dancing on the Edge.s01e01.Episode 1" for a TV series episode, but just "The Painted Veil" for a film.

NOTE: This separator syntax is only useful with <senum> and <episodeshort> since all other metadata fields will almost always be populated. The new syntax was implemented primarily to make it easier (along with the --whitespace option, if desired) to create output file names compatible with Kodi scrapers.

Dates in episode names

Some programmes (EastEnders, for example) have episode names that contain only the date of broadcast in UK short format: dd/mm/yyyy. The date will be interpolated into the name of the output file as yyyy-mm-dd.

Zero-padding in <episodenum> and <seriesnum>

In --fileprefix or --subdir-format, you can now use parameters in the form <00episodenum> or <00seriesnum> to produce values padded with zeroes. Padded string width is determined by number of zeroes, so the above would pad "5" to "05". If you are also using an optional prefix character, it must come before the padding indicator, e.g., <.00episodenum>.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.