Make sure to use proper category id

This commit is contained in:
Ruud
2014-03-15 23:43:46 +01:00
parent eee16c7a3d
commit 36125f1067
2 changed files with 2 additions and 2 deletions

View File

@@ -106,7 +106,7 @@ class MovieBase(MovieTypeBase):
'identifier': params.get('identifier'),
'status': status if status else 'active',
'profile_id': params.get('profile_id', default_profile.get('_id')),
'category_id': cat_id if cat_id is not None and len(cat_id) > 0 else None,
'category_id': cat_id if cat_id is not None and len(cat_id) > 0 and cat_id != '-1' else None,
}
# Update movie info

View File

@@ -256,7 +256,7 @@ class Renamer(Plugin):
destination = to_folder
category_label = ''
if media.get('category_id'):
if media.get('category_id') and media.get('category_id') != '-1':
try:
category = db.get('id', media['category_id'])
category_label = category['label']