Isto está fora do topo da cabeça, mas tente:
# call program as: epirename.py /path/to/mp4files 20 41 59
# the numbers are the sequence of first episodes in each season after the first
import os
import re
import sys
mp4dir = sys.argv[1]
seasons = [int(startnum) for startnum in sys.argv[2:]]
seasons.insert(0, 0) # start with '0' as the first episode of season 1
season = 0
patt = re.compile(r'([[:alpha:]]+)([[:digit:]]+).mp4')
for filename in sorted(os.listdir(mp4dir)):
match = patt.search(filename)
if match:
episode = int(match.group(2))
try:
if episode >= seasons[season+1]:
season += 1
except:
pass
# create new filename as '{basename}S{season}E{episode}'
newname = '%sS%02dE%03d.mp4' % (match.group(1), season+1, episode - seasons[season])
os.rename(os.path.join(dir, filename),
os.path.join(dir, newname))
print 'renamed', filename 'to', newname
O resultado é que os arquivos que correspondem a '{name} {epi} .mp4' serão renomeados para '{name} S {season} E {episode} .mp4'. Outros arquivos são deixados intactos.
Mais uma vez, isso está fora do topo da minha cabeça; pode haver técnicas mais eficientes.