Comment on Automatically rename your torrent'd TV episodes

ben@neverfear.org
Sat, 15 Jan 2011 05:17:25 +0000

Great script! Any plans to support dates in filenames instead of series/episodes?

This is implemented now

I have some files named generically: 03x01 - The Cabin Show.avi etc, but no way to give the name of the show without renaming the files by hand

Nope. About the only requirement of tvnamer is the filename must contain the series name, and the episode number (or date)

You could use the custom-replacements feature to prepend the series name to the file, e.g:

{
    "input_filename_replacements": [
        {"is_regex": true,
        "match": "^",
        "replacement": "Arrested Development"}
    ]
}

..or write a simple shell script around tvnamer to do this. Something I may add is the ability to specify the series name in the interactive prompt - when it searches, you can either select one of the results, or enter a new series name to search for.

Is it possible to have, only the correct name as output of the script ?

Nope, but it would be trivial to use tvnamer as an API to get such info:

>>> import tvnamer.utils
>>> import tvdb_api
>>> p = tvnamer.utils.FileParser('lost.s01e01.avi').parse()
>>> p.populateFromTvdb(tvdb_api.Tvdb())
>>> p.generateFilename()
u'Lost - [01x01] - Pilot (1).avi'