Coder Social home page Coder Social logo

lilianmallardeau / playlist-sync Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 4.0 21 KB

A little command line tool to download and sync playlists from Deezer or Spotify to predefined folders.

License: GNU General Public License v3.0

Makefile 0.70% Python 97.49% Batchfile 1.81%
python python3 deezer deezer-downloader deezer-playlist spotify spotify-playlist spotify-downloader deemix playlist-downloader playlists

playlist-sync's Introduction

Playlist-sync

playlist-sync is a little command line tool to download and sync playlists from Deezer or Spotify to predefined folders. It reads playlists links and target folders from a JSON file.

It uses deemix under the hood to actually download the playlists.

What you will need

  • Python >= 3.8 with pip (untested on earlier versions of Python)
  • A Deeezer account. Since deemix downloads songs from Deezer, it uses your Deezer account to access Deezer servers and download music. So even if you only want to download Spotify playlists, you will need to have a Deezer account. Note that to download 320kbps MP3 or FLAC, you will need a Deezer Premium account. A free Deezer account only allow to download 128kbps MP3.
  • A Spotify account if you want to download playlists from Spotify.

Installation

Playlist-sync can be installed from PyPI with pipx:

pipx install playlist-sync

pipx can be installed with pip if you don't have it installed:

pip install pipx
pipx ensurepath

playlist-sync can also be installed directly with pip, but pipx is recommanded for command-line applications since it creates an isolated environment for each application and its associated packages.

The package adds the playlist-sync command to the command line.

How to setup and use

Playlist-sync relies on two files, config.json and playlists.json, which must exist in the current working directory. config.json contains some general settings (Deezer ARL, Spotify API token, bitrate...), and playlists.json contains the links to your playlists as well as the target folders where you want them to be downloaded.

playlist-sync can create templates for these two files so you only need to fill them. In your music library folder (where you want your playlists to be downloaded), run:

playlist-sync init

It will create the 2 json files. Fill them both as explained in the wiki, here and here. Once you've filled the config.json file with your Deezer ARL (and Spotify API client ID and secret if you want to download Spotify playlists) and the playlists.json file with your playlists links, to download them all at once in the desired folders, simply run:

playlist-sync sync

How to install and use easily on Windows

  1. If you don't have it installed already, download and install Python. During installation, make sure to choose to update the PATH environment variable.
  2. Open the command prompt (search for "cmd" in the search bar) and type pip install playlist-sync
  3. Download the 2 scripts in the windows_scripts folder in this repo, and put them in your music library folder
  4. Double click on playlist-sync_init.cmd. It will create two json files, config.json and playlists.json, in the same folder.
  5. Fill the two json files as described here and here.
  6. To download/update your playlists, simply double click on the playlist-sync_sync.cmd file

Todo

  • Add support for SoundCloud and YouTube playlists, with youtube-dl
  • Sync Serato/rekordbox crates with downloaded playlists
  • Use ISRC numbers to prevent downloading songs from different playlists twice, and make hardlinks between files instead

playlist-sync's People

Contributors

justinjohnso avatar lilianmallardeau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

playlist-sync's Issues

Y'a pas moyen d'enlever les numéros des titres des sons ?

Le pb des numéros apposé sur les sons c'est qu'il dépendent du nombre de sons dans la playlist
(ex : Une playlist entre 0 - 99 sons, les numéros apposé seront sur 2 caractère (01,02,...,99) mais une fois que la playlist passe a plus de 100 les nombres passent sur 3 caractères (001,002,...,999))
Le problème à ça c'est que si on download les sons quand la playlist etait en dessous de cent sons et qu'on sync de nouveau à plus de 100 sons, tous les sons avant 100 sont re téléchargé et on se retrouve à avoir tous les sons avant 100 en double)

Je pense aussi que les numéros dans les titres des sons posent problème lorsqu'on supprime un son de la playlist. Ducoup tous les sons situés après recule d'un chiffre et lors d'une sync, ils seront tous re téléchargé car ils n'ont pas le même numéros et on se retrouve encore avec tous les sons situés après le sons supprimé en double

Stop Redownloading After A Confirmed Download

Once the script has downloaded an audio track, I then move it to a different folder. Is there anyway to prevent this from downloading the file again other than leaving a copy of the original in the playlist folder location?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.