Add category to renamer replacements. fix #2283
This commit is contained in:
1 parent
2fc097c0e8
commit
c772758683
1 file changed
+6
@@ -173,7 +173,12 @@ class Renamer(Plugin):
|
|||||||
|
|
||||||
# Overwrite destination when set in category
|
# Overwrite destination when set in category
|
||||||
destination = self.conf('to')
|
destination = self.conf('to')
|
||||||
|
category_label = ''
|
||||||
for movie in library_ent.movies:
|
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':
|
if movie.category and movie.category.destination and len(movie.category.destination) > 0 and movie.category.destination != 'None':
|
||||||
destination = movie.category.destination
|
destination = movie.category.destination
|
||||||
log.debug('Setting category destination for "%s": %s' % (movie_title, destination))
|
log.debug('Setting category destination for "%s": %s' % (movie_title, destination))
|
||||||
@@ -217,6 +222,7 @@ class Renamer(Plugin):
|
|||||||
'cd': '',
|
'cd': '',
|
||||||
'cd_nr': '',
|
'cd_nr': '',
|
||||||
'mpaa': library['info'].get('mpaa', ''),
|
'mpaa': library['info'].get('mpaa', ''),
|
||||||
|
'category': category_label,
|
||||||
}
|
}
|
||||||
|
|
||||||
for file_type in group['files']:
|
for file_type in group['files']:
|
||||||
|
|||||||
Reference in new issue
Block a user