Merge pull request #2652 from nikagl/patch-1

Library object has media instead of movies
This commit is contained in:
Ruud Burger
2014-01-06 13:27:12 -08:00
+3 -3
View File
@@ -240,7 +240,7 @@ class Renamer(Plugin):
# Overwrite destination when set in category
destination = to_folder
category_label = ''
for movie in library_ent.movies:
for movie in library_ent.media:
if movie.category and movie.category.label:
category_label = movie.category.label
@@ -414,13 +414,13 @@ class Renamer(Plugin):
remove_leftovers = True
# Add it to the wanted list before we continue
if len(library_ent.movies) == 0:
if len(library_ent.media) == 0:
profile = db.query(Profile).filter_by(core = True, label = group['meta_data']['quality']['label']).first()
fireEvent('movie.add', params = {'identifier': group['library']['identifier'], 'profile_id': profile.id}, search_after = False)
db.expire_all()
library_ent = db.query(Library).filter_by(identifier = group['library']['identifier']).first()
for movie in library_ent.movies:
for movie in library_ent.media:
# Mark movie "done" once it's found the quality with the finish check
try: