From 0314910bbeb234a2a2cde0ab8033484324d9e7e1 Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 2 Jun 2014 14:11:26 +0200 Subject: [PATCH] Don't migrate empty library items --- couchpotato/core/database.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/database.py b/couchpotato/core/database.py index 40b29285..1b9501c2 100644 --- a/couchpotato/core/database.py +++ b/couchpotato/core/database.py @@ -372,10 +372,10 @@ class Database(object): m = medias[x] status = statuses.get(m['status_id']).get('identifier') - l = libraries[m['library_id']] + l = libraries.get(m['library_id']) # Only migrate wanted movies, Skip if no identifier present - if not getImdb(l.get('identifier')): continue + if not l or not getImdb(l.get('identifier')): continue profile_id = profile_link.get(m['profile_id']) category_id = category_link.get(m['category_id'])