dbr / tvnamer

Automatic TV episode file renamer, uses data from thetvdb.com via tvdb_api
https://pypi.python.org/pypi/tvnamer/
The Unlicense
909 stars 115 forks source link

Option to force episode separation #142

Closed bellwood closed 6 years ago

bellwood commented 6 years ago

In some cases, you've got a set of episodes that are ordered sequentially, however, they are actually double episodes.

So for instance:

Show - S01E01.avi Show - S01E02.avi Show - S01E03.avi Show - S01E04.avi

They'd be renamed using an option to get the following:

Show - S01E01-E02.avi Show - S01E03-E04.avi Show - S01E05-E06.avi Show - S01E07-E08.avi

In other words, tell the parser I need to treat each file as two episodes regardless of the naming.

Thank you =)

bellwood commented 6 years ago

zmv via zsh helps prep the files at least:

zmv '([0-9][0-9])x([0-9][0-9]) - (*).avi' 'S$1E${(l:2::0:)$((($2 * 2) - 1))}-E${(l:2::0:)$(($2 * 2))} - $3.avi'
dbr commented 6 years ago

Preprocessing the files like you did with zmv is a good solution to this I'd say - an option in tvnamer to do this would be overly specific