Fix search from command line

This commit is contained in:
2021-06-03 08:59:11 +02:00
parent 7bf8080825
commit 7a1d6c76cd

View File

@@ -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)