CLI: Make episode list output pageable
This commit is contained in:
parent
dea3395b1e
commit
fa766b4ee4
7
bin/gpo
7
bin/gpo
|
@ -219,15 +219,18 @@ class gPodderCli(object):
|
|||
|
||||
@FirstArgumentIsPodcastURL
|
||||
def episodes(self, url=None):
|
||||
output = []
|
||||
for podcast in self.client.get_podcasts():
|
||||
podcast_printed = False
|
||||
if url is None or podcast.url == url:
|
||||
episodes = self._episodesList(podcast)
|
||||
episodes = '\n '.join(episodes)
|
||||
print >>sys.stdout, """
|
||||
output.append("""
|
||||
Episodes from %s:
|
||||
%s
|
||||
""" % (podcast.url, episodes)
|
||||
""" % (podcast.url, episodes))
|
||||
|
||||
self._pager('\n'.join(output))
|
||||
return True
|
||||
|
||||
def list(self):
|
||||
|
|
Loading…
Reference in a new issue