These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

Help with File Naming Strategy using Substitution Parameters

user-2347

For the longest time, I've been bulk renaming downloaded iPlayer files to get rid of underscores; and remove the series name (they get sent to a series-specific folder by PVR), and PID/version information. It requires multiple passes with the Thunar bulk facility (on Linux) and is tedious in the extreme.

I started to look at automating the process, and using scripts, but I've just come across the --file-prefix option and now I'm like a kid in a candy shop!

I now have the following preferences set up:

Code:
whitespace 1
fileprefix <00seriesnum.><00episodenum.><episodeshort>
subdir 1
subdirformat <nameshort>

This solves all of my issues with naming series, but leaves an oddity with single programmes.

My episodes all end up nicely matching my old laborious naming convention:

Code:
Hey Duggee\03.01.The Being Quiet Badge.mp4

but singletons are a little weird:

Code:
They Shall Not Grow Old\.mp4

What I'd really like to do is have the <nameshort> applied to the filename when there's no series or episode information.

It's not the end of the world, and freeing myself from Thunar is worth the small inconvenience, but does anyone have any suggestion about a convention which would satisfy both of the above scenario?

Thanks.

user-2

You would have to script that sort of logic via --command

user-2347

Thanks, after a bit of experimentation, I've gone with the following and it works great!

Code:
commandtv if [ "<fileprefix>" = "" ]; then mv -T "<filename>" "<dir>/<nameshort>.<ext>"; fi

user-250

Thanks Dave

I'll add that to my useful GIP functions.

These forums are archived

See this post for further info