A self-hosted web application for downloading songs, albums, or playlists from Spotify and YouTube as MP3 files. The application provides a web interface for users to input links, which are then downloaded as audio files using spotdl (for Spotify) or yt-dlp (for YouTube).
- Download Spotify and YouTube playlists: Automatically detects and processes playlists based on the URL.
- Session-based download directories: Isolates each user session to a unique download directory.
- Admin Mode: Enables admin users to download directly to a specified folder on the server.
- Progress bar and download logs: View download progress and logs in real-time via the web interface.
- Auto-cleanup: Deletes temporary session download folders after a specified time.
- Organized Downloads: Downloads are structured by artist and album folders, maintaining organization across downloads.
- Docker and Docker Compose installed on your system.
Run with Docker Compose:
Use the provided docker-compose.yaml configuration to start the container.
services:
playlistdl:
image: tanner23456/playlistdl:v2
container_name: playlistdl
ports:
- "4827:5000"
environment:
#Direct Server Download
- ADMIN_USERNAME= #Insert unique username here!
- ADMIN_PASSWORD= #Insert unique password here!
- AUDIO_DOWNLOAD_PATH=${AUDIO_DOWNLOAD_PATH} # Use the env variable
- CLEANUP_INTERVAL=300 # Optional
volumes:
- ${AUDIO_DOWNLOAD_PATH}:${AUDIO_DOWNLOAD_PATH} # Reference env variable here as well
-
Access the Web Interface: Open a browser and navigate to
http://localhost:5000(replacelocalhostwith your server IP if remote). -
Download a Playlist:
- Enter a Spotify or YouTube playlist URL.
- Click Download to start the process.
- Monitor download progress and logs via the interface.
-
Admin Mode:
- Click the Admin button to log in with your credentials.
- Once logged in, a message will appear in red indicating, "Now downloading directly to your server!"
- Enter the playlist or album link as usual, and files will be saved to the designated admin folder on your server.
- The UI will also dispaly a text box to input a folder path. This is to alter the path the files are saved to without having to restart the container. The folder can only be changed to another folder within the mounted directory.
CLEANUP_INTERVAL: (Optional) Sets the cleanup interval for session-based download folders. Defaults to300seconds (5 minutes) if not specified.ADMIN_USERNAMEandADMIN_PASSWORD:(Optional) Sets the login credentials for admin access.AUDIO_DOWNLOAD_PATH: Sets the folder for admin-mode downloads. Files downloaded as an admin are stored here. This is set in your .env file.
- Backend: Flask application that handles download requests and manages session-based directories.
- Frontend: Simple HTML/JavaScript interface for input, progress display, and log viewing.
- Tools:
spotdlfor downloading Spotify playlists.yt-dlpfor downloading YouTube playlists as MP3s.
- This application is intended for personal use. Make sure to follow copyright laws and only download media you’re authorized to use.
- Ensure that the
downloadsdirectory has appropriate permissions if running on a remote server.
- Permissions: Ensure the
downloadsdirectory has the correct permissions for Docker to write files. - Port Conflicts: If port 5000 is in use, adjust the port mapping in the
docker-compose.yamlfile.
If you like this project, consider supporting it with a donation!