add time stamp to item links to stop internal watched status being applied

This commit is contained in:
Shaun
2018-03-03 15:27:06 +11:00
parent f12d2ddb7b
commit 1e49bec7ea
4 changed files with 13 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.embycon"
name="EmbyCon"
version="1.4.56"
version="1.4.57"
provider-name="Team B">
<requires>
<import addon="xbmc.python" version="2.25.0"/>

View File

@@ -633,23 +633,23 @@ def showMenu(params):
elif selected_action == "emby_set_favorite":
markFavorite(item_id)
HomeWindow().setProperty("embycon_widget_reload", time.strftime('%a, %d %b %Y %H:%M:%S', time.localtime()))
HomeWindow().setProperty("embycon_widget_reload", str(time.time()))
elif selected_action == "emby_unset_favorite":
unmarkFavorite(item_id)
HomeWindow().setProperty("embycon_widget_reload", time.strftime('%a, %d %b %Y %H:%M:%S', time.localtime()))
HomeWindow().setProperty("embycon_widget_reload", str(time.time()))
elif selected_action == "mark_watched":
markWatched(item_id)
HomeWindow().setProperty("embycon_widget_reload", time.strftime('%a, %d %b %Y %H:%M:%S', time.localtime()))
HomeWindow().setProperty("embycon_widget_reload", str(time.time()))
elif selected_action == "mark_unwatched":
markUnwatched(item_id)
HomeWindow().setProperty("embycon_widget_reload", time.strftime('%a, %d %b %Y %H:%M:%S', time.localtime()))
HomeWindow().setProperty("embycon_widget_reload", str(time.time()))
elif selected_action == "delete":
delete(item_id)
HomeWindow().setProperty("embycon_widget_reload", time.strftime('%a, %d %b %Y %H:%M:%S', time.localtime()))
HomeWindow().setProperty("embycon_widget_reload", str(time.time()))
elif selected_action == "view_season":
parent_id = result["ParentId"]

View File

@@ -4,6 +4,7 @@ import os
import urllib
import json
from collections import defaultdict
import time
import xbmc
import xbmcaddon
@@ -300,6 +301,8 @@ def add_gui_item(url, item_details, display_options, folder=True):
else:
u = sys.argv[0] + "?item_id=" + url + "&mode=PLAY"
u += "&time=" + str(time.time())
# Create the ListItem that will be displayed
thumbPath = item_details.art["thumb"]
@@ -379,7 +382,6 @@ def add_gui_item(url, item_details, display_options, folder=True):
info_labels["title"] = listItemName
info_labels["plot"] = item_details.plot
info_labels["Overlay"] = item_details.overlay
info_labels["playcount"] = str(item_details.play_count)
info_labels["TVShowTitle"] = item_details.series_name
info_labels["duration"] = item_details.duration

View File

@@ -6,6 +6,7 @@ import xbmc
import json
import urllib
import hashlib
import time
from downloadutils import DownloadUtils
from utils import getArt
@@ -333,15 +334,16 @@ def populateWidgetItems(itemsUrl, override_select_action=None):
totalTime = str(int(float(runtime) / (10000000 * 60)))
list_item.setProperty('TotalTime', str(totalTime))
list_item.setContentLookup(False)
list_item.setProperty('id', item_id)
if simmilarTo is not None:
list_item.setProperty('suggested_from_watching', simmilarTo)
if select_action == "1":
playurl = "plugin://plugin.video.embycon/?item_id=" + item_id + '&mode=PLAY'
playurl = "plugin://plugin.video.embycon/?item_id=" + item_id + '&mode=PLAY' + "&time=" + str(time.time())
elif select_action == "0":
playurl = "plugin://plugin.video.embycon/?item_id=" + item_id + '&mode=SHOW_MENU'
playurl = "plugin://plugin.video.embycon/?item_id=" + item_id + '&mode=SHOW_MENU' + "&time=" + str(time.time())
itemTupple = (playurl, list_item, False)
listItems.append(itemTupple)