From 1e49bec7ea94edd83b65cea0f55739c7a2cb9319 Mon Sep 17 00:00:00 2001 From: Shaun Date: Sat, 3 Mar 2018 15:27:06 +1100 Subject: [PATCH] add time stamp to item links to stop internal watched status being applied --- addon.xml | 2 +- resources/lib/functions.py | 10 +++++----- resources/lib/item_functions.py | 4 +++- resources/lib/widgets.py | 6 ++++-- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/addon.xml b/addon.xml index 8ddcaf8..6ef920f 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ diff --git a/resources/lib/functions.py b/resources/lib/functions.py index 1a69794..d1d659b 100644 --- a/resources/lib/functions.py +++ b/resources/lib/functions.py @@ -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"] diff --git a/resources/lib/item_functions.py b/resources/lib/item_functions.py index f656bcd..01a9389 100644 --- a/resources/lib/item_functions.py +++ b/resources/lib/item_functions.py @@ -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 diff --git a/resources/lib/widgets.py b/resources/lib/widgets.py index 2f66ef2..da7d1e5 100644 --- a/resources/lib/widgets.py +++ b/resources/lib/widgets.py @@ -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)