one last e-mail: I noticed that the current ubuntu versions of mediatomb ship without scripting support. This is due to the fact that maintaining js scripting seems to be hard (there have been posts about obsolete versions and increased effort regarding finding the correct version etc.).
If the interface layer (that is currently using xulrunner) should not work with the Python C interface (which would keep dependencies at minimum), then I would suggest to use boost::python. I provides a c++ api to access python datastructures more or less in the same way as using python itself. In other words, the wrapping layer could be kept really tiny in terms of source code (with the drawback of adding a boost python dependency).
My feeling would be that it is worth some effort in switching.
python instead of JS would be perfect
Python or perl would be perfect. This will allow the possibility of looking up IMDB or Last.fm, etc in the import scripts.
I've got a patch going to do exactly this, although I will not be going near boost. Frankly there is no need for it. ( not to mention that I have a lot of rude things to say against boost )
as far as I can tell (so far) ( from code diving ) is that the JS engin is only used in the importing to provide an abstraction.
The way I'm coding it up now is to replace this section and this section alone with a python run time ( 2.6 is mu current target ).
The py code would then look like the following.
# do cool stuff here.
mediatomb.log("Starting Import Script")
media = mediatomb.MediaTomb()
if media.mime = "video":
mediatomb.log("end import script")
The mediatomb module would only be availble inside the MediaTomb Runtime as its defined in C(++) with in the runtime context.
I'm happy to take suggestions on what the Python API should look like.
I'll be clear that I'm doing this for my own needs and my dislike for ECMA Script. I'm not going to promise changes that I haven't looked into, so no promises regarding xulrunner :)
to avoid massive cross posts for those following this topic, I'm going to post on the theread that I started.
Log in to post a comment.