Modular video URL resolving addon?

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Unbehagen Offline
Skilled Python Coder
Posts: 342
Joined: Jul 2007
Reputation: 3
Location: Bremen, Germany
Post: #11
Hey anarch,
please have a look at this first draft of the file host specific module interface:
http://pastebin.com/sRx3xP03
Edit: Or better, let's work on it using this: http://collabedit.com/xmu5w
(This post was last modified: 2011-02-28 01:55 by Unbehagen.)
find quote
Unbehagen Offline
Skilled Python Coder
Posts: 342
Joined: Jul 2007
Reputation: 3
Location: Bremen, Germany
Post: #12
Well, as it is an interface, it should probably raise exceptions instead of returning data. I wrote it this way to make it more understandable what the functions actually do.
find quote
anarchintosh Offline
Fan
Posts: 550
Joined: Jul 2010
Reputation: 4
Post: #13
well i like it so far, your code is neat and understandable.
if we get the interface really solid, and add support for a few video hosts, we can then make sure it's easy for addon devs to add support for more videohosts, to ensure it grows.

i added a path class + function that should be universally used by all sub modules in videoresolver, when storing cookies and other bits of data.
find quote
anarchintosh Offline
Fan
Posts: 550
Joined: Jul 2010
Reputation: 4
Post: #14
@unbehagan
i'm calling the general all-purpose resolver .py the 'master handler'
and the specific file hoster .py the 'specific handler'
if you can think up better names let me know!

my idea is to standardise the general structure of the specific handlers
so they can be used interchangeably from the master handler

this could be done by adding a standardised 'controller' class (my term, means nothing special in python) to each one...
this class would have a function for login, another for resolve etc
...making it easy to backport the various login and resolving functions people have written, by calling them from the functions in the 'controller' class, so we can leave their code untouched and not get bored to death rewriting them all.

this would also mean that if people only want to deal with only one specific handler, they don't have to use the master handler.

hope that makes sense, i'm sure i wouldn't understand myself either.
find quote
Unbehagen Offline
Skilled Python Coder
Posts: 342
Joined: Jul 2007
Reputation: 3
Location: Bremen, Germany
Post: #15
anarchintosh Wrote:this could be done by adding a standardised 'controller' class (my term, means nothing special in python) to each one...
that was actually the idea behind the FileHostModule - it is what you call the specific handler. It is the standard interface from which all individual classes inherit from and overwrite the methods to match the specific host.
anarchintosh Wrote:this class would have a function for login, another for resolve etc
...making it easy to backport the various login and resolving functions people have written, by calling them from the functions in the 'controller' class, so we can leave their code untouched and not get bored to death rewriting them all.
this would also mean that if people only want to deal with only one specific handler, they don't have to use the master handler.
exactly that is the idea.
find quote
anarchintosh Offline
Fan
Posts: 550
Joined: Jul 2010
Reputation: 4
Post: #16
ah ok, i was thinking what we were working on was the master handler...
that makes a bit more sense.
find quote
anarchintosh Offline
Fan
Posts: 550
Joined: Jul 2010
Reputation: 4
Post: #17
update: wrote the init.py

https://github.com/icefilms-xbmc/videour..._init__.py

is it possible you could move your coding to github? they also have a webinterface for editing text documents like the .py files.
if you have a way to chat (skype or jabber or irc or something) please pm me
(This post was last modified: 2011-03-01 13:05 by anarchintosh.)
find quote
Temhil Offline
Skilled Python Coder
Posts: 395
Joined: Apr 2008
Reputation: 1
Location: Canada
Post: #18
Unbehagen Wrote:Hi all,
recently there have been a lot of video streaming plugins that all have to deal with resolving the streamable video URL individually. The most annoying things here are probably one-click-hosting services and youtube-like streaming websites that are a pain to program and debug. If we created one modular addon just for unifying these efforts, it would be much easier to create content plugins for websites distributing their media files using these services.

It should work something like in the youtube plugin:
Code:
url = "plugin://plugin.video.youtube/?path=/root/search&action=play_video&videoid=SOMEID"
, but support a variety of services along with user/premium accounts.

The services that are currently working in other plugins that I know of are: Hotfile, Rapidshare, Megaupload, Youtube, Filesonic. There are probably many more. What do you think?

Just to be sure i fully undertsand your idea: you want to create a library allowing to resolve video URL from main well knowed video hosting websites such as Rapidshare, megavideo, megashare, hotfile, youtube, etc.

Correct?

[Image: passionxbmc_signature.png]
_____________________________

Repositories Installer: select and install unofficial repositories / TAC.TV: watch videos on TAC.TV
Installer Passion-XBMC: Download and Install Add-ons (pre-Dharma only)

[Image: project_thin_badge.gif]
find quote
anarchintosh Offline
Fan
Posts: 550
Joined: Jul 2010
Reputation: 4
Post: #19
@temhil

thats the plan Wink

we've made a fair bit of progress.
https://github.com/icefilms-xbmc/videour...ver-module


its being written as a module and so that all the stuff to do with one hoster is contained within a single .py , to make it easy for people to add more resolvers.

want to help out?
(This post was last modified: 2011-03-02 23:22 by anarchintosh.)
find quote
anarchintosh Offline
Fan
Posts: 550
Joined: Jul 2010
Reputation: 4
Post: #20
new stuff:
added nice new megaup and megavid resolvers, that also work for their adult equivalents.

sorry to keep bumping this thread
find quote