Kodi Community Forum
Apply custom filtering to dynamic content? - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
--- Thread: Apply custom filtering to dynamic content? (/showthread.php?tid=341640)

Pages: 1 2 3 4 5 6


RE: Apply custom filtering to dynamic content? - sualfred - 2019-09-03

That should work out of the box:
Code:

plugin://script.embuary.helper/?info=getbyargs&filter_args='"{"and": [{"or": [{"operator": "is", "field": "actor", "value": $ESCINFO[Container(90050).ListItemAbsolute(0).Label]},{"operator": "is", "field": "actor", "value": $ESCINFO[Container(90050).ListItemAbsolute(1).Label]},{"operator": "is", "field": "actor", "value": $ESCINFO[Container(90050).ListItemAbsolute(3).Label]}]}, {"operator": "isnot", "field": "title", "value": $ESCINFO[ListItem.Title]}]}"'&type=movie



RE: Apply custom filtering to dynamic content? - sualfred - 2019-09-03

if you have issues it's always save to urlencode it.

Edit:
Tested and can confirm that you have to urlencode it for some what ever reasons. Anyway. Works as it should
Code:
plugin://script.embuary.helper/?info=getbyargs&filter_args=%7B%22and%22%3A%20%5B%7B%22or%22%3A%20%5B%7B%22operator%22%3A%20%22is%22%2C%20%22field%22%3A%20%22actor%22%2C%20%22value%22%3A%20%22$INFO[Container(200).ListItem.Label]%22%7D%2C%7B%22operator%22%3A%20%22is%22%2C%20%22field%22%3A%20%22actor%22%2C%20%22value%22%3A%20%22$INFO[Container(200).ListItem(1).Label]%22%7D%2C%7B%22operator%22%3A%20%22is%22%2C%20%22field%22%3A%20%22actor%22%2C%20%22value%22%3A%20%22$INFO[Container(200).ListItem(2).Label]%22%7D%5D%7D%2C%20%7B%22operator%22%3A%20%22isnot%22%2C%20%22field%22%3A%20%22title%22%2C%20%22value%22%3A%20%22$INFO[ListItem.Label]%22%7D%5D%7D&type=movie



RE: Apply custom filtering to dynamic content? - bsoriano - 2019-09-03

(2019-09-03, 16:16)sualfred Wrote: if you have issues it's always save to urlencode it.

Edit:
Tested and can confirm that you have to urlencode it for some what ever reasons. Anyway. Works as it should
Code:
plugin://script.embuary.helper/?info=getbyargs&filter_args=%7B%22and%22%3A%20%5B%7B%22or%22%3A%20%5B%7B%22operator%22%3A%20%22is%22%2C%20%22field%22%3A%20%22actor%22%2C%20%22value%22%3A%20%22$INFO[Container(200).ListItem.Label]%22%7D%2C%7B%22operator%22%3A%20%22is%22%2C%20%22field%22%3A%20%22actor%22%2C%20%22value%22%3A%20%22$INFO[Container(200).ListItem(1).Label]%22%7D%2C%7B%22operator%22%3A%20%22is%22%2C%20%22field%22%3A%20%22actor%22%2C%20%22value%22%3A%20%22$INFO[Container(200).ListItem(2).Label]%22%7D%5D%7D%2C%20%7B%22operator%22%3A%20%22isnot%22%2C%20%22field%22%3A%20%22title%22%2C%20%22value%22%3A%20%22$INFO[ListItem.Label]%22%7D%5D%7D&type=movie

@sualfred, thanks! I will do it this way. I tried without url encoding and it worked, except for movies with & and ‘ in the title, which threw a plugin error in the log.

Regards,

Bart


RE: Apply custom filtering to dynamic content? - bsoriano - 2019-09-03

@sualfred, thank you, it works as expected.

Regards,

Bart


RE: Apply custom filtering to dynamic content? - sualfred - 2019-09-03

np


RE: Apply custom filtering to dynamic content? - QuizKid - 2020-09-12

Sorry for the basic question - I read through this thread and I'm slightly confused. Should infolabels work in xsp? I'm in the movie info screen and as soon as I move from static text to an info labe, I can no longer get this working. Is this just for text input from the keyboard or can it also be used to populate content for lists based off the selected list item in infoscreens?

videodb://movies/titles/?xsp={"rules":{"and":[{"field":"director","operator":"is","value":["Quentin Tarantino"]}]},"type":"movies"}

This works well, but I can't figure out how to have this dynamically...


RE: Apply custom filtering to dynamic content? - QuizKid - 2020-09-13

(2019-03-06, 06:10)jurialmunkey Wrote: Proof of concept:

Here's local video info being called from videoinfo dialog for movies in the set. This is done entirely with the skinning engine and local content. There is even a breadrcrumb memory so that you can backtrack.

Also @jurialmunkey, how do you get the information for the newly selected video to repopulate the infoscreen on this video?


RE: Apply custom filtering to dynamic content? - QuizKid - 2020-09-24

(2020-09-12, 15:42)QuizKid Wrote: Sorry for the basic question - I read through this thread and I'm slightly confused. Should infolabels work in xsp? I'm in the movie info screen and as soon as I move from static text to an info labe, I can no longer get this working. Is this just for text input from the keyboard or can it also be used to populate content for lists based off the selected list item in infoscreens?

videodb://movies/titles/?xsp={"rules":{"and":[{"field":"director","operator":"is","value":["Quentin Tarantino"]}]},"type":"movies"}

This works well, but I can't figure out how to have this dynamically...

Just in case anyone else was having issues with this in the future, I realised what I was doing wrong is that I was putting the whole section after the xsp= into a json URL encoder so it was also encoding the characters within the infolabel string, - $ [ ] - but they should be kept as is. So the above would be:

videodb://movies/titles/?xsp=%7b%22rules%22%3a%7b%22and%22%3a%5b%7b%22field%22%3a%22director%22%2c%22operator%22%3a%22is%22%2c%22value%22%3a%5b%22$INFO[ListItem.Director]%22%5d%7d%5d%7d%2c%22type%22%3a%22movies%22%7d



This forum uses Lukasz Tkacz MyBB addons.