XBMC Community Forum
Icefilms (Icefilms.info) Addon Development Thread - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Python Add-on Development (/forumdisplay.php?fid=26)
+--- Thread: Icefilms (Icefilms.info) Addon Development Thread (/showthread.php?tid=90315)



- anarchintosh - 2011-01-20 17:21

hey everyone, i'm currently working on the new megaupload classes to add megavideo support and remove all the majority of megaup related code from the main default.py (should help with code neatness). when i'm finished i'll move on to either context menus (for add to favourites feature) or metadata.


- Ilia - 2011-01-21 01:38

@daledude

tried your patch, works well, though the initial times to scrape were a bit long.
Also i had to change from storing the xml to storing just the plot/image, the post scrape load times increased dramatically on my apple tv :>

@anarchintosh

metadata please


- dangerFlakes - 2011-01-21 17:16

OK, so long story short, I'm an idiot.

Got your patch going, works great (except the initial grab takes forever) so I stared scanning the A-Z list letter by letter, but I was watching a movie at the same time. I let it run and after a while it started saying 'script failed' so i just went to the next letter. I knew it was failing because I had a movie playing while the directory was loading, but I didn't mind since i just wanted to scrape and not actual open the directory. Then my box froze. and now the folders I tried scraping wont open, it just says script failed every time i try to open, no movie playing. Folders i didn't originally scrape open and scrape fine though.

I'm sure there's an easy fix but I have no idea what I'm doing, haha. any ideas?


- anarchintosh - 2011-01-21 23:41

update on progress...
have fully moved all megaup handling code to a new module/class thing called megaroutines that is imported into Default.py . tested, it is fully working. in the process i taught myself how to use classes, which are bloody useful. hit a brick wall with megavid, when trying to incorporate pguedes/coolblaze/voinage code for megavid into the module. i'll give it another try at some point.

for now, i have working on metadata set in my crosshairs Smile
metadata+posters will really help to bring the addon to life
thanks daledude for the patch, that should help a lot


- MoseIlla - 2011-01-22 07:58

Is it possible for you to post the zip file here as well as on the Repo?
anarchintosh Wrote:update on progress...
have fully moved all megaup handling code to a new module/class thing called megaroutines that is imported into Default.py . tested, it is fully working. in the process i taught myself how to use classes, which are bloody useful. hit a brick wall with megavid, when trying to incorporate pguedes/coolblaze/voinage code for megavid into the module. i'll give it another try at some point.

for now, i have working on metadata set in my crosshairs Smile
metadata+posters will really help to bring the addon to life
thanks daledude for the patch, that should help a lot



- daledude - 2011-01-22 13:00

*Actually, thinking about initial scrape time... anarch should do the full scrape and then include the movies_cache.db with the script.

The initial scrape is going to take time. I would suggest anarch maybe add a "first time scrape" to get it out of the way or maybe a dialog to let people know whats going on or split the listings into smaller chunks. Further scrapes of new movies should be fast enough. The times where there isn't an entry in tmdb tho is still gonna slow things down. Unless he caches the "not found" entry for a day and then rescrapes the next time the video is accessed.

@Ilia:
Odd that saving just the plot made a difference. It's just text and very little text at that. Maybe the images after the scrape were slowing you down. I didn't put code to cache the images which should be done and anarch said he wanted to do.

@dangerFlakes:
Sounds like your doing devils work there. Remove the cache db in ~/.xbmc/userdata/addon_data/plugin.video.icefilms/movies_cache.db. Anarch might wanna add a "reset cache db" to the settings options or context menu. Be patient with the scrape as it's gonna take time the first time you view video listings.


- dangerFlakes - 2011-01-23 04:42

@daledude
Thanks for the fix. Guess it wasnt all me though. Scraping some folders crashes the script and ends up failing on its own. At least I know how to correct the error so i can access the folder now. I went back to the original py for now, until next release.


- daledude - 2011-01-23 06:24

dangerFlakes Wrote:@daledude
Thanks for the fix. Guess it wasnt all me though. Scraping some folders crashes the script and ends up failing on its own. At least I know how to correct the error so i can access the folder now. I went back to the original py for now, until next release.

If you post the xbmc.log I can try to fix it.


- Ilia - 2011-01-23 08:24

What I did was to add a primary key to imdb_Id and save only name, image path and plot.

I think there was a performance hit when you select a movie and parse the XML returned, on the appletv.

I am not sure if you can use more data in file mode, though apple trailers script does it somehow....hmmmm


- anarchintosh - 2011-01-23 14:01

@Ilia
apple trailers script seems to totally cheat, it also adds metadata to items as you are browsing through them (no waiting for dialog progress to finish), which is just amazing and i would really like to copy if i could work out how it does it.

btw, you can get extra metadata info if you press I key on your keyboard

Update:
i'm using this easy to use pyhon interface with the api, to try and make scraping as fast as possible:
https://github.com/doganaydin/themoviedb/blob/master/themoviedb/tmdb.py

its very fast and provides hooks to a lot of data included in the .xml, but not all (cast,genre,studio) which is annoying.
maybe in the future we/I could assist the developer to add hooks for those.
below is the code that gets the data.
Quote:import tmdb

imdbid=1119646

md = tmdb.imdb(id=imdbid)

moviename = md.getName(0)
rating = md.getRating(0)
duration = md.getRuntime(0)
plot = md.getOverview(0)
mpaa = md.getCertification(0)
premiered = md.getReleased(0)
poster = md.getPoster(0,'cover')[0]

print moviename,rating,duration,plot,mpaa,premiered,poster