Skip to main content

Syncs spotify playlists with local json

Project description

 _____             _ ___
|   __|_ _ ___ ___|_|  _|_ _
|__   | | |   |  _| |  _| | |
|_____|_  |_|_|___|_|_| |_  |
      |___|             |___|

Syncs spotify playlists -> local files

makes use of spotify_to_ytmusic and yt-dlp

question:

  • do i really need to oauth, or could we just use spotify urls ()

directory context:

/syncify
  /rave
  /bounce
  syncify.json
    {
      oauth: "xyz",
      refresh_token: "abc",
      expires: 1234,
      last_synced: 1234,
      playlists:
        [
          bounce: {
            sync: true,
            url: "...",
            tracks: [
              title: "string"
              artist: "string"
              album: "string"
              length: "string"
              url_sp: "string"
              url_yt: "string"
              bitrate: 320.00
              downloaded: false
              error: false
            ]
          }
          rave: {}
        ]
    }

sudo:

> syncify
if (!syncify.json) {
  > enter spotify oauth
}
if (syncify.playlists.length == 0) { // or > syncify --add
  > enter playlust name (select from list / gui?)
}


// sync
for each (playlist in syncify.json)
  use spotify_to_ytmusic to make/update map.json, which is a map of the spotify track -> yturl

  this map will also include a parameter 'downloaded'

// download
for each (playlist in syncify.json)
  for each (track in playlist)
    if (!downloaded)
      downlaod track with yt_dl

possible commands:

syncify --help
  syncify --add
    > enter playlist url:
  syncify --only
    // just syncs doesn't download
  syncify --download
    // just downloads doesn't sync
  syncify --fix "song filename" "correct url"
    // deletes song, sets download: false, and updates new url_yt
  syncify

fixing errors woukd entail manually updating json file (changing url, setting downloaded: false)

nice to haves:

  • spotify specific metadata (added on)
  • warning when mapping (top three results seem dodgy)
  • warning when bitrate < 120
  • deletions
  • refresh_token
  • backup file (.syncify__mmddyyyy.json)
  • just use yt playlists

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

syncify_music-0.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

syncify_music-0.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file syncify_music-0.1.tar.gz.

File metadata

  • Download URL: syncify_music-0.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.8

File hashes

Hashes for syncify_music-0.1.tar.gz
Algorithm Hash digest
SHA256 b7d69f90b9b975a48aae68c159be92bdd367b4cb3ed6941178fc2cec1bbe2237
MD5 2de5ee1b07a79b5e12fe7a79ba7ef93e
BLAKE2b-256 0aa49e50cf9ae9e6d551a23abd39a78e6b9cc6e22c1ef681d221aebb88fe3c2c

See more details on using hashes here.

File details

Details for the file syncify_music-0.1-py3-none-any.whl.

File metadata

  • Download URL: syncify_music-0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.8

File hashes

Hashes for syncify_music-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bef08f04941d15843926f06ffe3114f46a01de3251e2c6536209d46df4732bd7
MD5 275a3318af78f3cd0e3c1ce16c602121
BLAKE2b-256 4e30197eb0f8932258cca937505ccc544ad3646f4b6b311c69726d5e18b25a85

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page