This is a Flask-based web application that allows users to transfer playlists between Spotify and SoundCloud. Specifically:
- Transfer playlists from Spotify to SoundCloud.
- Transfer playlists from SoundCloud to Spotify.
The app uses the Spotify Web API and SoundCloud API to fetch playlists, search for tracks, and create new playlists on the target platform.
Live Demo: https://transferplaylist-2nob.onrender.com
-
Transfer Playlists from Spotify to SoundCloud:
- Fetch playlists from Spotify.
- Search for matching tracks on SoundCloud.
- Create a new playlist on SoundCloud with the matched tracks.
-
Transfer Playlists from SoundCloud to Spotify:
- Fetch playlists from SoundCloud.
- Search for matching tracks on Spotify.
- Create a new playlist on Spotify with the matched tracks.
-
User-Friendly Interface:
- Clean and responsive design using HTML and CSS.
- Dynamic feedback during the transfer process.
- Backend: Python (Flask)
- Frontend: HTML, CSS
- APIs:
- Deployment: Render
- Dependencies:
Flask: Web framework.requests: For making API calls.gunicorn: WSGI server for production deployment.
-
Authentication:
- Users log in to Spotify or SoundCloud via OAuth to grant access to their playlists.
- The app securely stores API credentials as environment variables.
-
Playlist Selection:
- After authentication, users can select a playlist from their account.
-
Track Matching:
- The app searches for matching tracks on the target platform using track names and artist names.
-
Playlist Creation:
- A new playlist is created on the target platform, and the matched tracks are added.
-
Feedback:
- The app displays a list of transferred tracks and indicates whether the transfer was successful.
This app is deployed on Render, a cloud platform for hosting web applications. Follow these steps to deploy your own instance:
-
Clone this repository:
git clone https://github.com/your-username/playlist-transfer-app.git cd playlist-transfer-app -
Ensure you have the following files:
app.py: Main Flask application.Procfile: Defines how to run the app (web: gunicorn app:app).requirements.txt: Lists dependencies (Flask,requests,gunicorn).runtime.txt: Specifies the Python version (e.g.,python-3.9.18).
-
Replace placeholder values in the code with your actual API credentials:
- Spotify Client ID, Client Secret, Redirect URI.
- SoundCloud Client ID, Client Secret, Redirect URI.
-
Initialize a Git repository:
git init git add . git commit -m "Initial commit"
-
Push your code to GitHub:
git remote add origin https://github.com/your-username/playlist-transfer-app.git git branch -M main git push -u origin main
- Sign up for a free account on Render.
- Connect your GitHub repository to Render.
- Create a new Web Service:
- Set the build command:
pip install -r requirements.txt. - Set the start command:
gunicorn app:app. - Add environment variables for your API credentials:
SPOTIFY_CLIENT_ID=your_spotify_client_id SPOTIFY_CLIENT_SECRET=your_spotify_client_secret SPOTIFY_REDIRECT_URI=https://your-render-url/callback_spotify SOUNDCLOUD_CLIENT_ID=your_soundcloud_client_id SOUNDCLOUD_CLIENT_SECRET=your_soundcloud_client_secret SOUNDCLOUD_REDIRECT_URI=https://your-render-url/callback_soundcloud
- Set the build command:
- Deploy the app and wait for Render to build and host it.
- Visit the live demo: https://transferplaylist-2nob.onrender.com.
- Choose one of the following options:
- Transfer from Spotify to SoundCloud.
- Transfer from SoundCloud to Spotify.
- Authenticate with the respective platform.
- Select a playlist and wait for the app to transfer it.
-
Track Matching:
- Not all tracks may be found on the target platform due to differences in catalog availability.
-
API Rate Limits:
- Both Spotify and SoundCloud APIs have rate limits. Avoid excessive requests to prevent errors.
-
Free Tier on Render:
- The app may "sleep" after 15 minutes of inactivity on Render's free tier.
-
Enhanced Matching:
- Use fuzzy matching algorithms to improve track search accuracy.
-
Error Handling:
- Provide more detailed error messages for failed transfers.
-
Custom Domain:
- Upgrade to a paid plan on Render to use a custom domain.
-
Database Integration:
- Store user preferences and transfer history for a better user experience.
- Spotify Developer Documentation: https://developer.spotify.com/documentation/web-api/
- SoundCloud Developer Documentation: https://developers.soundcloud.com/docs/api/guide
- Render Documentation: https://render.com/docs
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to contribute, report issues, or suggest improvements! 🚀