diff --git a/Contents/Services/URL/drdk live/ServiceCode.pys b/Contents/Services/URL/drdk live/ServiceCode.pys index 35863ef..4d0f05f 100644 --- a/Contents/Services/URL/drdk live/ServiceCode.pys +++ b/Contents/Services/URL/drdk live/ServiceCode.pys @@ -48,8 +48,14 @@ def PlayMedia(slug): def gemius(id): # construct JSON for DR most viewed HTTP POST - json = JSON.ObjectFromString('{"id":"' + id + '","Client":"Plex.' + Client.Product + '.' + Client.Version + '"}') - # POST to increase DR most viewed list + + # Sometimes Product is None: + product = Client.Product + if product is None: + product = 'unknown' + + json = JSON.ObjectFromString('{"id":"' + id + '","Client":"Plex.' + product + '.' + Client.Version + '"}') + # POST to increase DR most viewed list HTTP.Request(API_URL + API_VERSION + '/reporting/viewed', values = json, method = 'POST') return None