Kodi Community Forum
Chain function -vs- Custom Function - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Scrapers (https://forum.kodi.tv/forumdisplay.php?fid=60)
+--- Thread: Chain function -vs- Custom Function (/showthread.php?tid=103253)



Chain function -vs- Custom Function - JeromyNix - 2011-06-10

I'm not really sure what the difference is....

and i've been attempting to program a replacement for scraperxml (which seems to be a dead project) but i'm a bit stumped on the difference between these two types of functions.


- bambi73 - 2011-06-10

Code:
<url function="AAA">BBB</url>
uses BBB as URL and passes content (of that web page) to function AAA in $$1

Code:
<chain function="AAA">BBB</url>
passes BBB directly to function AAA as string in $$1


- JeromyNix - 2011-06-14

Thanks that explained it perfectly


- JeromyNix - 2011-06-23

One more question.

Is there a priority given to chain functions in relation to custom functions after the function calling them has run its course.

In other words
are chain/custom functions executed in the order of occurrence, or is the set of chain functions run before any custom functions or vice-versa?


RE: Chain function -vs- Custom Function - budswell - 2013-04-18

Is there are way to pass more than one parameter to a chain function?
Or do I just have to encode them into a string and then split them back out inside the function.


RE: Chain function -vs- Custom Function - spiff - 2013-04-18

they are executed in xml order in a depth-first recursion. you have to concat to pass multiple buffers.