lidarr-dl/lidarr/setup.bash

161 lines
5.8 KiB
Bash
Raw Normal View History

2023-07-09 21:34:40 +02:00
#!/usr/bin/with-contenv bash
SMA_PATH="/usr/local/sma"
version="1.3"
2023-07-09 21:34:40 +02:00
echo "*** install packages ***" && \
apk add -U --upgrade --no-cache \
tidyhtml \
musl-locales \
musl-locales-lang \
flac \
jq \
git \
gcc \
ffmpeg \
imagemagick \
opus-tools \
2023-09-09 02:17:37 +02:00
opustags \
2023-07-09 21:34:40 +02:00
python3-dev \
libc-dev \
py3-pip \
npm && \
2023-07-09 21:34:40 +02:00
echo "*** install freyr client ***" && \
apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing atomicparsley && \
npm install -g miraclx/freyr-js &&\
echo "*** install python packages ***" && \
pip install --upgrade --no-cache-dir --break-system-packages \
2024-03-25 18:06:34 +01:00
jellyfish==0.10 \
yt-dlp \
beets \
2023-07-09 21:34:40 +02:00
yq \
pyxDamerauLevenshtein \
2023-07-09 21:34:40 +02:00
pyacoustid \
requests \
colorama \
python-telegram-bot \
2023-07-09 21:34:40 +02:00
pylast \
mutagen \
r128gain \
tidal-dl \
deemix && \
echo "************ setup SMA ************" && \
echo "************ setup directory ************" && \
mkdir -p ${SMA_PATH} && \
echo "************ download repo ************" && \
git clone https://github.com/mdhiggins/sickbeard_mp4_automator.git ${SMA_PATH} && \
mkdir -p ${SMA_PATH}/config && \
echo "************ create logging file ************" && \
mkdir -p ${SMA_PATH}/config && \
touch ${SMA_PATH}/config/sma.log && \
chgrp users ${SMA_PATH}/config/sma.log && \
chmod g+w ${SMA_PATH}/config/sma.log && \
echo "************ install pip dependencies ************" && \
2024-03-25 18:06:34 +01:00
python3 -m pip install --break-system-packages --upgrade pip && \
pip3 install --break-system-packages -r ${SMA_PATH}/setup/requirements.txt
2023-07-09 21:34:40 +02:00
mkdir -p /custom-services.d
2023-07-09 21:34:40 +02:00
echo "Download QueueCleaner service..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/universal/services/QueueCleaner -o /custom-services.d/QueueCleaner
echo "Done"
echo "Download AutoConfig service..."
2023-07-10 15:19:31 +02:00
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/AutoConfig.service.bash -o /custom-services.d/AutoConfig
2023-07-09 21:34:40 +02:00
echo "Done"
2023-07-10 15:16:19 +02:00
echo "Download Video service..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/Video.service.bash -o /custom-services.d/Video
echo "Done"
2023-08-13 22:38:30 +02:00
echo "Download Tidal Video Downloader service..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/TidalVideoDownloader.bash -o /custom-services.d/TidalVideoDownloader
echo "Done"
2023-07-11 14:16:47 +02:00
echo "Download Audio service..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/Audio.service.bash -o /custom-services.d/Audio
echo "Done"
2023-07-14 22:01:23 +02:00
echo "Download AutoArtistAdder service..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/AutoArtistAdder.bash -o /custom-services.d/AutoArtistAdder
echo "Done"
2023-07-09 21:34:40 +02:00
echo "Download UnmappedFilesCleaner service..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/UnmappedFilesCleaner.bash -o /custom-services.d/UnmappedFilesCleaner
echo "Done"
mkdir -p /custom-services.d/python
echo "Download ARLChecker service..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/python/ARLChecker.py -o /custom-services.d/python/ARLChecker.py
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/ARLChecker -o /custom-services.d/ARLChecker
echo "Done"
2023-07-09 21:34:40 +02:00
mkdir -p /config/extended
2023-07-20 12:38:50 +02:00
echo "Download Script Functions..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/universal/functions.bash -o /config/extended/functions
echo "Done"
2023-07-09 21:34:40 +02:00
echo "Download PlexNotify script..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/PlexNotify.bash -o /config/extended/PlexNotify.bash
echo "Done"
echo "Download SMA config..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/sma.ini -o /config/extended/sma.ini
echo "Done"
if [ ! -f /config/extended/beets-config.yaml ]; then
echo "Download Beets config..."
curl "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/beets-config.yaml" -o /config/extended/beets-config.yaml
echo "Done"
fi
if [ ! -f /config/extended/beets-config-lidarr.yaml ]; then
echo "Download Beets lidarr config..."
curl "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/beets-config-lidarr.yaml" -o /config/extended/beets-config-lidarr.yaml
echo "Done"
fi
2023-09-08 20:22:11 +02:00
2023-07-13 12:47:02 +02:00
echo "Download Deemix config..."
curl "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/deemix_config.json" -o /config/extended/deemix_config.json
echo "Done"
2023-07-13 21:32:39 +02:00
echo "Download Tidal config..."
curl "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/tidal-dl.json" -o /config/extended/tidal-dl.json
echo "Done"
2023-09-07 15:02:37 +02:00
echo "Download LyricExtractor script..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/LyricExtractor.bash -o /config/extended/LyricExtractor.bash
echo "Done"
2023-09-09 02:26:21 +02:00
echo "Download ArtworkExtractor script..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/ArtworkExtractor.bash -o /config/extended/ArtworkExtractor.bash
echo "Done"
2023-09-08 23:41:20 +02:00
echo "Download Beets Tagger script..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/BeetsTagger.bash -o /config/extended/BeetsTagger.bash
echo "Done"
2023-09-08 19:22:38 +02:00
if [ ! -f /config/extended/beets-genre-whitelist.txt ]; then
echo "Download beets-genre-whitelist.txt..."
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/beets-genre-whitelist.txt -o /config/extended/beets-genre-whitelist.txt
echo "Done"
fi
2023-07-12 16:03:50 +02:00
if [ ! -f /config/extended.conf ]; then
echo "Download Extended config..."
2023-07-12 16:09:37 +02:00
curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/lidarr/extended.conf -o /config/extended.conf
2023-07-12 16:03:50 +02:00
chmod 777 /config/extended.conf
echo "Done"
fi
2023-07-09 21:34:40 +02:00
chmod 777 -R /config/extended
2023-09-09 21:11:54 +02:00
chmod 777 -R /root
if [ -f /custom-services.d/scripts_init.bash ]; then
# user misconfiguration detected, sleeping...
sleep infinity
fi
2023-07-09 21:34:40 +02:00
exit