[PATCH] Scraper support for Plugins
#1
Thumbs Up 
Currently we have to manually set the item information for plugins via function "setInfo(type, infoLabels) ".

What I purpose is to have another function "setInfoByScraper(type, scraperFile)" where it will load all information automatically using the provided scraper file.

I am planning on doing the following changes to listitem.cpp:

Code:
1) Add new function setInfoByScraper(type, scraperFile)
            1) Create a CIMDB object
            2) Create a CSScraperInfo object
            3) Create a CScraperParser object with the provided scraper file.
            4) Pass CSScraperInfo into CIMB object
            5) Call CIMDB::FindMovie()
            6) Call CIMB::GetDetails
Looking for more feedback before I continue on development of this patch.

[WIP Patch]
http://xbmc.pastebin.com/md263781
The normal XBMC log IS NOT a debug log, to enable debug logging you must toggle it on under XBMC Settings - System or in advancedsettings.xml. Use XBMC Debug Log Addon to retrieve it.
Reply
#2
why do the plugins need a scrapper? somebody after them or what?
Reply
#3
I noticed that most plugins aren't always filling all the info that XBMC requires for that item. By using xbmc built-in scraper it guarantees that all info that is required is filled in.

Besides feature is already built into xbmc, why have plugin developers write their own ?
The normal XBMC log IS NOT a debug log, to enable debug logging you must toggle it on under XBMC Settings - System or in advancedsettings.xml. Use XBMC Debug Log Addon to retrieve it.
Reply
#4
you missed my point.
Reply
#5
scraper != scrapper
Reply
#6
lol .. typo .. thanks ..
The normal XBMC log IS NOT a debug log, to enable debug logging you must toggle it on under XBMC Settings - System or in advancedsettings.xml. Use XBMC Debug Log Addon to retrieve it.
Reply
#7
He was just making fun because you called them scrappers Rolleyes. The misspelling happens enough that it becomes annoying after a while...

Anyways, I don't want to necessarily discourage you, but I don't think exposing 'scrapers' to plugins would be very useful. Most of the time, plugins list media from a site. These sites generally change their content often enough that plugins re-scrape the site each and everytime a directory is opened.

For this usage (which I would guess maybe 80% of all plugins follow), I using xbmc's scraping would make browsing so slow it would render the plugin unusable.

tl;dr :: Just think about the speed issue before you continue Wink
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply
#8
When I do a plug in I set the infoLabels items so it sets the description, title and stuff. Is that what you're going for?
Reply
#9
MPauley73 Wrote:When I do a plug in I set the infoLabels items so it sets the description, title and stuff. Is that what you're going for?
His plan is to get that information via xbmc's scrapers (imdb, thetvdb, etc) when the site itself doesn't list it.
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply
#10
rwparris2:-

Why do you say it will be slow ? You still need to download the information no matter what .. XBMC functions are threaded so we can continue on adding other items while the original ones are downloaded ..
The normal XBMC log IS NOT a debug log, to enable debug logging you must toggle it on under XBMC Settings - System or in advancedsettings.xml. Use XBMC Debug Log Addon to retrieve it.
Reply
#11
well, one flaw is that CIMDB::GetDetails() is for scraping the info. first you have to locate the movie, i.e. CIMDB::FindMovie()
Reply
#12
spiff Wrote:well, one flaw is that CIMDB::GetDetails() is for scraping the info. first you have to locate the movie, i.e. CIMDB::FindMovie()

What about music and tv shows ?
The normal XBMC log IS NOT a debug log, to enable debug logging you must toggle it on under XBMC Settings - System or in advancedsettings.xml. Use XBMC Debug Log Addon to retrieve it.
Reply
#13
CIMDB handles all video content. for shows you do FindMovie() on the show, then GetDetails() for the show and GetEpisodeDetails() for the episodes

currently the music interface is in a different class, see CMusicInfoScraper
Reply
#14
CrashX Wrote:rwparris2:-

Why do you say it will be slow ? You still need to download the information no matter what .. XBMC functions are threaded so we can continue on adding other items while the original ones are downloaded ..

I have to download the information no matter what? I beg to differ Smile

Maybe I have the wrong idea of how it will work. Please continue.
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply
#15
rwparris2 Wrote:I have to download the information no matter what? I beg to differ Smile

Maybe I have the wrong idea of how it will work. Please continue.

Can you give me an example where you don't have to download the info ? Information that is provided on the site isn't always complete .. it misses actor info, genre, etc ..

I want XBMC plugins to look and feel like XBMC built in ones ( ie Movies, TV Show, Music )
The normal XBMC log IS NOT a debug log, to enable debug logging you must toggle it on under XBMC Settings - System or in advancedsettings.xml. Use XBMC Debug Log Addon to retrieve it.
Reply

Logout Mark Read Team Forum Stats Members Help
[PATCH] Scraper support for Plugins0