From b98f0f496b6739749257804297468fb71845a776 Mon Sep 17 00:00:00 2001 From: LM-LCL Date: Wed, 19 Apr 2023 21:23:42 +0200 Subject: EZown --- lib/action/Rip | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 lib/action/Rip (limited to 'lib/action/Rip') diff --git a/lib/action/Rip b/lib/action/Rip new file mode 100755 index 0000000..fbdc0e0 --- /dev/null +++ b/lib/action/Rip @@ -0,0 +1,19 @@ +#! /bin/bash + +source ./util/menu/deasy +source ./util/notify +source ./util/dpath + +query="$(deasy "$1" 'Rip Query')" +result="$(spotdl download "$query" --output "$DPATH" --no-cache)" + +if [[ "$result" =~ .*'No song matches found'.* ]] + then + notify 'Empty Response' +elif [[ "$result" =~ .*'already downloaded'.* ]] + then + notify 'Already Downloaded' +fi + +exit 0 + -- cgit v1.2.3