Navigation Menu

Skip to content

Commit

Permalink
cleaned up some config settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ghickman committed Nov 28, 2010
1 parent fc0b7e0 commit a524c2d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions tvrenamr/config.py
Expand Up @@ -38,6 +38,7 @@ def get_canonical(self, show):
try:
return self.config[show.lower()]['canonical']
except KeyError:
self.log.debug('No canonical defined, returning: %s' % show)
return show

def get_output(self, show):
Expand Down
10 changes: 7 additions & 3 deletions tvrenamr/main.py
Expand Up @@ -100,10 +100,14 @@ def retrieve_episode_name(self, library='thetvdb', \
from lib.tvrage import TvRage as library
log.debug('Imported Tv Rage library')

if canonical is not None:
if canonical:
kwargs['show'] = canonical
self.library = library(self.config.get_canonical(kwargs['show']),
kwargs['season'], kwargs['episode'])
else:
kwargs['show'] = self.config.get_canonical(kwargs['show'])
log.debug('Show Name: %s' % kwargs['show'])

self.library = library(kwargs['show'], kwargs['season'],
kwargs['episode'])

self.title = self.library.get_title()
log.info('Episode: %s' % self.title)
Expand Down
1 change: 0 additions & 1 deletion tvrenamr/tvrenamr.py
Expand Up @@ -98,7 +98,6 @@ def __init__(self, path):
# get the first viable config from the list of possibles
for config in possible_config:
if config is not None and os.path.exists(config):
print config
self.config = Config(config)
break
if self.config is None:
Expand Down

0 comments on commit a524c2d

Please sign in to comment.