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
Unbehagen
Skilled Python Coder Posts: 342 Joined: Jul 2007 Reputation: 3 Location: Bremen, Germany |
2011-02-28 01:45
Post: #11
(This post was last modified: 2011-02-28 01:55 by Unbehagen.)
|
| find quote |
Unbehagen
Skilled Python Coder Posts: 342 Joined: Jul 2007 Reputation: 3 Location: Bremen, Germany |
2011-02-28 01:48
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
Fan Joined: Jul 2010 Reputation: 4 |
2011-02-28 13:01
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
Fan Joined: Jul 2010 Reputation: 4 |
2011-02-28 21:04
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
Skilled Python Coder Posts: 342 Joined: Jul 2007 Reputation: 3 Location: Bremen, Germany |
2011-02-28 21:09
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 etcexactly that is the idea. |
| find quote |
anarchintosh
Fan Joined: Jul 2010 Reputation: 4 |
2011-02-28 21:26
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
Fan Joined: Jul 2010 Reputation: 4 |
2011-03-01 13:03
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
Skilled Python Coder Joined: Apr 2008 Reputation: 1 Location: Canada |
2011-03-02 18:32
Post: #18
Unbehagen Wrote:Hi all, 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? ![]() _____________________________ 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) ![]() |
| find quote |
anarchintosh
Fan Joined: Jul 2010 Reputation: 4 |
2011-03-02 23:09
Post: #19
@temhil
thats the plan ![]() 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
Fan Joined: Jul 2010 Reputation: 4 |
2011-03-04 04:03
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 |

![[Image: passionxbmc_signature.png]](http://jahnrik.free.fr/passionxbmc_signature.png)
![[Image: project_thin_badge.gif]](http://www.ohloh.net/p/passion-xbmc/widgets/project_thin_badge.gif)

Search
Help