xml parser


  • Anonymous


    will you add one day or another a xml parser like libxml ?
    the purpose is to scan movie.xml or movieName.nfo files easily

    right now I'm trying to scan these files desperately with no luck.
    I thought there was 2 possibilities :
    1) parsing xml to jso with perl, with transcoding profile, but it's not used for playlists. the script i wrote is never called.

    2) parsing xml text to json in javascript, after getting the xml content from playlist.js. I can get the xml file content as text, but converting it to json object is a pain. 99% of the converting solutions available on the web are based upon specific ie/mozilla/opera DOM objects or AJAX, which is not supported.

    Till now, I found only one xml2json converter (!), pure javascript based, but it's not working either. It's working on an html page, however, so I'm keeping on tryin… but I lost almost one complete day on it already.

    Is there another way to scan xml files with mediatomb ?

    My goal is to have a kind of a serviio copy (serviio is working fine, but the youtube and online part), with the ability to CUSTOMIZE the directories from the database.

  • Jin

    Well, if I had to add support for another online service that I would want to offer as a feature, I'd do it natively in C++ code. Of course this is not an option for everyone and we indeed tried to provide a similar possibility via the customizable playlist parser.

    The good news is, if I read this document correctly, SpiderMonkey 1.8.5 does provide XML parsing support:

    So in theory, once 0.12.2 comes out, you should be able to handle XML in your playlist.js scripts.

    Another way would be to preprocess the XML, you don't have to convet it to json. Just parse out the data that you are interested (with the tool of your choice) in and come up with your own simple line based ASCII playlist format that you can then import and parse using a customized playlist.js in MediaTomb.

    I'd have to read up on serviio, no idea what this is.


  • Anonymous

    that's the problem i have right now. my nfo files are build with same name as the movie, with MCM (other tools do that too), and are XML.
    I have to parse them with playlist.js since the transcoding dont work for playlist (i have a perl that do that at a 107ms per file rate, that's too bad). It's too hard for me so I'm now trying to hack the mimetypes to handle the nfo files as a video then transcode them then parse the json output with import.js, based on the hacked mimetype.


  • Anonymous

    serviio is a python DLNA server almost as yours, except it's not customizable for the playlist part.
    It parses the nfo files and the folder.jpg files, and transcode files in a way I don't really know : Movies are nicely ordered by director, actors, etc.
    It claims to process RSS and youtube too but I never made it work.

    It's a black box based on python, java, ffmpeg, and uses plugins as groovy files for handle of online content (lastfm, TVxPlay, ILive, M6replay, 80 types !) & so on. The groovy files content is java.