-retrait de ICapCollection -correction du fonctionnement de get_video pour gérer les id à la place d'objets video
Signed-off-by: Bezleputh <carton_ben@yahoo.fr>
This commit is contained in:
parent
57db9bbebb
commit
d2724577c8
2 changed files with 14 additions and 12 deletions
|
|
@ -20,12 +20,11 @@
|
|||
|
||||
from weboob.tools.backend import BaseBackend
|
||||
from weboob.capabilities.video import ICapVideo, BaseVideo
|
||||
from weboob.capabilities.collection import ICapCollection
|
||||
from .browser import GroovesharkBrowser
|
||||
|
||||
__all__ = ['GroovesharkBackend']
|
||||
|
||||
class GroovesharkBackend(BaseBackend, ICapVideo, ICapCollection):
|
||||
class GroovesharkBackend(BaseBackend, ICapVideo):
|
||||
NAME = 'grooveshark'
|
||||
DESCRIPTION = u'grooveshark website'
|
||||
MAINTAINER = u'Bezleputh'
|
||||
|
|
@ -48,8 +47,8 @@ class GroovesharkBackend(BaseBackend, ICapVideo, ICapCollection):
|
|||
for video in self.browser.search_videos(pattern, max_results):
|
||||
yield video
|
||||
|
||||
def get_video(self, video):
|
||||
def get_video(self, _id):
|
||||
with self.browser:
|
||||
return self.browser.fill_stream_list(video)
|
||||
return self.browser.get_video_from_song_id(_id)
|
||||
|
||||
OBJECTS = {BaseVideo: fill_video}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue