mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-30 11:38:36 -07:00
Stop Live TV session when guid changes
This commit is contained in:
parent
7b58bcc279
commit
751b97a39c
4 changed files with 30 additions and 7 deletions
|
@ -572,7 +572,7 @@ class PmsConnect(object):
|
|||
return output
|
||||
|
||||
def get_metadata_details(self, rating_key='', sync_id='', plex_guid='',
|
||||
cache_key=None, skip_cache_time=False, media_info=True):
|
||||
cache_key=None, return_cache=False, media_info=True):
|
||||
"""
|
||||
Return processed and validated metadata list for requested item.
|
||||
|
||||
|
@ -597,8 +597,12 @@ class PmsConnect(object):
|
|||
|
||||
if metadata:
|
||||
_cache_time = metadata.pop('_cache_time', 0)
|
||||
# Return cached metadata if less than METADATA_CACHE_SECONDS ago
|
||||
if skip_cache_time or int(time.time()) - _cache_time <= plexpy.CONFIG.METADATA_CACHE_SECONDS:
|
||||
if metadata['live']:
|
||||
cache_seconds = plexpy.CONFIG.METADATA_LIVE_CACHE_SECONDS
|
||||
else:
|
||||
cache_seconds = plexpy.CONFIG.METADATA_CACHE_SECONDS
|
||||
# Return cached metadata if less than cache_seconds ago
|
||||
if return_cache or int(time.time()) - _cache_time <= cache_seconds:
|
||||
return metadata
|
||||
|
||||
if rating_key:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue