This version was pulled from the master branch of Icefilms, I've basically put everything into it's own script folder and set it up to stand on it's own

Basic functionality:
* addon calls this module with a episode/movie imdb id or title
* module looks in its database for metadata for the required episode/movie
* if not found it scrapes a site for the required metadata, adds it to the database and returns it
* if it is found, it simply returns it from the database
* search by name and return a list of possible matches
How to

When searching by just movie/tv show name I recommend to try and pass in as clean a name as possible, strip anything that is not apart of the actual name eg. many sites display 'The Hangover (2009)', you need to strip (2009) from the name and pass the year in separately

Initialize:

Code:

metaget=metahandlers.MetaData()

You can specify a new cache path by specifying path='<addon data path>' but recommended to use the default

If you wish to download the covers to the cache folders, in prep to release a meta data zip pack to users, specify the preparezip=True option

Quote:script.module.metahandlers
Metahandlers will be the module that can get and cache metadata.
As well as build/download and install metacontainers of pre-packaged metadata for sites (you provide it with a list of all content, and it will pre-make a cache of metadata for that list).

module looks in its database for metadata for the required episode/movie

if not found it scrapes a site for the required metadata, adds it to the database and returns it

if it is found, it simply returns it from the database

is it possible to use the existing xbmc scraper modules rather than having separately maintained ones? (just asking the question - i know nothing about metadata in xbmc)

i assume the intention is to maintain a central database so that if a movie is added from one addon its metadata will be available from all others using the module?

seems what is really needed is to be able to add stuff to the main xbmc library. there is also the hack that is doing the rounds at the moment with creating loads of strm files which is trying to solve the same problem i guess?

also there is the mention of building pre-packaged metadata bundles - this sounds like a nightmare to me but maybe there is a particular use?

there should probably be a definition of what metadata is required. does it include posters/thumbs for example? maybe this would also be a good place to track watched status (especially as it would wok across addons) while we can't do it in xbmc?

(i always find it better to try and define what something is supposed to do before writing code - might save rewriting it too much later. i hope the questions above aren't too silly - as i say i don't know anything about metadata in xbmc )

t0mm0

ps. eldorado you need to add .pyo (and .pyc while you are at it) files to your .gitignore file in this repo!

I think a generic system should only download whats requested at the time and be text only (no images) as these are better stored online rather filling the limited hd of embedded devices apple tv etc...

I'd be interested in helping on this aswell, can you provide a sample that works with ice films v12?

module looks in its database for metadata for the required episode/movie

if not found it scrapes a site for the required metadata, adds it to the database and returns it

if it is found, it simply returns it from the database

I think you nailed it here, pretty much what I was thinking the main functions should be, I'll add this to my op

t0mm0 Wrote:is it possible to use the existing xbmc scraper modules rather than having separately maintained ones? (just asking the question - i know nothing about metadata in xbmc)

Very good question and one I've been asking myself too!

Hoping someone can jump in with the knowledge to give a yay or nay, as your right it's very redundant and quite a bit of extra work to write and maintain a separate scraper

t0mm0 Wrote:i assume the intention is to maintain a central database so that if a movie is added from one addon its metadata will be available from all others using the module?

seems what is really needed is to be able to add stuff to the main xbmc library. there is also the hack that is doing the rounds at the moment with creating loads of strm files which is trying to solve the same problem i guess?

also there is the mention of building pre-packaged metadata bundles - this sounds like a nightmare to me but maybe there is a particular use?

there should probably be a definition of what metadata is required. does it include posters/thumbs for example? maybe this would also be a good place to track watched status (especially as it would wok across addons) while we can't do it in xbmc?

(i always find it better to try and define what something is supposed to do before writing code - might save rewriting it too much later. i hope the questions above aren't too silly - as i say i don't know anything about metadata in xbmc )

t0mm0

All good points, I guess initially I was thinking to basically get this module running on it's own first and keeping all the current functionality that it is performing with Icefilms - pulling in all metadata from plot, genre, cast, thumbnail etc. storing it all in a local cache accessible by any addon, set those as it's initial boundaries then work towards defining what phase 2/enhancements should be.. eg as you said adding to main library, pre-packaged meta containers etc

t0mm0 Wrote:ps. eldorado you need to add .pyo (and .pyc while you are at it) files to your .gitignore file in this repo!

I think a generic system should only download whats requested at the time and be text only (no images) as these are better stored online rather filling the limited hd of embedded devices apple tv etc...

I'd be interested in helping on this aswell, can you provide a sample that works with ice films v12?

I'm not sure the user would like a system that has to re-scrape every time you pull up a list of movies, and I'm assuming nor would a site such as TMDB

The Apple TV has I believe 2gig storage space?

Perhaps an option between saving just text vs text & images?

The code I have posted only works with the master branch of Icefilms due to the number of changes, Anarchintosh had said it was 95% complete, don't see any notes on what is left to do..

If you need a v12 version you can simply pull it from the current addon folder, will need to modify to remove all the icefilms specific logic

- removed all (that I could find) icefilms specific coding, which at quick glance appeared to be scraping the icefilms site for metadata if a IMDB id did not exist, possibly something like this might be useful for other sites, something to keep in mind for updates

- small changes to use getAddonInfo('path') and sqlite3

Below is a quick example on how to scrape for a movie or tv show, the metadata will be stored in a sql db in the addon_data folder

Does this mean that i would need to scrape an IMDB number from each movie the first time round.
The new TVShack has an IMDB number once you click into the page, so what i would need to do is
1.get the webpage and scrape the IMBD number
2.use metautils to get the movie information
3. Then call the add_directory and place all info as you mentioned for each movie.

If movie found then would scrape info . next time if data already there would it not scrape the info.