- var args = @[url]
- if options["musicOnly"]: args.add("--no-video")
- if options["fullScreen"]: args.add("--fullscreen")
- # Playlists are only supported for MPV player
- if isPlaylist(url) and player == "mpv":
- let list_arg = url.split('&')[1]
- args[0] = "https://www.youtube.com/playlist?" & list_arg
- return args
+ let url =
+ # Playlists are only supported for MPV player
+ if isPlaylist(url) and player == "mpv":
+ "https://www.youtube.com/playlist?" & url.split('&')[1]
+ else: url
+ let musicOnly = if options["musicOnly"]: "--no-video" else: ""
+ let fullScreen = if options["fullScreen"]: "--fullscreen" else: ""
+ return filterIt([url, musicOnly, fullScreen], it != "")