bundles/mixcloud-downloader: improvements
This commit is contained in:
parent
15ea875742
commit
d86dc32f51
1 changed files with 25 additions and 7 deletions
|
@ -1,6 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
[[ -n "$DEBUG" ]] && set -x
|
OPTS=""
|
||||||
|
if [[ -n "$DEBUG" ]]
|
||||||
|
then
|
||||||
|
set -x
|
||||||
|
else
|
||||||
|
OPTS="-q"
|
||||||
|
fi
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
@ -13,8 +19,11 @@ source /opt/mixcloud-downloader/venv/bin/activate
|
||||||
|
|
||||||
pip install --upgrade pip yt-dlp
|
pip install --upgrade pip yt-dlp
|
||||||
|
|
||||||
|
errors=0
|
||||||
|
|
||||||
for i in Neosignal tasmo starkato b4m Alexeyan jakehunnter davem_dokebi tasmo
|
for i in Neosignal tasmo starkato b4m Alexeyan jakehunnter davem_dokebi tasmo
|
||||||
do
|
do
|
||||||
|
echo "> mixcloud $i" >&2
|
||||||
if ! [[ -d "/storage/nas/Musik/mixcloud/$i" ]]
|
if ! [[ -d "/storage/nas/Musik/mixcloud/$i" ]]
|
||||||
then
|
then
|
||||||
# no -p here, this should fail if
|
# no -p here, this should fail if
|
||||||
|
@ -23,11 +32,14 @@ do
|
||||||
fi
|
fi
|
||||||
(
|
(
|
||||||
cd "/storage/nas/Musik/mixcloud/$i"
|
cd "/storage/nas/Musik/mixcloud/$i"
|
||||||
yt-dlp "https://mixcloud.com/$i"
|
yt-dlp $OPTS "https://mixcloud.com/$i"
|
||||||
)
|
echo $? >&2
|
||||||
|
) || errors=1
|
||||||
done
|
done
|
||||||
|
|
||||||
for i in CouchsofaLiveSets
|
for i in CouchsofaLiveSets
|
||||||
|
do
|
||||||
|
echo "> archive.org $i" >&2
|
||||||
if ! [[ -d "/storage/nas/Musik/mixcloud/$i" ]]
|
if ! [[ -d "/storage/nas/Musik/mixcloud/$i" ]]
|
||||||
then
|
then
|
||||||
# no -p here, this should fail if
|
# no -p here, this should fail if
|
||||||
|
@ -36,11 +48,14 @@ for i in CouchsofaLiveSets
|
||||||
fi
|
fi
|
||||||
(
|
(
|
||||||
cd "/storage/nas/Musik/mixcloud/$i"
|
cd "/storage/nas/Musik/mixcloud/$i"
|
||||||
yt-dlp "https://archive.org/details/$i"
|
yt-dlp $OPTS "https://archive.org/details/$i"
|
||||||
)
|
echo $? >&2
|
||||||
|
) || errors=1
|
||||||
done
|
done
|
||||||
|
|
||||||
for i in tschunkelmusik
|
for i in tschunkelmusik
|
||||||
|
do
|
||||||
|
echo "> soundcloud $i" >&2
|
||||||
if ! [[ -d "/storage/nas/Musik/mixcloud/$i" ]]
|
if ! [[ -d "/storage/nas/Musik/mixcloud/$i" ]]
|
||||||
then
|
then
|
||||||
# no -p here, this should fail if
|
# no -p here, this should fail if
|
||||||
|
@ -49,6 +64,9 @@ for i in tschunkelmusik
|
||||||
fi
|
fi
|
||||||
(
|
(
|
||||||
cd "/storage/nas/Musik/mixcloud/$i"
|
cd "/storage/nas/Musik/mixcloud/$i"
|
||||||
yt-dlp "https://soundcloud.com/$i"
|
yt-dlp $OPTS "https://soundcloud.com/$i"
|
||||||
)
|
echo $? >&2
|
||||||
|
) || errors=1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
exit $errors
|
||||||
|
|
Loading…
Reference in a new issue