dbr / tvnamer

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

Batch mode fails to detect tv episode, though detected when maunally performed. #72

Closed notoriousturtle closed 11 years ago

notoriousturtle commented 11 years ago
D:\tools>C:\Python27\Scripts\tvnamer.exe "D:\completed\tv\Battlestar.Galactica.S
02E01.DVDRip.XviD-TOPAZ.avi"
####################
# Starting tvnamer
# Found 1 episode
####################
# Processing file: Battlestar.Galactica.S02E01.DVDRip.XviD-TOPAZ.avi
# Detected series: Battlestar Galactica (season: 2, episode: 1)
TVDB Search Results:
1 -> Battlestar Galactica [en] # http://thetvdb.com/?tab=series&id=71173&lid=7 (
default)
2 -> Battlestar Galactica [no] # http://thetvdb.com/?tab=series&id=73545&lid=9
3 -> Battlestar Galactica [de] # http://thetvdb.com/?tab=series&id=73545&lid=14
4 -> Battlestar Galactica [fr] # http://thetvdb.com/?tab=series&id=73545&lid=17
5 -> Battlestar Galactica [pl] # http://thetvdb.com/?tab=series&id=73545&lid=18
6 -> Battlestar Galactica [hu] # http://thetvdb.com/?tab=series&id=71173&lid=19
Enter choice (first number, return for default, 'all', ? for help):

SeasonNotFound(u'Season 2 of show Battlestar Galactica could not be found',)
####################
Old filename: Battlestar.Galactica.S02E01.DVDRip.XviD-TOPAZ.avi
New filename: Battlestar Galactica - [02x01].avi
Rename?
([y]/n/a/q) q
Quitting
Usage: tvnamer-script.py [options] <files>

tvnamer-script.py: error: User exited with q

D:\tools>C:\Python27\Scripts\tvnamer.exe "D:\completed\tv\Battlestar.Galactica.S
02E01.DVDRip.XviD-TOPAZ.avi" -f
####################
# Starting tvnamer
# Found 1 episode
####################
# Processing file: Battlestar.Galactica.S02E01.DVDRip.XviD-TOPAZ.avi
# Detected series: Battlestar Galactica (season: 2, episode: 1)
SeasonNotFound(u'Season 2 of show Battlestar Galactica could not be found',)
####################
Old filename: Battlestar.Galactica.S02E01.DVDRip.XviD-TOPAZ.avi
New filename: Battlestar Galactica - [02x01].avi
Rename?
([y]/n/a/q) q
Quitting
Usage: tvnamer-script.py [options] <files>

tvnamer-script.py: error: User exited with q

D:\tools>C:\Python27\Scripts\tvnamer.exe -c conf.json "D:\completed\tv\Battlesta
r.Galactica.S02E01.DVDRip.XviD-TOPAZ.avi"
Loading config: conf.json
####################
# Starting tvnamer
# Found 1 episode
####################
# Processing file: Battlestar.Galactica.S02E01.DVDRip.XviD-TOPAZ.avi
# Detected series: Battlestar Galactica (season: 2, episode: 1)
Skipping file due to error: Season 2 of show Battlestar Galactica could not be f
ound

####################
# Done
notoriousturtle commented 11 years ago

nothing?

lahwaacz commented 11 years ago

If you want to get a serious answer, make sure you do all these things:

The first two points should apply to all your future posts.

dbr commented 11 years ago

Sorry it took me so long to reply (and thanks @lahwaacz!)

It is working as intended, just the error in interactive mode isn't very clear..

When in interactive mode, it prints out an error because the original BSG only had one season:

SeasonNotFound(u'Season 2 of show Battlestar Galactica could not be found',)

..then uses the parsed series name to construct a cleaner name. For example:

# Processing file: AFakeSeriesToShowWhatIMean.s01e02.avi
# Detected series: AFakeSeriesToShowWhatIMean (season: 1, episode: 2)
ShowNotFound(u'Show AFakeSeriesToShowWhatIMean not found on www.thetvdb.com',)
####################
Old filename: AFakeSeriesToShowWhatIMean.s01e02.avi
New filename: AFakeSeriesToShowWhatIMean - [01x02].avi
Rename?
([y]/n/a/q)

This is to allow renaming series that are not in TVDB, to the best extent possible.

When in batch mode, the "use the parsed series name" behaviour is disabled, and it skips the file:

$ tvnamer --batch AFakeSeriesToShowWhatIMean.s01e02.avi
[...]
# Detected series: AFakeSeriesToShowWhatIMean (season: 1, episode: 2)
Skipping file due to error: Show AFakeSeriesToShowWhatIMean not found on www.thetvdb.com

That explains the behaviour you are seeing.. but to fix it, you can use the input_series_replacements config options to force "Battlestar Galatica" to pick up the 2003 series

{
    "input_series_replacements": {
        "Battlestar Galactica": 73545}
}