Add show and episode title to get_history API

This commit is contained in:
JonnyWong16 2016-11-29 20:54:27 -08:00
commit 655f1c249e
2 changed files with 34 additions and 24 deletions

View file

@ -80,7 +80,9 @@ class DataFactory(object):
'session_history_metadata.parent_rating_key', 'session_history_metadata.parent_rating_key',
'session_history_metadata.grandparent_rating_key', 'session_history_metadata.grandparent_rating_key',
'session_history_metadata.full_title', 'session_history_metadata.full_title',
'session_history_metadata.title',
'session_history_metadata.parent_title', 'session_history_metadata.parent_title',
'session_history_metadata.grandparent_title',
'session_history_metadata.year', 'session_history_metadata.year',
'session_history_metadata.media_index', 'session_history_metadata.media_index',
'session_history_metadata.parent_media_index', 'session_history_metadata.parent_media_index',
@ -124,7 +126,9 @@ class DataFactory(object):
'parent_rating_key', 'parent_rating_key',
'grandparent_rating_key', 'grandparent_rating_key',
'full_title', 'full_title',
'title',
'parent_title', 'parent_title',
'grandparent_title',
'year', 'year',
'media_index', 'media_index',
'parent_media_index', 'parent_media_index',
@ -217,7 +221,9 @@ class DataFactory(object):
'parent_rating_key': item['parent_rating_key'], 'parent_rating_key': item['parent_rating_key'],
'grandparent_rating_key': item['grandparent_rating_key'], 'grandparent_rating_key': item['grandparent_rating_key'],
'full_title': item['full_title'], 'full_title': item['full_title'],
'title': item['parent_title'],
'parent_title': item['parent_title'], 'parent_title': item['parent_title'],
'grandparent_title': item['grandparent_title'],
'year': item['year'], 'year': item['year'],
'media_index': item['media_index'], 'media_index': item['media_index'],
'parent_media_index': item['parent_media_index'], 'parent_media_index': item['parent_media_index'],

View file

@ -1609,34 +1609,38 @@ class WebInterface(object):
"total_duration": "42 days 5 hrs 18 mins", "total_duration": "42 days 5 hrs 18 mins",
"filter_duration": "10 hrs 12 mins", "filter_duration": "10 hrs 12 mins",
"data": "data":
[{"year": 2016, [{"date": 1462687607,
"paused_counter": 0, "duration": 263,
"player": "Plex Web (Chrome)", "friendly_name": "Mother of Dragons",
"full_title": "Game of Thrones - The Red Woman",
"grandparent_rating_key": 351,
"grandparent_title": "Game of Thrones",
"group_count": 1,
"group_ids": "1124",
"id": 1124,
"ip_address": "xxx.xxx.xxx.xxx",
"media_index": 17,
"media_type": "episode",
"parent_media_index": 7,
"parent_rating_key": 544, "parent_rating_key": 544,
"parent_title": "", "parent_title": "",
"duration": 263, "paused_counter": 0,
"transcode_decision": "transcode",
"rating_key": 4348,
"user_id": 8008135,
"thumb": "/library/metadata/4348/thumb/1462414561",
"id": 1124,
"platform": "Chrome",
"media_type": "episode",
"grandparent_rating_key": 351,
"started": 1462688107,
"full_title": "Game of Thrones - The Red Woman",
"reference_id": 1123,
"date": 1462687607,
"percent_complete": 84, "percent_complete": 84,
"ip_address": "xxx.xxx.xxx.xxx", "platform": "Chrome",
"group_ids": "1124", "player": "Plex Web (Chrome)",
"media_index": 17, "rating_key": 4348,
"friendly_name": "Mother of Dragons", "reference_id": 1123,
"watched_status": 0, "session_key": null,
"group_count": 1, "started": 1462688107,
"state": null,
"stopped": 1462688370, "stopped": 1462688370,
"parent_media_index": 7, "thumb": "/library/metadata/4348/thumb/1462414561",
"user": "DanyKhaleesi69" "title": "The Red Woman",
"transcode_decision": "transcode",
"user": "DanyKhaleesi69",
"user_id": 8008135,
"watched_status": 0,
"year": 2016
}, },
{...}, {...},
{...} {...}