Implementing XBMC scrapers into my C++ project
#1
I am making a multiplayer 3D media browser that launches moves, games, and anything else. It is designed to utilize the player's local XBMC library, if it exists, to find artwork images and information about media items.

I would like to add data scrapers so that my program can find URLs to artwork and stuff automatically. I want it to be able to use the exact same XML scrapers that XBMC uses.

This is important for the users of my program who do NOT have an established media library due to XBMC.

My program already has libcurl implemented and uses it to download the artwork. I am not a very experienced programmer, and figuring out where to start on these types of things seems to be the biggest draw back from being inexperienced.

I've been looking at the source code on github for addon/scrapers.cpp, and it is pretty intimidating.

Do you guys have any general suggestions on how I should go about making my program use XBMC scrapers?

I know it's not going to be easy, but not having to manually specify the artwork for EVERY media item is going to make my program a lot more enjoyable.

I'm currently working on the 2nd version of it, but the SINGLEPLAYER-ONLY beta 1 version is available at http://www.smarcade.net

Oo
Reply
#2
Basically you'd have to rip out only the bits in Scraper.cpp that do the actual scraping (eg the pieces that grab common scraper functions and assemble the final XML that defines the full scraper), plus ScraperUrl.cpp and any dependencies it has (it'll depend on tinyxml, stdstring.h, CFileCurl and CRegExp - all of which could be replaced without much effort with whatever xml, string, http and regexp libraries you are using).

Then, the high-level routines are in VideoInfoLoader.cpp and MusicInfoScraper.cpp etc.

Again, you won't need all of these files - just follow it through and you'll see they just make calls into CScraper(Url).

EDIT: Remember that if you use any XBMC source code then you must follow the GPLv2+.

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
Hmmm, alright. Thank you for the guidance. Looks like I am not going to be disappointed at how hard it is going to be to scrap info off of the internet.

On a side-note (concerning the use of XBMC code), I have written a C++ equivalent to the C# function given at: http://wiki.xbmc.org/index.php?title=Thu...ample_Code

This was required in order to produce the same hashes as XBMC does (which is needed to locate artwork inside of XBMC's library folders). So far, this is the only XBMC-related code I have included in my project. I just want to make sure that this alone would not lock me into using the GPLv2+ license.
Reply
#4
it's your code, doing something general that we did not invent. it's fine.
Reply

Logout Mark Read Team Forum Stats Members Help
Implementing XBMC scrapers into my C++ project0