completion on IDs for 'info' and 'play' (closes #396)
This commit is contained in:
parent
cca5e98888
commit
5c53bb52b5
1 changed files with 14 additions and 0 deletions
|
|
@ -153,6 +153,15 @@ class Videoob(ReplApplication):
|
|||
if video:
|
||||
return video
|
||||
|
||||
|
||||
def _complete_id(self):
|
||||
return ['%s@%s' % (video.id, video.backend) for video in self.videos]
|
||||
|
||||
def complete_play(self, text, line, *ignored):
|
||||
args = line.split(' ')
|
||||
if len(args) == 2:
|
||||
return self._complete_id()
|
||||
|
||||
def do_play(self, _id):
|
||||
"""
|
||||
play ID
|
||||
|
|
@ -178,6 +187,11 @@ class Videoob(ReplApplication):
|
|||
print 'The URL of this video is:'
|
||||
print ' %s' % video.url
|
||||
|
||||
def complete_info(self, text, line, *ignored):
|
||||
args = line.split(' ')
|
||||
if len(args) == 2:
|
||||
return self._complete_id()
|
||||
|
||||
def do_info(self, _id):
|
||||
"""
|
||||
info ID
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue