Browse Source

Only add rating if available

pull/3111/head
Ruud 11 years ago
parent
commit
b13b32952f
  1. 7
      couchpotato/core/media/show/providers/info/thetvdb.py

7
couchpotato/core/media/show/providers/info/thetvdb.py

@ -259,15 +259,16 @@ class TheTVDb(ShowProvider):
'released': get('firstaired'),
'runtime': get('runtime'),
'contentrating': get('contentrating'),
'rating': {
'thetvdb': [tryFloat(get('rating')), tryInt(get('ratingcount'))],
},
'rating': {},
'actors': splitString(get('actors'), '|'),
'lastupdated': get('lastupdated'),
'status': get('status'),
'language': get('language'),
}
if tryFloat(get('rating')):
show_data['rating']['thetvdb'] = [tryFloat(get('rating')), tryInt(get('ratingcount'))],
show_data = dict((k, v) for k, v in show_data.iteritems() if v)
# Parse season and episode data

Loading…
Cancel
Save