Rename/Number TV episodes files that contain more than 1 episode

Advanced Renamer forum
#1 : 01/03-21 21:27
Steve
Steve
Posts: 2
I apologize if this has been answered before

i have the following.

S01E01 - TVSHOW.mp4
S01E02 - TVSHOW.mp4
S01E03 - TVSHOW.mp4


however the files actually contain 2 episode each so i need to convert them to
S01E01-E02 - TVSHOW.mp4
S01E03-E04 - TVSHOW.mp4
S01E05-E06 - TVSHOW.mp4


any help on how to achieve that?


01/03-21 21:27
#2 : 02/03-21 00:23
David Lee
David Lee
Posts: 1071
Use a Script method with the following code:

match = item.name.match(/(S\d\dE)(\d\d)(.*)/);
return match[1]+('0'+(2*match[2]-1)).slice(-2)+'-E'+('0'+2*match[2]).slice(-2)+match[3];


02/03-21 00:23