video_list formatter display count in interactive mode, the full ID otherwise
This commit is contained in:
parent
61deb66ac8
commit
24e3671f27
3 changed files with 8 additions and 2 deletions
|
|
@ -38,8 +38,11 @@ class VideoListFormatter(IFormatter):
|
|||
|
||||
def format_dict(self, item):
|
||||
self.count += 1
|
||||
backend = item['id'].split('@', 1)[1]
|
||||
result = u'%s(%d) %s (%s)%s\n' % (ReplApplication.BOLD, self.count, item['title'], backend, ReplApplication.NC)
|
||||
if self.interactive:
|
||||
backend = item['id'].split('@', 1)[1]
|
||||
result = u'%s(%d) %s (%s)%s\n' % (ReplApplication.BOLD, self.count, item['title'], backend, ReplApplication.NC)
|
||||
else:
|
||||
result = u'%s(%s) %s%s\n' % (ReplApplication.BOLD, item['id'], item['title'], ReplApplication.NC)
|
||||
result += ' %s' % item['duration']
|
||||
if item['author'] is not NotLoaded:
|
||||
result += ' - %s' % item['author']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue