Skip to main content

Migrate Google Play Music's playlists to Spotify

Project description

Gotipy is a tool to efficiently transfer your Google Play Music playlists to Spotify. User can choose from many aggressiveness levels. Typical usage looks like this:

#!/usr/bin/python3

from gotipy import user_info, fetcher, migrator

# 1. Authenticate
user = UserInfo()
user.spotify_authenticate(spotify_token, spotify_id)
user.gpm_authenticate(gpm_email, gpm_password)

# 2. Open CSV for logging
log = open('log.csv', 'a')
clerk = csv.writer(log, lineterminator='\n')
clerk.writerow(["Direction", "Aggressiveness", "Playlist Number", "Playlist Name",
                "Track Number", "Title", "Artist", "Album", "Done", "Transferred on Level",
                "Notes"])

# 3. Instantiate fetcher and migrator for fetching and migrating playlists
fetcher = FromGpm(clerk, user.gpm)
migrator = ToSpotify(clerk, 7, user.spt, user.spotify_id) # CSV "clerk", Agr level, Spotify token, Spotify ID,

# 4. Fetch and choose playlists
print(fetcher.playlists_names) # Print available playlists to choose from
playlists = input() # Input example: "1,4,2,5,6,7,4,32"
playlists = fetcher.playlists_choice_check(playlists, reverse=True) # Returns a reversed list of playlists
playlists_out = fetcher.playlists_out(playlists) # Gets a list of playlists contents to transfer

# 5. Migrate playlists and print stats
migration_done = migrator.playlists_handler(playlists_out) # Pass it to migrator
print(migrator.playlists_found)
print(migrator.songs_found)
print(migrator.songs_not_found)

Dependencies

This package is built atop:

Aggressiveness levels

Aggressiveness levels will add the first track found if:

  1. Only one search result was found by searching trackss (Title, Artist, Album)
  2. Only one search result was found by searching track’s (Title, Artist)
  3. Only one search result was found by searching track’s (Title, Album)
  4. Only two search result were found by searching track’s (Title, Artist, Album)
  5. Only two search result were found by searching track’s (Title, Artist)
  6. More than two search results were found by searching track’s (Title, Artist, Album)
  7. Only two search result were found by searching track’s (Title, Album)
  8. More than two search results were found by searching track’s (Title, Artist)
  9. More than two search results were found by searching track’s (Title, Album)
  10. More than two search results were found by searching track’s (Title)
  • Of course, given any aggressiveness level, the program will start searching from agr. level 1 all the way to the agr level user sets as a limit

CSV colomns

Migrator will export a CSV with the following rows for each track processed:

  1. Direction
  2. Aggressiveness level chosen
  3. Playlist Number
  4. Playlist Name
  5. Track Number
  6. Track Title
  7. Track Artist
  8. Track Album
  9. Whethere track was transferred or not
  10. On which level it was transferred on
  11. Notes (Reason why track was not transferred)

More on https://www.github.com/omarryhan/gotipy

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
gotipy-0.1.6-py2.py3-none-any.whl (9.3 kB) Copy SHA256 hash SHA256 Wheel py2.py3 May 26, 2018
gotipy-0.1.6.tar.gz (19.3 kB) Copy SHA256 hash SHA256 Source None May 26, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page