diff --git a/invyt.nu b/invyt.nu index 1b3fb6b..53dcc22 100755 --- a/invyt.nu +++ b/invyt.nu @@ -3,7 +3,9 @@ def parse_url [url: string] { let parsed_url = $url | url parse - if ($parsed_url.path | str contains '/watch') { + let correct_string = ($parsed_url.path | grep -E "(playlist|watch)" | complete).exit_code + + if ($correct_string == 0) { if $parsed_url.host != "youtube.com" { $url | str replace $parsed_url.host "youtube.com" } else {