Set max width on media title in history tables

Add watch history to show media info page
This commit is contained in:
Tim 2015-06-23 14:10:37 +02:00
commit a4a44ec34f
6 changed files with 30 additions and 6 deletions

View file

@ -224,7 +224,8 @@ class PlexWatch(object):
'xml',
'round((julianday(datetime(stopped, "unixepoch", "localtime")) - \
julianday(datetime(time, "unixepoch", "localtime"))) * 86400) - \
(case when paused_counter is null then 0 else paused_counter end) as duration'
(case when paused_counter is null then 0 else paused_counter end) as duration,'
'grandparentRatingKey as grandparent_rating_key'
]
try:
query = data_tables.ssp_query(table_name=self.get_history_table_name(),

View file

@ -362,6 +362,9 @@ class WebInterface(object):
if 'rating_key' in kwargs:
rating_key = kwargs.get('rating_key', "")
custom_where = 'rating_key = %s' % rating_key
if 'grandparent_rating_key' in kwargs:
rating_key = kwargs.get('grandparent_rating_key', "")
custom_where = 'grandparent_rating_key = %s' % rating_key
plex_watch = plexwatch.PlexWatch()
history = plex_watch.get_history(start, length, kwargs, custom_where)