From b63045a0c09f13b8a6cf255f275e5f2b04f8d020 Mon Sep 17 00:00:00 2001 From: i-c-u-p <96894903+i-c-u-p@users.noreply.github.com> Date: Wed, 15 Jun 2022 15:03:25 +0000 Subject: use "|" as sed delimiter if pattern has "/" (#1118) removes the need for "/" to be escaped with a backslash --- .local/bin/peertubetorrent | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.local/bin/peertubetorrent') diff --git a/.local/bin/peertubetorrent b/.local/bin/peertubetorrent index e89b1c0..4d8f630 100755 --- a/.local/bin/peertubetorrent +++ b/.local/bin/peertubetorrent @@ -3,7 +3,7 @@ # first argument is the video link, second is the quality (360, 480 or 1080) # 13/07/20 - Arthur Bais -instance=$(echo "$1" | sed "s/\/w.\+//") -vidid=$(echo "$1" | sed "s/.\+\///") +instance=$(echo "$1" | sed "s|/w.\+||") +vidid=$(echo "$1" | sed "s|.\+/||") link=$(curl -s "$instance/api/v1/videos/$vidid" | grep -o "$instance/download/torrents/.\{37\}$2.torrent") transadd "$link" -- cgit v1.3.1