Add category to renamer replacements. fix #2283

This commit is contained in:
Ruud
2013-10-13 22:12:15 +02:00
parent 2fc097c0e8
commit c772758683
+6
View File
@@ -173,7 +173,12 @@ class Renamer(Plugin):
# Overwrite destination when set in category
destination = self.conf('to')
category_label = ''
for movie in library_ent.movies:
if movie.category and movie.category.label:
category_label = movie.category.label
if movie.category and movie.category.destination and len(movie.category.destination) > 0 and movie.category.destination != 'None':
destination = movie.category.destination
log.debug('Setting category destination for "%s": %s' % (movie_title, destination))
@@ -217,6 +222,7 @@ class Renamer(Plugin):
'cd': '',
'cd_nr': '',
'mpaa': library['info'].get('mpaa', ''),
'category': category_label,
}
for file_type in group['files']: