Next Up for a playlist
#5
(2019-11-15, 20:25)sualfred Wrote: Ah, you mean the Next Up widget.
No it does not work with playlists, because they are not part of the library. And smart playlists are just filter rules.
I looked in embuary.helper and got this to sort of work by editing resources/lib/plugin_content.py.

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.
Reply


Messages In This Thread
Next Up for a playlist - by Doctor Eggs - 2019-11-15, 16:55
RE: Next Up for a playlist - by sualfred - 2019-11-15, 18:56
RE: Next Up for a playlist - by Doctor Eggs - 2019-11-15, 20:03
RE: Next Up for a playlist - by sualfred - 2019-11-15, 20:25
RE: Next Up for a playlist - by Doctor Eggs - 2019-11-17, 16:00
RE: Next Up for a playlist - by Doctor Eggs - 2020-02-06, 16:56
RE: Next Up for a playlist - by hackmonker - 2020-02-07, 08:51
RE: Next Up for a playlist - by sualfred - 2020-02-07, 12:09
RE: Next Up for a playlist - by hackmonker - 2020-02-07, 16:52
RE: Next Up for a playlist - by sualfred - 2020-02-07, 18:03
RE: Next Up for a playlist - by hackmonker - 2020-02-07, 18:45
RE: Next Up for a playlist - by sualfred - 2020-02-07, 19:34
RE: Next Up for a playlist - by hackmonker - 2020-02-07, 20:47
RE: Next Up for a playlist - by hackmonker - 2020-02-07, 21:08
RE: Next Up for a playlist - by sualfred - 2020-02-07, 21:47
Logout Mark Read Team Forum Stats Members Help
Next Up for a playlist0