summaryrefslogtreecommitdiff
path: root/plugin.video.embycon/service.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugin.video.embycon/service.py')
-rw-r--r--plugin.video.embycon/service.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/plugin.video.embycon/service.py b/plugin.video.embycon/service.py
index 0502978..60b1575 100644
--- a/plugin.video.embycon/service.py
+++ b/plugin.video.embycon/service.py
@@ -57,6 +57,7 @@ def sendProgress():
ticks = int(play_time * 10000000)
paused = play_data.get("paused", False)
playback_type = play_data.get("playback_type")
+ play_session_id = play_data.get("play_session_id")
postdata = {
'QueueableMediaTypes': "Video",
@@ -66,7 +67,8 @@ def sendProgress():
'PositionTicks': ticks,
'IsPaused': paused,
'IsMuted': False,
- 'PlayMethod': playback_type
+ 'PlayMethod': playback_type,
+ 'PlaySessionId': play_session_id
}
log.debug("Sending POST progress started: %s." % postdata)
@@ -227,6 +229,7 @@ class Service(xbmc.Player):
home_window = HomeWindow()
emby_item_id = home_window.getProperty("item_id")
playback_type = home_window.getProperty("PlaybackType_" + emby_item_id)
+ play_session_id = home_window.getProperty("PlaySessionId_" + emby_item_id)
# if we could not find the ID of the current item then return
if emby_item_id is None or len(emby_item_id) == 0:
@@ -238,7 +241,8 @@ class Service(xbmc.Player):
'CanSeek': True,
'ItemId': emby_item_id,
'MediaSourceId': emby_item_id,
- 'PlayMethod': playback_type
+ 'PlayMethod': playback_type,
+ 'PlaySessionId': play_session_id
}
log.debug("Sending POST play started: %s." % postdata)
@@ -250,6 +254,7 @@ class Service(xbmc.Player):
data["item_id"] = emby_item_id
data["paused"] = False
data["playback_type"] = playback_type
+ data["play_session_id"] = play_session_id
self.played_information[current_playing_file] = data
log.debug("ADDING_FILE : " + current_playing_file)
@@ -299,7 +304,6 @@ monitor = Service()
home_window = HomeWindow()
last_progress_update = time.time()
last_content_check = time.time()
-last_version_check = 0
# monitor.abortRequested() is causes issues, it currently triggers for all addon cancelations which causes
# the service to exit when a user cancels an addon load action. This is a bug in Kodi.
@@ -326,11 +330,6 @@ while not xbmc.abortRequested:
last_content_check = time.time()
checkForNewContent()
- # check version
- if (time.time() - last_version_check) > (60 * 60 * 6): # every 6 hours
- last_version_check = time.time()
- download_utils.checkVersion()
-
except Exception as error:
log.error("Exception in Playback Monitor : " + str(error))
log.error(traceback.format_exc())