Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
Hi guys, I've been trying to do some funky imdb-import scripting but I cannot use the XMLHttpRequest.
Is it possible to add this functionality? Either by enabling the XMLHttpRequest or by adding a function something like readln that you have for playlists? Something like getResponse(url) that returns the entire body for the response.
the features offered by the js library seem limited in some regards (for example file operations were not supported, so we had to add the readln thing).
Of course it is possible to add more server side functions, currently it is not planned.
May I ask what you would like to do with this function?
I would like to create a Sapphire-like virtual structure ( http://appletv.nanopi.net/37/movies-virtual-directory/ ) by looking at the filenames and matching them against IMDB. And then later on maybe also extending the TV Show import-script (http://mediatomb.cc/dokuwiki/scripting:scripting#parsing_of_file_names_for_tv_shows ) I created earlier.
I think that these features would be great improvements for mediatomb.
Hmm, looking at http://sourceforge.net/tracker/index.php?func=detail&aid=1848737&group_id=129766&atid=715783 and especially http://www.imdb.com/help/show_leaf?usedatasoftware I have seen that this is not allowed (scraping imdb.com).
It seems like Sapphire is using scraping ( http://appletv.nanopi.net/svn/trunk/SapphireFrappliance/SapphireMovieImporter.m )
So I could probably create a import-script that does something similar if I could get hold of the html source for a given url.
Can we pleeeease get a html-download function for the import script?
It would be so cool to sort videos by genres, actors, year and so on.
You do realize that it would *significantly* slow down the import, which is already not very fast? :)
Anyway, I do not think that the import script is a good place for stuff like that, I'd rather add another metadata handler that would contact imdb (or whatever service) to dl some info for the movie and populate the meta fields; the import js could then make use of that information.
Yes, I'm even using it on my WL 500gP :-)
However, I don't mind the delay when importing since all I care about is the result and I don't have autoscan enabled.
I do believe that this is the right place to put it because then people can create and share import-scripts that talks to different services (imdb, tvrage etc).
Without the need for a new version of mediatomb when some of the services changes their api.
I so want this feature. I would gladly create the scripts for scraping both imdb and tvrage.
If you so desperately want it - what's the problem with the playlist approach? I.e. custom scraping script outside of MT, creating a specific playlist with all meta descriptions, adapting the playlist.js to support your custom playlist format... the means to get the desired result are there :) And that's easier than convincing me to add http support in js :)
Thank you for this idea!
I now have all my movies sorted by cast, genre, rating, year and the correct title.
However, I cannot share this right now since it is tightly coupled to my setup at the moment.
I do not really like this approach since I have to regenerate the playlist when adding videos (I do cache the results from imdb).