Browse Source

Key errors

pull/3009/head
Ruud 11 years ago
parent
commit
7bb723d6b3
  1. 2
      couchpotato/core/media/movie/searcher.py
  2. 2
      couchpotato/core/plugins/release/main.py

2
couchpotato/core/media/movie/searcher.py

@ -149,7 +149,7 @@ class MovieSearcher(SearcherBase, MovieTypeBase):
'quality': q_identifier,
'finish': profile['finish'][index],
'wait_for': profile['wait_for'][index],
'3d': profile['3d'][index] if profile['3d'] else False
'3d': profile['3d'][index] if profile.get('3d') else False
}
index += 1

2
couchpotato/core/plugins/release/main.py

@ -446,7 +446,7 @@ class Release(Plugin):
raw_releases = list(db.get_many('release', media_id, with_doc = True))
releases = []
for r in sorted(raw_releases, key = lambda k: k['doc']['info']['score'], reverse = True):
for r in sorted(raw_releases, key = lambda k: k['doc'].get('info', {}).get('score', 0), reverse = True):
releases.append(r['doc'])
return releases

Loading…
Cancel
Save