Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Contents/Services/URL/drdk live/ServiceCode.pys
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down