Compare commits

...

2 Commits

Author SHA1 Message Date
ae5f61c9c7
Added Music Volumin 2025-01-20 00:15:45 +01:00
8ada730dbe
Getting spotify playlist 2025-01-20 00:15:32 +01:00
2 changed files with 49 additions and 0 deletions

47
.local/bin/getting-spotify Executable file
View File

@ -0,0 +1,47 @@
#!/bin/bash
FOLDER_FAV="/Volumes/Music/Jellyfin/Playlist-Fav"
FOLDER_DUB="/Volumes/Music/Jellyfin/Playlist-Dub"
# Check if folder exists
[ ! -d $FOLDER_DUB ] && exit 1
[ ! -d $FOLDER_FAV ] && exit 1
# Remove old files
rm -rfv $FOLDER_DUB/errors.txt
rm -rfv $FOLDER_FAV/errors.txt
# Download new files for DUB
cd $FOLDER_DUB || exit 1
spotdl --user-auth --keep-alive \
--threads 8 \
--output "{artist}/{album}/{track-number} - {title}.{output-ext}" \
download "https://open.spotify.com/playlist/5Y6hRcNinZaoZGiadaXDEC?si=78d89f9a1a974fdf" \
--print-errors \
--save-errors $FOLDER_DUB/errors.txt \
--yt-dlp-args no-check-certificates
# Download new files for NEW
cd $FOLDER_FAV || exit 1
spotdl --user-auth --keep-alive \
--threads 8 \
--output "{artist}/{album}/{track-number} - {title}.{output-ext}" \
download "https://open.spotify.com/playlist/2P063NZZOPC9gvZrPAHZh9?si=33c34cdd981c4949" \
--print-errors \
--save-errors $FOLDER_FAV/errors.txt \
--yt-dlp-args no-check-certificates
# Sync to Jellyfin
rsync -h --progress --recursive \
$FOLDER_DUB/* docker-de:/mnt/HC_Volume_34966154/jellifin/media/music/Dub
rsync -h --progress --recursive \
$FOLDER_FAV/* docker-de:/mnt/HC_Volume_34966154/jellifin/media/music/Fav
# Generate playlist
ssh docker-de -t "cd /mnt/HC_Volume_34966154/jellifin/media/music/Dub; find . -type f \( -name '*.mp3' -o -name '*.flac' -o -name '*.loss' -o -name '*.aiff' -o -name '*.aif' \) -printf './%P\n' | sort > playlist.m3u"
ssh docker-de -t "cd /mnt/HC_Volume_34966154/jellifin/media/music/Fav; find . -type f \( -name '*.mp3' -o -name '*.flac' -o -name '*.loss' -o -name '*.aiff' -o -name '*.aif' \) -printf './%P\n' | sort > playlist.m3u"
# Fix permissions
ssh docker-de -t 'chown docker-user: /mnt/HC_Volume_34966154/jellifin -R'

View File

@ -2,6 +2,7 @@
~/.local/bin/sidebar-restore-macos
open -gj "afp://10.0.0.14/Downloads"
open -gj "afp://10.0.0.14/Anime"
open -gj "afp://10.0.0.14/Music"
open -gj "afp://10.0.0.14/Video"
open -gj "afp://10.0.0.14/Series"
open -gj "afp://10.0.0.14/Photos"
@ -11,6 +12,7 @@ open -gj "afp://10.0.0.14/Recordings"
/usr/local/bin/mysides add Synology file:///Volumes/Recordings/
/usr/local/bin/mysides add Synology file:///Volumes/Backups/
/usr/local/bin/mysides add Synology file:///Volumes/Downloads/
/usr/local/bin/mysides add Synology file:///Volumes/Music/
/usr/local/bin/mysides add Synology file:///Volumes/Video/
/usr/local/bin/mysides add Synology file:///Volumes/Series/
/usr/local/bin/mysides add Synology file:///Volumes/Photos/