Pictures Plugin Help
#1
So I am writing a generic image scraper plugin aimed at giving access to all of a web-comics content on the xbmc. The scraper has been completed and currently works with the following sites (gives latest comic and full archive):

['Comics.com', 'Cooper', 'Sheldon', 'Checker Board Nightmare', 'Little Gamers', 'Something Positive', 'Megatokyo', 'Joe and Monkey', 'Sam and Max', 'Evil Comic', 'Erfworld', 'White Ninja', 'Dunk', 'Perry Bible Fellowship', 'Nothing Nice To Say', 'Ctrl+alt+del', 'Mac Hall', 'Player vs Player', 'Apple Geeks Lite', 'Punks and Nerds', 'Yirmumah', 'The Forge', '8-bit Theater', '2P Start', 'LoL Dogs', 'Dueling Analog Positions', 'Scary Go Around', 'Questionable Content', 'Achewood', 'VG Cats', 'LoL Cats', 'Penny-Arcade', 'Apple Geeks', 'Real Life Comices', 'Chugworth Academy', 'Order of the Stick', 'Photoshop Phriday', 'Goats']

The plugin works (i.e. lists folders) when you are testing it in the browser (i.e. Add Source -> Browse -> Picture Plugins -> plugin -> Site...). However, the script causes my xbox to hang whenever I run it on the source window and try to select anything that will move out of the current window (decend/ascend directory, return to main, settings, etc...). It puts up the busy dialog and that is that. The only relevant portion of the log is:

00:34:05 M: 39866368 ERROR: DIRECTORY::CPluginDirectory::AddItem called with an invalid handle.
00:34:05 M: 39845888 ERROR: DIRECTORY::CPluginDirectory::AddItem called with an invalid handle.
00:34:05 M: 39845888 ERROR: DIRECTORY::CPluginDirectory::EndOfDirectory called with an invalid handle.

Furthermore, when I move down through the directory entries, not descending just hovering over, the script is called like I attempted to descend (trying to get folder thumbnails) which makes navigation laggy.

Anyways, here is the code, anyone got any ideas:
http://www.rarhost.com/download-g2ftsa.html
Reply
#2
1. add a default.tbn file to the root folder.
2. set thumbnailImage in your listitem will prevent it from "(trying to get folder thumbnails)", i noticed a couple places you did not set thumbnailImage.
3. looks like you have a mix of tabs and spaces, so clean that up, it may cause errors which is causing other issues.

about your error message, fix the tab spaces issue first, then try and see what it does. I suggest using spaces instead of tabs, i use 4 spaces, but that's the font i use.

and good luck, i look forward to this plugin.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#3
Ah, found the error. I had somehow converted my strings to...!(unicode, str)? Whatever, a simple pass to unicode and we are in buisness. Now I just need to check all the scrapers and I should have a release out by the end of the week.

One problem though, I am downloading some thumbnails for the main menu and caching them. My current technique is (regardless of the filetype) crc the url of the image, appending .tbn, and storing it in cache. I then set the thumbNail=that path, however, the icon/thumbnail is blank. I am pretty sure the path returned by the crc is correct (I'll check it again though), however, is there anything inherently wrong with that scheme?
Reply
#4
just let XBMC handle caching thumbs. set the thumbnailImage to the http url.

You still need to do no. 1 above or you'll have issues. In Pictures a plugin can be run just by not having a default.tbn file, without selecting the plugin.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#5
Okay, I have the first version finished. If you guys can hammer away at it and tell me what needs to be fixed now, I can work on it when I get time. It isn't beautiful, but it works and expanding is quite easy. If you want to request another comic, feel free to post it here and I will add it when I get time. If you make another listing (in sites.py) just post that listing here and I will update the archive. I uploaded the package to
http://www.xbmczone.com/plugin_details.asp?id=25

Thanks for the great product guys, I'll start giving back more as I get time.
Reply

Logout Mark Read Team Forum Stats Members Help
Pictures Plugin Help0