move id2url to Video class

This commit is contained in:
Christophe Benz 2010-04-28 14:49:50 +02:00
commit 7bd936c11b
14 changed files with 69 additions and 76 deletions

View file

@ -45,13 +45,6 @@ class YoupornBackend(BaseBackend, ICapVideoProvider):
return self._browser
raise AttributeError, name
@classmethod
def id2url(cls, _id):
if isinstance(_id, int) or isinstance(_id, (str,unicode)) and _id.isdigit():
return 'http://www.youporn.com/watch/%d' % int(_id)
else:
return str(_id)
def need_url(func):
def inner(self, *args, **kwargs):
url = args[0]