17 lines
587 B
Bash
Executable File
17 lines
587 B
Bash
Executable File
#!/bin/sh
|
|
|
|
escaped_1_temp=$(tr -dc '[:print:]\n' <<< "$1")
|
|
escaped_1=$(sed 's/;//g; s/|//g; s/\[//g; s/\]//g' <<< "$escaped_1_temp")
|
|
|
|
location="./rss/feeds/$escaped_1"
|
|
url=$(awk -F ' ' 'NR=='$2'{print $NF}' "$location")
|
|
|
|
original=$(awk NR==$2 "$location" | tr -dc '[:print:]\n' | sed 's/;//g; s/|//g; s/\[//g; s/\]//g')
|
|
if [[ $original == *"NEW "* ]]; then
|
|
updated=$(sed 's/NEW/OLD/g' <<< "$original")
|
|
sed -i "s;$original;$updated;" "$location"
|
|
fi
|
|
|
|
./shells/yt_dlp_data/add_to_history $url
|
|
mpv --fullscreen --volume=70 --no-config --script-opts=ytdl_hook-try_ytdl_first=yes $url
|