dealing with a series with no episode numbers

Chris Walker cdw_pcmail at the-walker-household.co.uk
Tue Oct 5 02:13:32 PDT 2021


On Tue, 2021-10-05 at 09:30 +0100, Korny Sietsma wrote:
> Hi folks,
> 
> Normally I have a configured fileprefix of
> "<nameshort><-senum><-episodeshort>" - however I recently started
> fetching Numberblocks (my kid's current obsession) and they had no
> "senum" series/episode value at all in the filenames.
> 
> If instead of using "<-senum>" I use specific series/episode numbers,
> I get a series number but no episode.  For example:
> 
> get_iplayer --pid=m0007jym --force
> --file-prefix="<nameshort>-s<00seriesnum>e<00episodenum><-
> episodeshort>"
> 
> gets me a file "Numberblocks-s04e-Fifty.mp4"
> 
> Is there some way to convince get_iplayer to understand or fake the
> episode number? I suspect it's something at the BBC end, the episode
> page at 
> https://www.bbc.co.uk/iplayer/episode/m0007jym/numberblocks-series-4-fifty
> just shows names of episodes not numbers.  But they are still in the
> same order as the episode list at
> https://thetvdb.com/series/numberblocks/seasons/official/4
> 
> I can fix them by hand but that's tedious.  And without the "s04e23"
> naming my plex won't get the episode titles right :(
> 

What I do when I need to increase the number on a GiP file is this :-
maxexistingtrack=$(ls "${parentdir}/${subdir}" | sort -n | tail -1 | sed
's/[^0-9].*$//')
	[exclude more code]
newtracknr=$((maxexistingtrack+1))

I split the tracks on multiples of 10 and that's what the extra code
does and hence why I've not included that.

Plainly you'd need to tidy that up but you could use something similar
to check the episode numbers of the files and increase that by one,
rename the latest downloaded file and if you're bothered, add that to
the metadata of the mp4.

-- 
 __ __| |_ __ __  .------------------------------------------------.
/ _/ _` \ V  V /  |  mailto:cdw_pcmail at the-walker-household.co.uk  |
\__\__,_|\_/\_/   |________________________________________________|




More information about the get_iplayer mailing list