Replace spotDL with SomeDL, rename container to somedl

This commit is contained in:
2026-08-03 22:59:14 +02:00
rodzic 56bb7b2e43
commit 29c29eb728
8 zmienionych plików z 183 dodań i 253 usunięć
+38
Wyświetl plik
@@ -0,0 +1,38 @@
### SomeDL - Downloader di brani da YouTube con Web UI
### Based on SomeDL: https://github.com/ChemistryGull/SomeDL
###
### BUILD: podman build -t localhost/somedl:latest .
### EXPORT: podman save -o somedl.tar localhost/somedl:latest
###
FROM docker.io/library/python:3.14-slim
# Dipendenze di sistema:
# - ffmpeg: richiesto da yt-dlp per la conversione audio
# - curl/unzip: necessari allo script di installazione di Deno
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg \
curl \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Installazione Deno con lo script ufficiale (raccomandato da yt-dlp)
RUN curl -fsSL https://deno.land/install.sh | sh
ENV PATH="/root/.deno/bin:${PATH}"
# Installazione SomeDL
RUN pip install --no-cache-dir somedl
# Entrypoint: genera la config al primo avvio e lancia la WebUI
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
# Creazione directory configurazione e download
RUN mkdir -p /root/.config/SomeDL /app/downloads
WORKDIR /app
# Volume mount point per i download
VOLUME ["/app/downloads"]
ENTRYPOINT ["/app/entrypoint.sh"]
+18
Wyświetl plik
@@ -0,0 +1,18 @@
#!/bin/bash
set -e
CONFIG_FILE="/root/.config/SomeDL/somedl_config.toml"
# Genera la configurazione al primo avvio (poi modificabile anche dalla WebUI)
if [ ! -f "$CONFIG_FILE" ]; then
echo "[entrypoint] Generazione configurazione SomeDL"
somedl --generate-config
# Cartella di output sul volume dei download
sed -i 's|^output_dir = "."|output_dir = "/app/downloads"|' "$CONFIG_FILE"
# WebUI raggiungibile dall'esterno del container, senza aprire il browser
sed -i 's|^host = "127.0.0.1"|host = "0.0.0.0"|' "$CONFIG_FILE"
sed -i 's|^open_browser = true|open_browser = false|' "$CONFIG_FILE"
fi
# Avvia la WebUI
exec somedl web --no-browser --host "${SOMEDL_HOST:-0.0.0.0}" --port "${SOMEDL_PORT:-5000}"
+103
Wyświetl plik
@@ -0,0 +1,103 @@
# SomeDL - YouTube Music Downloader
Scarica brani, playlist e album da YouTube con metadata, copertine e testi
(MusicBrainz, Genius, Deezer e setlist.fm, senza token o login).
Progetto: https://github.com/ChemistryGull/SomeDL
## Build Container
```bash
cd containers/somedl
podman build -t localhost/somedl:latest .
```
## Setup Iniziale
### 1. Creare le directory
```bash
mkdir -p /srv/containers/somedl/config /srv/containers/somedl/downloads
```
La directory `config` può restare vuota: il file `somedl_config.toml` viene
generato automaticamente dall'entrypoint al primo avvio.
### 2. Copiare il file quadlet
```bash
cp containers/somedl/somedl.container ~/.config/containers/systemd/
```
### 3. Avviare il container
```bash
systemctl --user daemon-reload
systemctl --user start somedl
systemctl --user enable somedl
```
## Utilizzo
### WebUI
La WebUI è pubblicata sulla porta 5000 (default di SomeDL):
- cercare e scaricare brani (stile YouTube Music)
- seguire il progresso dei download
- cercare le setlist dei concerti
- modificare le impostazioni direttamente dall'interfaccia
### Scaricare da CLI
```bash
# Brano per nome
podman exec somedl somedl "Daft Punk - One More Time"
# Playlist o brano da URL YouTube/YouTube Music
podman exec somedl somedl "https://music.youtube.com/playlist?list=..."
# Formato diverso dal default (mp3)
podman exec somedl somedl -f flac "Daft Punk - One More Time"
# Piu' input in un colpo solo
podman exec somedl somedl "Artist - Song 1" "Artist - Song 2"
```
### Visualizzare la configurazione corrente
```bash
podman exec somedl somedl --show-config
```
## Comandi utili
```bash
# Controllare lo stato
podman ps | grep somedl
# Vedere i log
podman logs somedl
# Aggiornare l'immagine
podman build -t localhost/somedl:latest .
systemctl --user restart somedl
# Rimuovere il container
systemctl --user stop somedl
podman rm somedl
```
## Struttura volumi
| Host | Container | Note |
|------|-----------|------|
| `/srv/containers/somedl/config/` | `/root/.config/SomeDL/` | Config (`somedl_config.toml`, generata al primo avvio) |
| `/srv/containers/somedl/downloads/` | `/app/downloads/` | Brani scaricati |
## Note
- ffmpeg (richiesto da yt-dlp) e Deno (raccomandato da yt-dlp) sono installati nell'immagine
- Il formato predefinito è MP3; formato, cartella e template di output si cambiano
nel file di config o dalla WebUI
- Serve connessione internet per cercare e scaricare i brani
+24
Wyświetl plik
@@ -0,0 +1,24 @@
[Unit]
Name=somedl
After=network-online.target
Wants=network-online.target
[Container]
ContainerName=somedl
Image=localhost/somedl:latest
Network=internal.network
PodmanArgs=--group-add=keep-groups --ipc=host
# Web UI
PublishPort=5000:5000
# mkdir -p /srv/containers/somedl/{config,downloads}
Volume=/srv/containers/somedl/config:/root/.config/SomeDL
Volume=/srv/containers/somedl/downloads:/app/downloads
[Service]
Restart=on-failure
TimeoutStartSec=5m
[Install]
WantedBy=multi-user.target default.target
-32
Wyświetl plik
@@ -1,32 +0,0 @@
### SpotDL - Spotify Downloader with Web UI
### Based on spotdl: https://github.com/spotDL/spotify-downloader
###
### BUILD: podman build -t localhost/spotdl:latest .
### EXPORT: podman save -o /home/duckpage/Source/bds/bdi_podman_serverconf/containers/spotdl/spotdl.tar localhost/spotdl:latest
###
FROM debian:13-slim
# Installazione dipendenze di sistema
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3 \
python3-pip \
ffmpeg \
aria2 \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Installazione spotDL
RUN pip3 install --no-cache-dir --break-system-packages spotdl
# Creazione directory configurazione e download
RUN mkdir -p /app/.config/spotdl /app/downloads
WORKDIR /app
# Volume mount point per i download
VOLUME ["/app/downloads"]
# Comando di default: avvia la web UI
CMD ["spotdl", "web", "--host", "0.0.0.0", "--port", "8800", "--keep-alive", "--keep-sessions"]
@@ -1,76 +0,0 @@
{
"client_id": "5f573c9620494bae87890c0f08a60293",
"client_secret": "212476d9b0f3472eaa762d90b19b0ba8",
"auth_token": null,
"user_auth": true,
"headless": false,
"cache_path": "/app/.config/spotdl/.spotipy",
"no_cache": false,
"max_retries": 3,
"use_cache_file": false,
"use_official_api": false,
"audio_providers": [
"youtube-music"
],
"lyrics_providers": [
"genius",
"azlyrics",
"musixmatch"
],
"genius_token": "alXXDbPZtK1m2RrZ8I4k2Hn8Ahsd0Gh_o076HYvcdlBvmc0ULL1H8Z8xRlew5qaG",
"playlist_numbering": false,
"playlist_retain_track_cover": false,
"scan_for_songs": false,
"m3u": null,
"output": "{artists} - {title}.{output-ext}",
"overwrite": "skip",
"search_query": null,
"ffmpeg": "ffmpeg",
"bitrate": "128k",
"ffmpeg_args": null,
"format": "mp3",
"save_file": null,
"filter_results": true,
"album_type": null,
"threads": 4,
"cookie_file": null,
"restrict": null,
"print_errors": false,
"sponsor_block": false,
"preload": false,
"archive": null,
"load_config": true,
"log_level": "INFO",
"simple_tui": false,
"fetch_albums": false,
"id3_separator": "/",
"ytm_data": false,
"add_unavailable": false,
"generate_lrc": false,
"force_update_metadata": false,
"only_verified_results": false,
"sync_without_deleting": false,
"max_filename_length": null,
"yt_dlp_args": null,
"detect_formats": null,
"save_errors": null,
"ignore_albums": null,
"proxy": null,
"skip_explicit": false,
"log_format": null,
"redownload": false,
"skip_album_art": false,
"create_skip_file": false,
"respect_skip_file": false,
"sync_remove_lrc": false,
"web_use_output_dir": false,
"port": 8800,
"host": "localhost",
"keep_alive": true,
"enable_tls": false,
"key_file": null,
"cert_file": null,
"ca_file": null,
"allowed_origins": null,
"keep_sessions": true
}
-118
Wyświetl plik
@@ -1,118 +0,0 @@
# SpotDL - Spotify Downloader
Scarica playlist, album e brani di Spotify con metadata, copertine e testi.
## Build Container
```bash
cd /home/duckpage/Source/bds/bdi_podman_serverconf/containers/spotdl
podman build -t localhost/spotdl:latest .
```
## Setup Iniziale
### 1. Creare le directory
```bash
mkdir -p /srv/containers/spotdl/downloads
```
### 2. Configurazione
Copiare il template e personalizzarlo:
```bash
cp /home/duckpage/Source/bds/bdi_podman_serverconf/containers/spotdl/config.json.template \
/srv/containers/spotdl/config.json
```
Modificare `/srv/containers/spotdl/config.json` con le proprie impostazioni:
- `client_id` / `client_secret` — credenziali Spotify (quelle di default funzionano, ma per uso intensivo crearne di proprie su [Spotify Developer](https://developer.spnanotify.com/dashboard))
- `output` — formato del nome file (default: `{artists} - {title}.{output-ext}`)
- `format` — formato audio (mp3, flac, opus, m4a, ecc.)
- `bitrate` — bitrate di uscita (default: 128k)
- `audio_providers` — sorgenti audio (default: youtube-music)
### 3. Copiare il file quadlet
```bash
~/.config/containers/systemd/
```
### 4. Avviare il container
```bash
systemctl --user daemon-reload
systemctl --user start spotdl
systemctl --user enable spotdl
```
## Utilizzo
### Scaricare una playlist
```bash
podman exec spotdl spotdl download "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
```
### Scaricare un album
```bash
podman exec spotdl spotdl download "https://open.spotify.com/album/1DFixwWVzKdAJ0i3gGdK2R"
```
### Scaricare brani per nome
```bash
podman exec spotdl spotdl download "Daft Punk - One More Time"
```
### Ottenere solo i link (URL download)
```bash
podman exec spotdl spotdl url "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
```
### Sincronizzare la cartella di download
```bash
podman exec spotdl spotdl sync /srv/containers/spotdl/downloads/playlist.spotdl
```
### Avviare l'interfaccia web
```bash
podman exec spotdl spotdl web
```
## Comandi utili
```bash
# Controllare lo stato
podman ps | grep spotdl
# Vedere i log
podman logs spotdl
# Aggiornare l'immagine
podman build -t localhost/spotdl:latest .
systemctl --user restart spotdl
# Rimuovere il container
systemctl --user stop spotdl
podman rm spotdl
```
## Struttura volumi
| Host | Container | Note |
|------|-----------|------|
| `/srv/containers/spotdl/config.json` | `/app/.config/spotdl/config.json` | Config (sola lettura) |
| `/srv/containers/spotdl/downloads/` | `/app/downloads/` | Brani scaricati |
## Note
- I brani vengono cercati su YouTube/YouTube Music e scaricati con ffmpeg
- Il formato predefinito è MP3 a 128kbps
- Per audio di qualità superiore, impostare `format: "flac"` e `bitrate: "disable"` nella config
- Serve connessione internet per cercare e scaricare i brani
-27
Wyświetl plik
@@ -1,27 +0,0 @@
[Unit]
Name=spotdl
After=network-online.target
Wants=network-online.target
[Container]
ContainerName=spotdl
Image=localhost/spotdl:latest
Network=internal.network
PodmanArgs=--rm=false
# Web UI
PublishPort=8800:8800
# OAuth callback (per autenticazione utente)
PublishPort=9900:9900
# Configurazione spotDL
Volume=/srv/containers/spotdl/config.json:/app/.config/spotdl/config.json:ro
Volume=/srv/containers/spotdl/downloads:/app/downloads
Volume=/srv/containers/spotdl/.spotipy:/app/.config/spotdl/.spotipy
[Service]
Restart=on-failure
TimeoutStartSec=5m
[Install]
WantedBy=multi-user.target default.target