2017-02-28, 16:21
Hi @marcelveldt,
I've been trying to add a feature to you script.skin.helper.widgets script so that I can filter my widgets by source path.
I've changed locally your code to this:
and eddited my skin.shortcuts entry to look like:
Cleared kodi's cache and tried to run the script.
However it keeps retrieving tvshows that don't have path like is passed through filter (i.e. nfs://192.168.1.77/tvshows/)
I've tried to run the exact filter option with texturecache script and it retrieves only the shows which start with path: nfs://192.168.1.77/tvshows/
Any ideas?
Thanks
I've been trying to add a feature to you script.skin.helper.widgets script so that I can filter my widgets by source path.
I've changed locally your code to this:
Code:
def next(self):
''' get next episodes '''
filters = [kodi_constants.FILTER_UNWATCHED]
if self.options["next_inprogress_only"]:
filters = [kodi_constants.FILTER_INPROGRESS]
if self.options.get("tag"):
filters.append({"operator": "contains", "field": "tag", "value": self.options["tag"]})
[b] if self.options.get("path"):
filters.append({"operator": "startswith", "field": "path", "value": self.options.get("path")})[/b]
# First we get a list of all the inprogress/unwatched TV shows ordered by lastplayed
all_shows = self.metadatautils.kodidb.tvshows(sort=kodi_constants.SORT_LASTPLAYED, filters=filters,
limits=(0, self.options["limit"]))
return process_method_on_list(self.get_next_episode_for_show, [d['tvshowid'] for d in all_shows])
and eddited my skin.shortcuts entry to look like:
Code:
['mainmenu', 'seriesdetv', 'widgetPath.personalthumb2', u'plugin://script.skin.helper.service/?action=nextepisodes&path=nfs://192.168.1.77/tvshows/&limit=25&reload=$INFO[Window(Home).Property(widgetreload)]'],
Cleared kodi's cache and tried to run the script.
However it keeps retrieving tvshows that don't have path like is passed through filter (i.e. nfs://192.168.1.77/tvshows/)
I've tried to run the exact filter option with texturecache script and it retrieves only the shows which start with path: nfs://192.168.1.77/tvshows/
Any ideas?
Thanks