add join_id
This commit is contained in:
parent
d857f05a3b
commit
cc610a5e12
2 changed files with 4 additions and 1 deletions
|
|
@ -51,5 +51,5 @@ class Videoob(ConsoleApplication):
|
|||
def command_search(self, pattern=None):
|
||||
print (u'Search pattern: %s' % pattern if pattern else u'Last videos').encode('utf-8')
|
||||
for backend, video in self.weboob.do('iter_search_results', pattern=pattern, nsfw=self.options.nsfw):
|
||||
video.id = u'%s@%s' % (video.id, backend.name)
|
||||
video.id = self.join_id(video.provider_id, backend.name)
|
||||
self.format(video)
|
||||
|
|
|
|||
|
|
@ -229,3 +229,6 @@ class ConsoleApplication(BaseApplication):
|
|||
except ValueError:
|
||||
backend_name = None
|
||||
return _id, backend_name
|
||||
|
||||
def join_id(self, provider_id, backend_name):
|
||||
return u'%s@%s' % (provider_id, backend_name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue