2019-07-18, 16:41
2019-07-18, 18:24
(2019-07-18, 16:41)sualfred Wrote: [ -> ]I assume it's the "&" in the title.
To confirm, can you please try to hardcode it with "Burke%20%26%20Hare" to see if that works?
Confirmed.
Titles containing '&' (abd maybe some other signs) dint get results.
Did you know a workaround,or can think of one to try ?
2019-07-18, 18:34
Try my github version of the helper
https://github.com/sualfred/script.embuary.helper
Add this to DialogVideoInfo:
<onload>RunScript(script.embuary.helper,action=encode,string='"$INFO[ListItem.TVShowTitle]"',prop=TVShowTitle)</onload>
<onunload>ClearProperty(TVShowTitle,home)</onunload>
And then you should be able to use $INFO[Window(home).Property(TVShowTitle)] to get the provided string as encoded one for your xsp node.
https://github.com/sualfred/script.embuary.helper
Add this to DialogVideoInfo:
<onload>RunScript(script.embuary.helper,action=encode,string='"$INFO[ListItem.TVShowTitle]"',prop=TVShowTitle)</onload>
<onunload>ClearProperty(TVShowTitle,home)</onunload>
And then you should be able to use $INFO[Window(home).Property(TVShowTitle)] to get the provided string as encoded one for your xsp node.
2019-07-18, 18:40
(2019-07-18, 18:34)sualfred Wrote: [ -> ]Try my github version of the helper
https://github.com/sualfred/script.embuary.helper
Add this to DialogVideoInfo:
<onload>RunScript(script.embuary.helper,action=encode,string='"$INFO[ListItem.TVShowTitle]"',prop=TVShowTitle)</onload>
<onunload>ClearProperty(TVShowTitle,home)</onunload>
And then you should be able to use $INFO[Window(home).Property(TVShowTitle)] to get the provided string as encoded one for your xsp node.
Wow, thanks for fast response.
Will test it tomorrow.
Thanks again.
2019-07-19, 09:33
(2019-07-18, 18:34)sualfred Wrote: [ -> ]Try my github version of the helper
https://github.com/sualfred/script.embuary.helper
Add this to DialogVideoInfo:
<onload>RunScript(script.embuary.helper,action=encode,string='"$INFO[ListItem.TVShowTitle]"',prop=TVShowTitle)</onload>
<onunload>ClearProperty(TVShowTitle,home)</onunload>
And then you should be able to use $INFO[Window(home).Property(TVShowTitle)] to get the provided string as encoded one for your xsp node.
Thanks alot.
Working Pretty great.
Using onload
xml:<onload condition="[ContainerContent(episodes) | String.IsEqual(ListItem.DBTYPE,episode)] + [Skin.HasSetting(UseEnhancedDialog) + !Skin.HasSetting(UseExtendedInfoDialog)]">RunScript(script.embuary.helper,action=encode,string='"$INFO[ListItem.TVShowTitle]"',prop=DecodedTitle)</onload>
<onload condition="![ContainerContent(episodes) | String.IsEqual(ListItem.DBTYPE,episode)] + [Skin.HasSetting(UseEnhancedDialog) + !Skin.HasSetting(UseExtendedInfoDialog)]">RunScript(script.embuary.helper,action=encode,string='"$INFO[ListItem.Label]"',prop=DecodedTitle)</onload>
<onunload>ClearProperty(DecodedTitle,home)</onunload>
And use as content
xml:
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[Window(home).Property(DecodedTitle)]%22%5D%7D%5D%7D%2C%22type%22%3A%22movies%22%7D
shows
%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[Window(home).Property(DecodedTitle)]%22%5D%7D%5D%7D%2C%22type%22%3A%22tvshows%22%7D
2019-07-19, 09:42
Great.
But the prop has to be EncodedTitle, because you are encoding something
But the prop has to be EncodedTitle, because you are encoding something
2019-07-19, 09:49
(2019-07-19, 09:42)sualfred Wrote: [ -> ]Great.
But the prop has to be EncodedTitle, because you are encoding something
Oops, ... ;-)
2019-09-03, 00:17
@sualfred, @jurialmunkey how would I code more complex syntax for this?
I have this right now to check for movies where the main cast members of the current movie appear in:
I want to add to this that the movie title is not the same as ListItem.Title, to exclude the current movie in the results. How would I go about this?
Thanks for your help.
Regards,
Bart
I have this right now to check for movies where the main cast members of the current movie appear in:
xml:
videodb://movies/titles/?xsp=%7B%22rules%22%3A%7B%22or%22%3A%5B%7B%22field%22%3A%22actor%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22$INFO[Container(90050).ListItemAbsolute(0).Label]%22%5D%7D%2C%7B%22field%22%3A%22actor%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22$INFO[Container(90050).ListItemAbsolute(1).Label]%22%5D%7D%2C%7B%22field%22%3A%22actor%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22$INFO[Container(90050).ListItemAbsolute(2).Label]%22%5D%7D%2C%7B%22field%22%3A%22actor%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22$INFO[Container(90050).ListItemAbsolute(3).Label]%22%5D%7D%2C%7B%22field%22%3A%22actor%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22$INFO[Container(90050).ListItemAbsolute(4).Label]%22%5D%7D%2C%7B%22field%22%3A%22actor%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22$INFO[Container(90050).ListItemAbsolute(5).Label]%22%5D%7D%2C%7B%22field%22%3A%22actor%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22$INFO[Container(90050).ListItemAbsolute(6).Label]%22%5D%7D%5D%7D%2C%22type%22%3A%22movies%22%7D
I want to add to this that the movie title is not the same as ListItem.Title, to exclude the current movie in the results. How would I go about this?
Thanks for your help.
Regards,
Bart
2019-09-03, 07:40
you cannot mix "or" and "and" with ?xsp.
But you can use https://github.com/sualfred/script.embua...the-script to create your own JSON call which supports this.
But you can use https://github.com/sualfred/script.embua...the-script to create your own JSON call which supports this.
2019-09-03, 09:10
@bsoriano
I've reworked my "getitemsbyactor" function. Maybe it fits to your needs:
https://github.com/sualfred/script.embua...ndom-actor
https://github.com/sualfred/script.embua...iven-actor
Only available on the GitHub branch atm.
I've reworked my "getitemsbyactor" function. Maybe it fits to your needs:
https://github.com/sualfred/script.embua...ndom-actor
https://github.com/sualfred/script.embua...iven-actor
Only available on the GitHub branch atm.
2019-09-03, 11:36
(2019-09-03, 09:10)sualfred Wrote: [ -> ]@bsoriano
I've reworked my "getitemsbyactor" function. Maybe it fits to your needs:
https://github.com/sualfred/script.embua...ndom-actor
https://github.com/sualfred/script.embua...iven-actor
Only available on the GitHub branch atm.
@sualfred, thanks a lot! This does almost exactly what I was looking for! Would you consider adding 2 or 3 more actors to the “more items by given actor” widget?
Regards,
Bart
2019-09-03, 11:44
(2019-09-03, 07:40)sualfred Wrote: [ -> ]you cannot mix "or" and "and" with ?xsp.
But you can use https://github.com/sualfred/script.embua...the-script to create your own JSON call which supports this.
@sualfred, thank you! I looked at this capability of your script, but I could not figure out the JSON call I needed. I admit I was a bit intimidated by the JSON API wiki.
Regards,
Bart
2019-09-03, 12:07
Here is an example with multiple actors and a excluded title.
Code:
{'and': [{'or': [{'operator': 'is', 'field': 'actor', 'value': 'Vin Diesel'},{'operator': 'is', 'field': 'actor', 'value': 'Bruce Willis'},{'operator': 'is', 'field': 'actor', 'value': 'Sasha Grey'}]}, {'operator': 'isnot', 'field': 'title', 'value': 'Der Gigant aus dem All'}]}
2019-09-03, 14:36
(2019-09-03, 12:07)sualfred Wrote: [ -> ]Here is an example with multiple actors and a excluded title.
Code:
{'and': [{'or': [{'operator': 'is', 'field': 'actor', 'value': 'Vin Diesel'},{'operator': 'is', 'field': 'actor', 'value': 'Bruce Willis'},{'operator': 'is', 'field': 'actor', 'value': 'Sasha Grey'}]}, {'operator': 'isnot', 'field': 'title', 'value': 'Der Gigant aus dem All'}]}
@sualfred, thank you so much!
Regards,
Bart
2019-09-03, 15:47
(2019-09-03, 12:07)sualfred Wrote: [ -> ]Here is an example with multiple actors and a excluded title.@sualfred, should I encode the title into URL format to use in that JSON call or just leave the regular infolabel, such as '$INFO[ListItem.Title]?
Code:
{'and': [{'or': [{'operator': 'is', 'field': 'actor', 'value': 'Vin Diesel'},{'operator': 'is', 'field': 'actor', 'value': 'Bruce Willis'},{'operator': 'is', 'field': 'actor', 'value': 'Sasha Grey'}]}, {'operator': 'isnot', 'field': 'title', 'value': 'Der Gigant aus dem All'}]}
Regards,
Bart