From 634409c528e204eb9e0a1ef3327b2a1d46115f2b Mon Sep 17 00:00:00 2001
From: angelblue05 <tamara.angel05@gmail.com>
Date: Sat, 8 Oct 2016 21:07:15 -0500
Subject: [PATCH] Fix trakt/delete conflict

---
 resources/lib/player.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/resources/lib/player.py b/resources/lib/player.py
index 5ab8602e..29db956f 100644
--- a/resources/lib/player.py
+++ b/resources/lib/player.py
@@ -443,6 +443,8 @@ class Player(xbmc.Player):
                 # Prevent manually mark as watched in Kodi monitor
                 window('emby_skipWatched%s' % itemid, value="true")
 
+                self.stopPlayback(data)
+
                 if currentPosition and runtime:
                     try:
                         percentComplete = (currentPosition * 10000000) / int(runtime)
@@ -475,9 +477,6 @@ class Player(xbmc.Player):
                         else:
                             log.info("User skipped deletion.")
 
-
-                self.stopPlayback(data)
-
                 # Stop transcoding
                 if playMethod == "Transcode":
                     log.info("Transcoding for %s terminated." % itemid)