From a88db12e8fa707b8a8fffbe21fe64f3d07a2567d Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Thu, 29 Mar 2018 18:20:23 -0500 Subject: [PATCH] Set up subtitles window prop --- resources/lib/playutils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/lib/playutils.py b/resources/lib/playutils.py index 2749d1b8..e7d8641e 100644 --- a/resources/lib/playutils.py +++ b/resources/lib/playutils.py @@ -64,10 +64,6 @@ class PlayUtils(): 'mediasource_id': info.get('Id') or self.item['Id'] }) - if self.method == "DirectPlay": - # Log filename, used by other addons eg subtitles which require the file name - window('embyfilename', value=url) - if 'RequiredHttpHeaders' in info and 'User-Agent' in info['RequiredHttpHeaders']: self.listitem.setProperty('User-Agent', info['RequiredHttpHeaders']['User-Agent']) @@ -139,6 +135,10 @@ class PlayUtils(): ''' Because we posted our deviceprofile to the server, only streams will be returned that can actually be played by this client so no need to check bitrates etc. ''' + + # Log filename, used by other addons eg subtitles which require the file name + window('embyfilename', value=self.get_direct_path(source)) + if (not self.force_transcode and (self.is_strm(source) or self.is_h265(source) or (source['SupportsDirectPlay'] and settings('playFromStream') == "false" and self.is_file_exists(source)))): # Do nothing, path is updated with our verification if applies.