Win Need help on building the video fetching plugin
#1
Video 
Greeting everyone, I want to develop some add-on like YouTube from The Collective which can automatically fetch the new video link from server. Because I want to fetch the course video from my faculty video (This is my Senior Project).

But now I downloaded their previous version source code from this link http://code.google.com/p/youtubexbmc/dow...nloadCount

and the thousands line of code get me crazy.

So, anyone can suggest where should I find the beginner guideline to create something like this.


PS. For now i have do the example inside the Beginner's guide that XBMC provide me and I think it too far from the way
the plugin is.
Reply
#2
basically every add-on does this. they typically scrape some html or xml/json api response.

plugin.video.rbk.no (yes, i mentioned it in the other thread as well - it's nothing special with it, just that i wrote it and know it's *very* simple) showcases everything you need

1) fetches a list of videos from a html page. these are returned as 'playable' plugin items (note how we do 'setProperty('IsPlayable','true') you can compare this to a search response in youtube - you get a list of video id's but not the actual playback url, since these are volatile to disallow hotlinking.

2 ) then, when a user plays a video in xbmc, we do another callback to the plugin. this allows the plugin to resolve the urls just before playback commences, hence making volatile urls supportable. in this case, it grabs another page, and extracts the html5 video link. the youtube equivalent is an api call where you give the id and it gives back a (volatile) url to the video file. this is finally returned to xbmc with xbmcplugin.setResolvedUrl

one important thing to remember here is that your add-on is *NOT* constantly running. it's just running when we list a virtual directory or when we do the playback to get the url. so any persistent data you may need have to either be encoded in the url, or stored in some file.
Reply
#3
@spiff

I'm now studying from your codes, and thanks again for very helpful information you give above.

Would you mind if I will send a PM(or post a reply) to you in the future to consult about each line of code (Because i'm very new at Python)

Smile
Reply
#4
sure. just don't expect the response rate you've just had in general Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Need help on building the video fetching plugin0