From d53dd31a768e2a61ebe48b37af72e1a2d5d35e30 Mon Sep 17 00:00:00 2001 From: Marty Sluijtman Date: Mon, 8 Jul 2024 11:54:18 +0200 Subject: [PATCH] Handle playlists as well --- invyt.nu | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 {