From korny at sietsma.com Tue Oct 5 01:30:59 2021 From: korny at sietsma.com (Korny Sietsma) Date: Tue, 5 Oct 2021 09:30:59 +0100 Subject: dealing with a series with no episode numbers Message-ID: Hi folks, Normally I have a configured fileprefix of "<-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="-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 :( - Korny From cdw_pcmail at the-walker-household.co.uk Tue Oct 5 02:13:32 2021 From: cdw_pcmail at the-walker-household.co.uk (Chris Walker) Date: Tue, 05 Oct 2021 10:13:32 +0100 Subject: dealing with a series with no episode numbers In-Reply-To: References: Message-ID: <464d0318cbe89b7cd7e4cd0c431f4d5cfc845f3d.camel@the-walker-household.co.uk> On Tue, 2021-10-05 at 09:30 +0100, Korny Sietsma wrote: > Hi folks, > > Normally I have a configured fileprefix of > "<-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="-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 | \__\__,_|\_/\_/ |________________________________________________|