[radioob] add "file" in search subcommand ( does the same as song but an audio file can be a podcast, it is not always a song)
This commit is contained in:
parent
3ce5002d1b
commit
b892aafec3
1 changed files with 4 additions and 4 deletions
|
|
@ -429,9 +429,9 @@ class Radioob(ReplApplication):
|
||||||
@defaultcount(10)
|
@defaultcount(10)
|
||||||
def do_search(self, pattern=None):
|
def do_search(self, pattern=None):
|
||||||
"""
|
"""
|
||||||
search (radio|song|album|playlist) PATTERN
|
search (radio|song|file|album|playlist) PATTERN
|
||||||
|
|
||||||
List (radio|song|album|playlist) matching a PATTERN.
|
List (radio|song|file|album|playlist) matching a PATTERN.
|
||||||
|
|
||||||
If PATTERN is not given, this command will list all the (radio|song|album|playlist).
|
If PATTERN is not given, this command will list all the (radio|song|album|playlist).
|
||||||
"""
|
"""
|
||||||
|
|
@ -453,7 +453,7 @@ class Radioob(ReplApplication):
|
||||||
self.add_object(radio)
|
self.add_object(radio)
|
||||||
self.format(radio)
|
self.format(radio)
|
||||||
|
|
||||||
elif cmd == "song":
|
elif cmd == "song" or cmd == "file":
|
||||||
self.set_formatter('song_list')
|
self.set_formatter('song_list')
|
||||||
for audio in self.do('search_audio', pattern=args):
|
for audio in self.do('search_audio', pattern=args):
|
||||||
self.add_object(audio)
|
self.add_object(audio)
|
||||||
|
|
@ -472,7 +472,7 @@ class Radioob(ReplApplication):
|
||||||
self.format(playlist)
|
self.format(playlist)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print('Search command only supports "radio", "song", "album" and "playlist" arguments.', file=self.stderr)
|
print('Search command only supports "radio", "song", "file", "album" and "playlist" arguments.', file=self.stderr)
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
def do_ls(self, line):
|
def do_ls(self, line):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue