Release script.toolbox
#19
(2014-10-31, 06:07)phil65 Wrote: you can use IsEmpty(VideoPlayer.Art(xxx)) (or am i missing something?)
phil65,

Sorry mate, you're missing something. That would work if you are using something supported by VideoPlayer.Art(xxx), but what happens if there is a art type not supported by Kodi? Or if you wanted to go that extra mile and try to bring in a image that had not been scanned into the DB but was still available in the local directory? For example here is one of my $VAR's

PHP Code:
    <variable name="ListViewVideoLogo">
        <
value condition="!IsEmpty(ListItem.Art(clearlogo)) + [Container.Content(tvshows) | Container.Content(seasons) | Container.Content(episodes) | Container.Content(movies)]">$INFO[ListItem.Art(clearlogo)]</value>
        <
value condition="!IsEmpty(ListItem.Art(tvshow.clearlogo)) + [Container.Content(tvshows) | Container.Content(seasons) | Container.Content(episodes)]">$INFO[ListItem.Art(tvshow.clearlogo)]</value>
        <
value condition="IsEmpty(ListItem.Art(clearlogo)) + [Container.Content(tvshows) | Container.Content(seasons) | Container.Content(movies)]">$INFO[ListItem.path,,logo.png]</value>
        <
value condition="IsEmpty(ListItem.Art(tvshow.clearlogo)) + [Container.Content(tvshows) | Container.Content(seasons)]">$INFO[ListItem.path,,logo.png]</value>
        <
value condition="IsEmpty(ListItem.Art(clearlogo)) + Container.Content(episodes)">$INFO[ListItem.Path,,../logo.png]</value>
        <
value>blank.png</value
If $INFO[ListItem.Path] has something in it, the $VAR would not be empty and so the IsEmpty would not work (although looking at what I have there, the second last <value> tag would still return something even if nothing there, so a bug on my behalf). Point is I want to make sure I show some graphic on screen, and I want to check thru a list of possible candidates until I find something to display. So from previous example in last message, check all of the possible cleararts, then all of the possible logos and finally just show the icon/thumb if nothing else available.

That's a lot of checks and a lot of code just to make sure something nice is showing on screen (and very likely a lot of time if I get right to the end before I find something to display).

Wyrm
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply


Messages In This Thread
script.toolbox - by phil65 - 2014-10-30, 00:27
RE: [RLEASE] script.toolbox - by Bumpaneer - 2015-03-06, 00:27
RE: [RLEASE] script.toolbox - by phil65 - 2015-03-06, 01:26
RE: Suggestion: Script to expose python functions to skinners - by wyrm - 2014-10-31, 08:24
RE: [RLEASE] script.toolbox - by jurialmunkey - 2015-03-06, 02:11
RE: [RLEASE] script.toolbox - by senna99 - 2015-03-11, 13:25
RE: script.toolbox - by phil65 - 2015-03-11, 19:24
RE: script.toolbox - by senna99 - 2015-03-11, 21:01
RE: script.toolbox - by sualfred - 2015-03-16, 11:50
RE: script.toolbox - by phil65 - 2015-03-16, 12:03
RE: script.toolbox - by sualfred - 2015-03-16, 12:29
RE: script.toolbox - by Jayz2K - 2015-05-19, 09:31
RE: script.toolbox - by phil65 - 2015-05-19, 15:35
RE: script.toolbox - by Jayz2K - 2015-05-19, 16:10
RE: script.toolbox - by phil65 - 2015-05-19, 16:22
RE: script.toolbox - by Jayz2K - 2015-05-19, 16:59
RE: script.toolbox - by Hitcher - 2015-05-20, 17:22
RE: script.toolbox - by phil65 - 2015-05-20, 17:38
RE: script.toolbox - by phil65 - 2015-05-20, 17:42
RE: script.toolbox - by Hitcher - 2015-05-20, 17:47
RE: script.toolbox - by Hitcher - 2015-05-20, 20:31
RE: script.toolbox - by phil65 - 2015-05-20, 20:40
RE: script.toolbox - by Hitcher - 2015-05-20, 20:41
RE: script.toolbox - by phil65 - 2015-05-20, 21:17
RE: script.toolbox - by Jayz2K - 2015-05-20, 22:02
RE: script.toolbox - by phil65 - 2015-05-20, 22:17
RE: script.toolbox - by Hitcher - 2015-05-21, 19:01
RE: script.toolbox - by phil65 - 2015-05-21, 19:30
RE: script.toolbox - by Hitcher - 2015-05-21, 19:33
RE: script.toolbox - by phil65 - 2015-05-21, 19:34
RE: script.toolbox - by Hitcher - 2015-05-21, 19:42
RE: script.toolbox - by phil65 - 2015-05-21, 19:46
RE: script.toolbox - by Hitcher - 2015-05-21, 19:50
RE: script.toolbox - by phil65 - 2015-05-21, 19:53
RE: script.toolbox - by Hitcher - 2015-05-21, 20:01
RE: script.toolbox - by sualfred - 2015-05-21, 20:22
RE: script.toolbox - by Hitcher - 2015-05-21, 21:14
RE: script.toolbox - by phil65 - 2015-05-22, 00:17
RE: script.toolbox - by User 224999 - 2015-05-22, 00:39
RE: script.toolbox - by Hitcher - 2015-05-26, 09:17
RE: script.toolbox - by phil65 - 2015-05-22, 02:32
RE: script.toolbox - by wyrm - 2015-05-22, 06:18
RE: script.toolbox - by phil65 - 2015-05-22, 06:58
RE: script.toolbox - by wyrm - 2015-05-22, 08:55
RE: script.toolbox - by Hitcher - 2015-05-22, 08:06
RE: script.toolbox - by Hitcher - 2015-05-22, 19:17
RE: script.toolbox - by phil65 - 2015-05-22, 20:44
RE: script.toolbox - by sualfred - 2015-05-22, 19:30
RE: script.toolbox - by braz - 2015-05-26, 13:18
RE: script.toolbox - by phil65 - 2015-05-26, 13:52
RE: script.toolbox - by braz - 2015-05-26, 13:55
RE: script.toolbox - by Wanilton - 2015-05-26, 14:14
RE: script.toolbox - by mikeSiLVO - 2015-06-27, 19:29
RE: script.toolbox - by phil65 - 2015-06-27, 19:56
RE: script.toolbox - by mikeSiLVO - 2015-06-27, 20:09
RE: script.toolbox - by phil65 - 2015-06-27, 20:12
RE: script.toolbox - by janeczku - 2015-07-01, 08:20
RE: script.toolbox - by Fist - 2015-07-15, 10:52
RE: script.toolbox - by sualfred - 2015-07-05, 08:56
RE: script.toolbox - by Hitcher - 2015-07-05, 10:55
RE: script.toolbox - by sualfred - 2015-07-05, 11:00
RE: script.toolbox - by Hitcher - 2015-07-05, 11:15
RE: script.toolbox - by sualfred - 2015-07-05, 11:19
RE: script.toolbox - by mikeSiLVO - 2015-07-20, 10:07
RE: script.toolbox - by phil65 - 2015-07-20, 14:30
RE: script.toolbox - by mikeSiLVO - 2015-07-20, 17:48
RE: script.toolbox - by phil65 - 2015-07-20, 17:52
RE: script.toolbox - by mikeSiLVO - 2015-07-27, 10:53
RE: script.toolbox - by im85288 - 2015-07-20, 19:50
RE: script.toolbox - by Hitcher - 2015-07-20, 21:29
RE: script.toolbox - by Jayz2K - 2015-07-23, 18:54
RE: script.toolbox - by mbuzina - 2015-07-28, 18:00
RE: script.toolbox - by phil65 - 2015-07-28, 18:11
RE: script.toolbox - by Fist - 2015-07-29, 08:23
RE: script.toolbox - by Fist - 2015-08-20, 09:57
RE: script.toolbox - by janeczku - 2015-07-29, 15:45
RE: script.toolbox - by JDizzy - 2015-07-30, 18:56
RE: script.toolbox - by Fist - 2015-07-30, 20:35
script.toolbox - by mbuzina - 2015-07-30, 15:28
RE: script.toolbox - by Fist - 2015-07-31, 12:04
RE: script.toolbox - by Fist - 2015-08-03, 08:30
RE: script.toolbox - by Mike_Doc - 2015-08-23, 20:12
RE: script.toolbox - by Stildawn - 2015-09-02, 09:35
RE: script.toolbox - by scott967 - 2015-09-08, 22:37
RE: script.toolbox - by Jayz2K - 2015-09-08, 23:53
RE: script.toolbox - by phil65 - 2015-09-09, 01:44
RE: script.toolbox - by scott967 - 2015-09-09, 02:31
RE: script.toolbox - by phil65 - 2015-09-09, 03:29
RE: script.toolbox - by Pienoet - 2015-11-01, 20:36
RE: script.toolbox - by noxx2 - 2015-11-06, 09:16
RE: script.toolbox - by thy1225 - 2015-12-30, 12:26
RE: script.toolbox - by eshep - 2016-07-01, 03:44
RE: script.toolbox - by braz - 2016-05-27, 22:40
RE: script.toolbox - by emre.ay - 2016-07-03, 12:33
RE: script.toolbox - by badaas - 2016-07-17, 10:11
RE: script.toolbox - by tommymsw - 2016-07-16, 02:43
RE: script.toolbox - by TaceN - 2017-05-13, 23:29
RE: script.toolbox - by badaas - 2017-07-17, 00:26
RE: script.toolbox - by Greatnloopy - 2017-07-17, 08:22
RE: script.toolbox - by heula - 2018-08-16, 12:27
Logout Mark Read Team Forum Stats Members Help
script.toolbox2