Saved Filename options
dinkypumpkin
dinkypumpkin at gmail.com
Sun Feb 10 15:12:50 EST 2013
On 04/02/2013 11:53, YelloYeti wrote:
> A rather trivial question, but hopefully someone can come up with a
> solution:
>
> my options file has the entry:
> fileprefix <nameshort>-<episodeshort>-<senum>
>
> Which when I grab an episode of a series gives me exactly what I want.
>
> When I grab a 'one-off' programme, i.e. there is no series/episode, I
> end up with a file called name--.mp4
>
> Is there some invocation I can use in the options file which will
> automagically get rid of the trailing '-' characters?
I have pushed a couple of changes to get_iplayer that I hope will deal
with this issue. I've changed the way <episodeshort> and <senum> are
handled, and I've slightly extended the substitution parameter syntax to
allow prefixes to be omitted when associated tag values are empty.
Taking the example above:
OLD: --fileprefix="<nameshort>-<episodeshort>-<senum>"
Each tag can now have the separator defined as a prefix inside the left
angle bracket:
NEW: --fileprefix="<nameshort><-episodeshort><-senum>"
This signifies that the prefix will be omitted if the associated tag
value is empty.
Below are examples showing how the output file prefix is altered by the
changes to get_iplayer:
The Painted Veil (film, series/episode numbers undefined)
OLD: The_Painted_Veil---
NEW: The_Painted_Veil
Films don't have <episodeshort> or <senum> defined.
Turner's Thames (non-film, series/episode numbers undefined)
OLD: Turners_Thames---
NEW: Turners_Thames.s01e01
Non-film programmes that are one-offs (e.g., standalone documentaries)
don't have <episodeshort> or <senum> defined. I've forced series and
episode numbers to 1 in order to distinguish them from films.
Dancing on the Edge (non-film, series number undefined)
OLD: Dancing_on_the_Edge-Episode_1-s00e01
NEW: Dancing_on_the_Edge-Episode_1-s01e01
TV series that are one-offs or have yet to be recommissioned don't have
a series number, so I've forced it to 1. This should keep XBMC happy.
Silent Witness (non-film, episode number undefined)
OLD: Silent_Witness-Change_Part_1-s16e00
NEW: Silent_Witness-Change_Part_1-s16e00
In the last example, there is no difference since when get_iplayer can
determine the series number but can't determine an episode number, there
is no way to select an arbitrary value for the latter. It will have to
be fixed manually.
More information about the get_iplayer
mailing list