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-03-22

SH is slow because of the caching + live scraping stuff incl. the metadatautils module. And the service monitor does the rest. That's too much of everything.


RE: Apply custom filtering to dynamic content? - cartman.dos - 2019-03-22

your trick worked like magic, now i understand what's that glitching problem you talk about  Laugh


RE: Apply custom filtering to dynamic content? - manfeed - 2019-04-04

Thanks for this! I'm still in the first stages to take advantage of this option, so please bear with me...

I now know that, for instance...

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

...will return all the movies in my library starring Isla Fisher, but what would I need to get the other way round? I mean, to enter a movie and to get all the actors...

Thanks in advance!


RE: Apply custom filtering to dynamic content? - sualfred - 2019-04-06

That's not possible. 

You can use the skin helper script (expensive), service library data provider (broken for tvshows), or my embuary helper script:

Code:
plugin://script.embuary.helper?info=getcast&type=movie&title='$ESCINFO[ListItem.Title]'
or
Code:
plugin://script.embuary.helper?info=getcast&type=movie&dbid=$INFO[ListItem.DBID]

Type = "tvshow" or "movie"


RE: Apply custom filtering to dynamic content? - manfeed - 2019-04-06

Thanks sualfred! I was becoming mad trying different options to make it work to no avail...


RE: Apply custom filtering to dynamic content? - mardukL - 2019-04-08

(2019-04-06, 23:37)manfeed Wrote: Thanks sualfred! I was becoming mad trying different options to make it work to no avail...

Hi, im unsure if script is faster, but cast is huge "content" to check

I Use a xsp for that, no script

here is the playlist


Needs time to go trough but workin

EDIT: NOT WORKING, it ignores INFO String, and show all results

@sualfred
... im usure if
{"group":{"actors"}

will work with the json api, but maybe you can test

https://kodi.wiki/view/Smart_playlists#Grouping


RE: Apply custom filtering to dynamic content? - sualfred - 2019-04-08

Via json it is possible, but not via ?xsp and based on a movie.

But interesting that you can use $INFO[] inside of xsp playlists. Good to know Smile


RE: Apply custom filtering to dynamic content? - cartman.dos - 2019-04-08

(2019-04-08, 14:41)mardukL Wrote:
(2019-04-06, 23:37)manfeed Wrote: Thanks sualfred! I was becoming mad trying different options to make it work to no avail...

Hi, im unsure if script is faster, but cast is huge "content" to check

I Use a xsp for that, no script

here is the playlist

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Cast Test</name>
    <rule field="actor" operator="contains">
       <value>$INFO[Skin.String(SearchTerm)]</value>
    </rule>
    <limit>250</limit>
    <group>actors</group>
</smartplaylist>

Here the content for panel
<content target="videos">special://skin/playlists/video/casttest.xsp</content>

Needs time to go trough but workin

@sualfred
... im usure if
{"group":{"actors"}

will work with the json api, but maybe you can test

https://kodi.wiki/view/Smart_playlists#Grouping 

the infolabel inside the xsp is actually working?
that could be pretty powerful...and easy to use...


RE: Apply custom filtering to dynamic content? - mardukL - 2019-04-08

(2019-04-08, 15:31)cartman.dos Wrote:
(2019-04-08, 14:41)mardukL Wrote:
(2019-04-06, 23:37)manfeed Wrote: Thanks sualfred! I was becoming mad trying different options to make it work to no avail...

Hi, im unsure if script is faster, but cast is huge "content" to check

I Use a xsp for that, no script

here is the playlist

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Cast Test</name>
    <rule field="actor" operator="contains">
       <value>$INFO[Skin.String(SearchTerm)]</value>
    </rule>
    <limit>250</limit>
    <group>actors</group>
</smartplaylist>

Here the content for panel
<content target="videos">special://skin/playlists/video/casttest.xsp</content>

Needs time to go trough but workin

@sualfred
... im usure if
{"group":{"actors"}

will work with the json api, but maybe you can test

https://kodi.wiki/view/Smart_playlists#Grouping    

the infolabel inside the xsp is actually working?
that could be pretty powerful...and easy to use...   

I did further test, sadly no.
SORRY FOR THE WRONG INFO ... :-(

i test with string "a", thats why i thought it is working.
But it isnt. ;-(
Image
it show all results, instead of respect info string.
But was worth a try as i thought  $LOCALICE sting was working for the <name> tag some time ago...


RE: Apply custom filtering to dynamic content? - bsoriano - 2019-04-19

@jurialmunkey , @sualfred , would you guys be OK with me adapting the code in your skins that does this awesome search without addons for the Amber for Leia skin? I think it would be a wonderful addition which will keep the skin being really fast.  I would of course provide the credit to you.

Thanks in advance.

Regards,

Bart


RE: Apply custom filtering to dynamic content? - sualfred - 2019-04-19

Image


Honestly... do what you want ¯\_(ツ)_/¯ We are here for sharing.


RE: Apply custom filtering to dynamic content? - bsoriano - 2019-04-19

(2019-04-19, 19:16)sualfred Wrote: Image


Honestly... do what you want ¯\_(ツ)_/¯ We are here for sharing.

Thanks! Smile


RE: Apply custom filtering to dynamic content? - jurialmunkey - 2019-04-20

(2019-04-19, 17:21)bsoriano Wrote: @jurialmunkey , @sualfred , would you guys be OK with me adapting the code in your skins that does this awesome search without addons for the Amber for Leia skin? I think it would be a wonderful addition which will keep the skin being really fast.  I would of course provide the credit to you.

Thanks in advance.

Regards,

Bart
Yes please do! The more skins with great features, the better Kodi is.

All the credit should go to sualfred - I simply adapted his idea to my own skin.


RE: Apply custom filtering to dynamic content? - sualfred - 2019-04-20

Thanks, but I don't see a reason why simple Kodi features should be credited to someone.


RE: Apply custom filtering to dynamic content? - mardukL - 2019-07-18

Hi, i got a question may someone is able to solve, or show off my failure.

I used the 'xsp' method to show results, based on last focused cast item in dialogvideoinfo

The issue is, that when i use the method to dont show duplicate (exclude the 'video' which i am in) 
with
<!-- MOVIE -->
%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22actor%22%2C%22operator%22%3A%22contains%22%2C%22value%22%3A%5B%22$INFO[Container(8601).ListItem.Label]%22%5D%7D%2C%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22isnot%22%2C%22value%22%3A%5B%22$INFO[ListItem.Title]%22%5D%7D%5D%7D%2C%22type%22%3A%22movies%22%7D
 !--TV SHOW -->
 %7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22actor%22%2C%22operator%22%3A%22contains%22%2C%22value%22%3A%5B%22$INFO[Container(8601).ListItem.Label]%22%5D%7D%2C%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22isnot%22%2C%22value%22%3A%5B%22$INFO[ListItem.TVShowTitle]%22%5D%7D%5D%7D%2C%22type%22%3A%22tvshows%22%7D        

which is
movie
{"order":{"direction":"ascending","ignorefolders":0,"method":"sorttitle"},"rules":{"and":[{"field":"actor","operator":"contains","value":["$INFO[Container(8601).ListItem.Label]"]},{"field":"title","operator":"isnot","value":["$INFO[ListItem.Title]"]}]},"type":"movies"}

tv show
{"order":{"direction":"ascending","ignorefolders":0,"method":"sorttitle"},"rules":{"and":[{"field":"actor","operator":"contains","value":["$INFO[Container(8601).ListItem.Label]"]},{"field":"title","operator":"isnot","value":["$INFO[ListItem.TVShowTitle]"]}]},"type":"tvshows"}

I didnt get accurate results, means, on some movies the container remains empty.
Here is an example ,with the Movie 'Burke and Hare' https://streamable.com/xy8rs

If i tried that with including duplicate of actual movie, all is fine and is 100% accurate.
using
<!-- MOVIE -->
%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22actor%22%2C%22operator%22%3A%22contains%22%2C%22value%22%3A%5B%22$INFO[Container(8601).ListItem.Label]%22%5D%7D%5D%7D%2C%22type%22%3A%22movies%22%7D
<!-- SHOW -->
%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22actor%22%2C%22operator%22%3A%22contains%22%2C%22value%22%3A%5B%22$INFO[Container(8601).ListItem.Label]%22%5D%7D%5D%7D%2C%22type%22%3A%22tvshows%22%7D
movie
{"order":{"direction":"ascending","ignorefolders":0,"method":"sorttitle"},"rules":{"and":[{"field":"actor","operator":"contains","value":["$INFO[Container(8601).ListItem.Label]"]}]},"type":"movies"}
show
{"order":{"direction":"ascending","ignorefolders":0,"method":"sorttitle"},"rules":{"and":[{"field":"actor","operator":"contains","value":["$INFO[Container(8601).ListItem.Label]"]}]},"type":"tvshows"}

EDIT:

Also tried exclude using 'ListItem.Label' instead of 'ListItem.[Title/TVShowTitle]' for Movies and TV Show Info Content and just TVShowTitle for Episode Info Content,with same results.


This forum uses Lukasz Tkacz MyBB addons.