+ # Take a shortcut and search directly with youtube-dl
+ if options["feelingLucky"]:
+ if options["download"]: luckyDownload(searchQuery, options)
+ else: luckyPlay(searchQuery, player, options)
+ quit(0)
+
+ let searchResults = getSearchResults(searchQuery)
+ if options["nonInteractive"]: # Present in machine-readable format
+ for index, (title, url) in searchResults:
+ echo title
+ echo url
+ echo ""
+ quit(0)
+
+ let numResults = min(limit, len(searchResults))