Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PyCoding-A/Spotifarr
Spotifarr
https://github.com/PyCoding-A/Spotifarr
download freebsd lidarr music plex python
Last synced: 10 days ago
JSON representation
Spotifarr
- Host: GitHub
- URL: https://github.com/PyCoding-A/Spotifarr
- Owner: PyCoding-A
- Created: 2021-10-20T13:09:10.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-21T17:04:32.000Z (about 3 years ago)
- Last Synced: 2024-08-01T12:24:47.513Z (3 months ago)
- Topics: download, freebsd, lidarr, music, plex, python
- Language: Python
- Homepage:
- Size: 94.7 KB
- Stars: 38
- Watchers: 4
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spotifarr
This is a small python code that I use with my NAS server connected to Plex
I didn't appreciate how Lidarr works because it downloads a full Album. So I created something on my own.Way of working
- The python script will connect to your Spotify and will retrieve your playlists using spotipy package
- The python script will create an SQL database with your playlist & the list of tracks
- The python script will then search a youtube video based on the name & the artist gathered from the metadata (it will search in YouTube music and if not found YouTube videos)
- The python script will download the video in .mp3 using yt-dlp package
- The python script will update the metadata and prepare it for plex using mutagen
- Finally, the python script will trigger an update and will create the same playlist that is in your Spotify in plex using PlexAPI
Configuration
To make the script work you need to configure the document credentials.json
- "username": "your spotify username found in Overview"
You need then to create a spotify APP - Spotify for developers to retrieve both of these parameters
- "client_id": "",
- "client_secret": "",
Define the location of where you will save your media (for me I used /media/Music )
- "path_music": "",
(Optional) You can create a password app to allow youtube-dl to download explicit music, else you can leave it blank
- "ytb_username": "",
- "ytb_password": "",
Now to configure plex you need to enter the base URL for example http://localhost:32400/ and for the token, you can follow-up Plex tutorial
- "plex_base_url": "",
- "plex_token": ""
Requirements
If you are running on windows you can install all the pip found in the requirement.txt
Else on FreeBSD you need to install:
pkg install python, py38-sqlite3
Run
Now you only have to run main.py and enjoy
PS:
- I tried to create a web interface using FLASK but I'm still in the learning process. So sorry for that.
- If you want to have daily monitoring you can add a corn job for main.py and
- I created this for fun and not for business use. I am always enrolled in Spotify premium services but I just wanted to try. So please I do not encourage any prohibited behavior