-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:
Bezleputh 2013-05-13 22:01:29 +02:00 committed by Florent
commit d2724577c8
2 changed files with 14 additions and 12 deletions

View file

@ -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}