Fix search from command line
This commit is contained in:
@@ -156,9 +156,10 @@ def argument(*name_or_flags, **kwargs):
|
|||||||
return ([*name_or_flags], kwargs)
|
return ([*name_or_flags], kwargs)
|
||||||
|
|
||||||
|
|
||||||
@subcommand([argument('query', help='Search query')])
|
@subcommand([argument('day', help='Day of the song'),
|
||||||
|
argument('hour', help='Hour the song was played')])
|
||||||
def search(args):
|
def search(args):
|
||||||
results = search_song(datetime.fromisoformat(args.query))
|
results = search_song(dt.datetime.fromisoformat(args.day), int(args.hour))
|
||||||
for res in results:
|
for res in results:
|
||||||
print_aircast(res)
|
print_aircast(res)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user