From c772758683f5c96097122fb4c15673aa9d59f321 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 13 Oct 2013 22:12:15 +0200 Subject: [PATCH] Add category to renamer replacements. fix #2283 --- couchpotato/core/plugins/renamer/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/couchpotato/core/plugins/renamer/main.py b/couchpotato/core/plugins/renamer/main.py index 64690e5a..5f5473e4 100755 --- a/couchpotato/core/plugins/renamer/main.py +++ b/couchpotato/core/plugins/renamer/main.py @@ -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']: