2019-11-17, 16:00
(2019-11-15, 20:25)sualfred Wrote: Ah, you mean the Next Up widget.I looked in embuary.helper and got this to sort of work by editing resources/lib/plugin_content.py.
No it does not work with playlists, because they are not part of the library. And smart playlists are just filter rules.
I added the following to the init:
python:
self.playlist = remove_quotes(params.get('playlist'))
self.playlist_filter = {'operator': 'is', 'field': 'playlist', 'value': self.playlist}
and then in getnextup (approximately line 370)
python:
if self.playlist:
filters.append(self.playlist_filter)
I then went into widgets and added a custom widget >> Custom item and added the following:
plugin://script.embuary.helper/?info=getnextup&playlist=myTVPlaylist&reload=$INFO[Window(home).Property(EmbuaryWidgetUpdate)]
This doesn't work and it brings back all TV shows.
If I use self.playlist_filter = {'operator': 'is', 'field': 'playlist', 'value': 'myTVPlaylist'} in plugin_content.py it works and brings back just the in progress shows from that playlist.
I'm not sure where I'm going wrong. When I log(self.playlist_filter) it shows that the playlist value that I'm passing is there. It seems like the json_query is ignoring it.