get_iplayer fileprefix issue?

dinkypumpkin dinkypumpkin at
Thu Aug 1 09:18:29 EDT 2013

On 01/08/2013 13:07, Andy Giraud wrote:
> fileprefix = <name><-episode>.
> ...
> My problem is that since adding this setting to my prefs (or using it on the
> command line), it works as expected when downloading a series with episode
> info, but for everything else without it (films, one-off progs etc) I end up
> with a hyphenated double filename, <name>-<name>.flv:
> e.g.
> Easy Listening Hits at the BBC.flv becomes
> Easy Listening Hits at the BBC-Easy Listening Hits at the BBC.flv
> ...
> The documentation seems clear enough, but have I misunderstood something
> about this setting, is there something I've missed or is this a bug? How do
> I stop this double-file naming for program names that do not contain episode
> info?

If you look back at the wiki example, you'll notice it uses 
<episodeshort> rather than <episode>.  For whatever reason, get_iplayer 
has always populated the "episode" field in the programme metadata, even 
if it's just a fallback value of the programme name.  The "episodeshort" 
field is typically a stripped version of the original "episode" value 
with episode numbers removed, etc.  In the extreme case where there is 
no original "episode" value, "episodeshort" is empty.  Check your 
programme with --info and you'll see that "episode" is populated, while 
"episodeshort" has an empty value placeholder "-".

The new file prefix format is really only useful with <senum> and 
<episodeshort> since all the other metadata fields will almost always be 
populated.  It was implemented primarily to make it easier to create 
output file names compatible with XBMC scrapers. I've added a note to 
that effect in the wiki page.

More information about the get_iplayer mailing list