[POC] Python Metadata API for Addon Devs
#1
https://github.com/icefilms-xbmc/metahandlers

Heres a paste from the README:

Quote:Beginnings of a metadata API for XBMC add-on coders.

It has some 'higher level' features over normal metadata APIs:
1) It caches metadata and images.
2) It can create and also install 'metacontainers' which are pre-packaged zipped caches that save an add-on user from having to scrape loads of stuff.
3) Returns the metadata perfectly formatted for XBMC listitems. (not yet implemented, i currently have the default.py of my addon doing this)

Currently only gets Movie metadata, from themoviedb.
Also currently only gets things by IMDB id.

Could be extended to get meta by name+year ie. 'The Hangover (2009)'

Could be extended to handle TV meta by using dbr's TVDB API https://github.com/dbr/tvdb_api/
and the imdb tvdb lookup code. http://pastebin.com/fCTQptVJ

Could also be extended to use IMDB JSON API for items as a fallback for items that fail to scrape properly. https://github.com/dbr/IMDb-Python-API

I won't be able to write all of this myself, so thats why i'm calling it a Proof of Concept.

Think about it, a metadata API, for TV Shows and Movies, that accepts either name+year or imdb id , and caches automatically.

Plus the metacontainer function means you can prepare a database file and upload it somewhere (megauplo*d is the solution i use), so that when you install an addon, you can download a file and get all the metadata right away with no waits between directories.


It was originally intended to be only a part of the icefilms addon, but the feature creep got me, and i thought i'd share it.
Its written by me and daledude
Reply
#2
Nice work - ideally we'd be supplying something like this in core.

Note that you shouldn't need to cache any images - XBMC should handle that transparently for you already.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
thanks jonathon,

yep, i'm sure this could get a huge speed boost if it was in core Smile


the image cache was kind of a hacky way to sought of pre-load an addon with all the images it need.
but i think i might remove this in the future, and have the user download the images as they browse.


...unless you know of a safe way to import a pre-made cache of images into xbmc?
(for some addons, it can total about 500MB Oo of images, and TVDB servers are rather slow)
Reply
#4
Basically all an addon writer has to do is set the URL to the image and XBMC will cache it on demand (and also automatically re-cache it if the image changes).

If you're supplying the URLs to the images then that's fine - just no need to download 'em as you're basically just circumventing the nice, backgrounded image caching in XBMC.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
[POC] Python Metadata API for Addon Devs0