styledEcho $index, ". ", styleBright, fgMagenta, title, "\n", resetStyle, fgCyan, url, "\n"
func isPlaylist(url: string): bool =
+ # Identifies if video is part of a playlist
# Only YouTube playlists are supported for now
"www.youtube.com" in url and "&list=" in url
if options["fullScreen"]: args.add("--fullscreen")
# Playlists are only supported for MPV player
if isPlaylist(url) and player == "mpv":
- args.add("--ytdl-raw-options=\"yes-playlist=\"")
+ let list_arg = url.split('&')[1]
+ args[0] = "https://www.youtube.com/playlist?" & list_arg
return args
proc play*(player: string, options: Table[string, bool], url: string, title: string = "") =