Code Monkey home page Code Monkey logo

spotmybackup's Introduction

SpotMyBackup

Backup and Restore your Spotify Playlists and "My Music".

This javascript based app allows you to backup all your playlists and import them in any other Spotify Account. It uses the OAuth-Functionality of Spotify to be able to handle your personal playlists.

In consequence, no credentials or data is stored or processed on the Webserver itself.

You can use it at www.spotmybackup.com or on your own webserver (see Q&A).

Please note We do not maintain this project anymore. Of course, feel free to still use it "as is".

spotmybackup's People

Contributors

fcingolani avatar phoneixs avatar secuvera avatar tglemser avatar

Stargazers

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

Watchers

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

spotmybackup's Issues

Unable to log in: "An error has occurred processing your request. Please try again."

I don't normally sign in to Spotify from my browser, and I had deleted the cookies. When trying to use SpotMyBackup for the first time, trying to connect/login to Spotify, I kept getting an error in the login window:
"An error has occurred processing your request. Please try again."

As a work-around, I first logged in directly from the Spotify website. The login window looked the same, but this time I had to solve a Google captcha, and then I got logged in. After I was logged in, SpotMyBackup could connect and it worked. Thanks!

Backup stuck

It counted all tracks and playlists in a few minutes;
image
for over an hour it was stuck, even though I've found pictures on the internet suggesting this utility can cope successfully with similarily big parts of data:
image
Even after more than hour since the start of backup, the utility keeps refreshing the counters, what is indicated by flashing text in Chrome's F12 menu:
image
which would indicate, that something is happening.
I fully understand the difficulty of remote debugging, as the script is ran locally, therefore I attach info from console:
image
No more errors has occured since the start of the backup.
Chrome 70.0.3538.77 (official)
Sincerely,
Jack

Can not download!

I can't download after the loading has finished.
On my PC chrome there's no response at all when I click download button.
Tried on my phone chrome too it simply came back as download failed unknown error

And I have about 250 playlists
20k tracks.

What's wrong here? How can I get it to work?

value.track is null

After 132 playlists and 6637 tracks (which might be all) loading stops. Page still shows:
Please wait. Loading your playlists and tracks ...

DevConsole printed following error upon stopping:
TypeError: value.track is null[Weitere Informationen] www.spotmybackup.com:658:32
success/< http://www.spotmybackup.com/:658:32
each https://code.jquery.com/jquery-1.11.2.min.js:2:2973
success http://www.spotmybackup.com/:657:17
j https://code.jquery.com/jquery-1.11.2.min.js:2:27290
fireWith https://code.jquery.com/jquery-1.11.2.min.js:2:28108
x https://code.jquery.com/jquery-1.11.2.min.js:4:22059
b https://code.jquery.com/jquery-1.11.2.min.js:4:25980

Playlists and songs do NOT import in the right order, everything is inverted

I see that the playlists and songs DO NOT come in the right order they were when importing the .json file. Everything is just opposite, meaning my top playlist is at the bottom and continuing playlists. Also all songs are opposite, meaning the top song in a playlist will be at the bottom.
How I fixed this was: Just import 2 times, when you import the inverted playlists, they will then be inverted again, so they come out the original order, and the songs too. Clever workaround, but this should be fixed too!

it does not work export

I signed up, uploaded all the playlists (16) and all the tracks (1382) , I waited more than half an hour but nothing happens. The message remains: Please wait. Loading your playlists and tracks ...
I tried with different browsers, both with google chrome that with firefox but I get the same result, I do not get any error message, just stay there forever
can someone help me, thanks

sorry

it works well
i find it couldn't import to the same account, so i want to report it.
but soon i find it can import to other account.
so, SORRY!

only part of playlists got imported but why?

I dont know why but I tried multiple times, even exported the .json again but it will never
import more than 43 of 105 playlists? Is there a reason why? the playlists are not different so im confused

Processed playlists: 43/105
Processed tracks: 4173/4173

Finished uploading

Can't import tracks

I try to import tracks to my new account but it stuck showing this

Importing new playlists and tracks

Processed playlists: 1/21
Processed tracks: 0/0

Comparing starred tracks

Playlist pictures

Hi,

It seems the pictures that are added to the playlist are not transferred. Would be a neat feature to add.

Error when exporting

123

So this is the error I get when I tried exporting, have tried refreshing multiple times to no avail. Same error on Firefox and Chrome. Any help please? :/

Doesn't work

It stays in 5400 songs (more or less) and it doesn't work more... Before it served me :/

Please help! 'Network Error' and track is null

Hey. I am eager to use this site to backup my playlists but it just never worked for me! It loads all the many tracks and playlists I own (sadly also the community-made ones i think). but when I try to export it says download failed network error. that's what it shows when i click F12:
track is null Object added_at: "1970-01-01T00:00:00Z" added_by: external_urls: {spotify: "https://open.spotify.com/user/"} href: "https://api.spotify.com/v1/users/" id: "" type: "user" uri: "spotify:user:" __proto__: constructor: ƒ Object() hasOwnProperty: ƒ hasOwnProperty() isPrototypeOf: ƒ isPrototypeOf() propertyIsEnumerable: ƒ propertyIsEnumerable() toLocaleString: ƒ toLocaleString() toString: ƒ toString() valueOf: ƒ valueOf() __defineGetter__: ƒ __defineGetter__() __defineSetter__: ƒ __defineSetter__() __lookupGetter__: ƒ __lookupGetter__() __lookupSetter__: ƒ __lookupSetter__() get __proto__: ƒ __proto__() set __proto__: ƒ __proto__() is_local: false primary_color: null track: null video_thumbnail: url: null __proto__: constructor: ƒ Object() hasOwnProperty: ƒ hasOwnProperty() isPrototypeOf: ƒ isPrototypeOf() propertyIsEnumerable: ƒ propertyIsEnumerable() toLocaleString: ƒ toLocaleString() toString: ƒ toString() valueOf: ƒ valueOf() __defineGetter__: ƒ __defineGetter__() __defineSetter__: ƒ __defineSetter__() __lookupGetter__: ƒ __lookupGetter__() __lookupSetter__: ƒ __lookupSetter__() get __proto__: ƒ __proto__() set __proto__: ƒ __proto__() __proto__: constructor: ƒ Object() hasOwnProperty: ƒ hasOwnProperty() isPrototypeOf: ƒ isPrototypeOf() propertyIsEnumerable: ƒ propertyIsEnumerable() toLocaleString: ƒ toLocaleString() toString: ƒ toString() valueOf: ƒ valueOf() __defineGetter__: ƒ __defineGetter__() __defineSetter__: ƒ __defineSetter__() __lookupGetter__: ƒ __lookupGetter__() __lookupSetter__: ƒ __lookupSetter__() get __proto__: ƒ __proto__() set __proto__: ƒ __proto__()

if it's because of the many playlists and tracks I got, and there is no solution for that, maybe there is atleast a way to make it download only the playlists I CREATED? without all the others I follow and made by community? I'd like to get this solved quickly! thanks so much.

Buttons not working!

I have tried clicking Login with Spotify in 3 different browsers, but they seem to not do anything.
Anyone else having this issue?

INVALID_CLIENT: Invalid client

what is happening . everytime i try to connect or login my account to spotymybackup the pop up message always tells me this INVALID_CLIENT: Invalid client.... pls help

Failed to load resource

Hi!

Tried the online tool (Edge+Chrome) end get stuck a this:
43 artists
296 playlists
42421 tracks

Please wait. Loading your playlists ...

On F12 console i get this error message.

api.spotify.com/v1/users//playlists/37i9dQZF1DX0bwWyVo0VqH/tracks:1 Failed to load resource: the server responded with a status of 404 ()

This is what the link says:
{
"error": {
"status": 401,
"message": "No token provided"
}
}

Empty/erroneous user/playlist perhaps?

Uncaught Type Error: null href (Can't export)

When trying to backup my account, I get stuck at this part in all browsers.

_"25 playlists
1946 tracks

Please wait. Loading your playlists and tracks ..."_

Console Error

(index):640 Uncaught TypeError: Cannot read property 'href' of null
    at Object.success ((index):640)
    at j (jquery-1.11.2.min.js:2)
    at Object.fireWith [as resolveWith] (jquery-1.11.2.min.js:2)
    at x (jquery-1.11.2.min.js:4)
    at XMLHttpRequest.b (jquery-1.11.2.min.js:4)

This is the line of code with the error:

            loadTrackChunks(data.tracks.href, arr, callback);

Playlists don’t have any songs upon import

NEVERMIND lol

not sure if Spotify has changed the way they did their playlists, but I now encounter this issue. Before this was never an issue an I’ve used this service a few times past couple years. Which I can’t thank you enough!

Now upon import, liked songs show, playlists show, but playlists are empty.. =(

I will do some experiments and report back what I can find.

Login not working

Hey i tried to use SpotMyBack on my webserver but it seem to not working

this is my config file

config = {
"uri":"http://localhost:8888",
"redirect_uri":"http://localhost:8888/login.html",
"client_id":"REMOVED",
"slowdown_import": 100,
"slowdown_export": 100
};

My website is https://eggman.club

When i login i get a blank page with my token but nothing happens anymore

brave_42RW9dNbJ5

this is the url:

http://www.spotmybackup.com/login.html#access_token=*REMOVED*&token_type=Bearer&expires_in=3600

download failed - networkissue

I am getting this error on multiple pc's and networks.
Is it possible that it's an error from SpotMyBackup?

side note:
I do have a lot of tracks, maybe it is too much?
475 playlists
87787 tracks

Also, I do really like the idea!

import to amazon music

Hi, i have exported my playlist and tracks as a json file.

could i import it on amazon music?

kind regards

Crash / hangs on ~22 playlists / 7,000 tracks/

Hi All, I've tried using the service today and it got stuck on this, twice, same identical results. These don't look like huge numbers to me, is it a bug?

SpotMyBackup 

Account: giacecco

22 playlists
6874 tracks

Please wait. Loading your playlists and tracks ...

The console shows:

(index):640 Uncaught TypeError: Cannot read property 'href' of null
    at Object.success ((index):640)
    at j (jquery-1.11.2.min.js:2)
    at Object.fireWith [as resolveWith] (jquery-1.11.2.min.js:2)
    at x (jquery-1.11.2.min.js:4)
    at XMLHttpRequest.b (jquery-1.11.2.min.js:4)

Backup stops at 28 playlists and 4001 tracks

Hi! I noticed that either on your website or at localhost webserver the backup just stops at the mark of 28 playlists and 4001 tracks.
No network activity in developer pane shows after that, no errors within the data sent/received too.

Can you please explain what am I doing wrong and how to resolve this issue? @secuvera @PhoneixS

Backup stucked.

Hello sir. First of all you are doing great work. But i have an issue. My backup always sticks at 19 playlist 1717 songs. Nothing happens after no error nothing kind of that just Please wait. Loading your playlists and tracks ... What should I do now. I don't want to lose my playlist at any cost. Thanks.

Playlists are empty

Team,

First off, THANK YOU. This is just the tool I've needed.

That said, it mostly worked. All my playlists loaded, but they are empty.

However, the "Songs" section (as well as Artists and Albums) is perfectly complete.

Any suggestions for filling the playlists?

screen shot 2019-02-28 at 19 35 25

Is there documentation for this project?

Hello, I can't figure out how to install this program. Is it just copying the files to a web server folder root? There is a Q&A section mentioned in the README but I do not see it:

image

There's also the JSON config and I am not sure how that is setup:

"client_id":"[YOUR_TOKEN_HERE]",
"slowdown_import": 100,
"slowdown_export": 100
};

Thank you!

Error Config Not identifed

Hey tried to deploy this keep getting this error

login.html:9 Uncaught ReferenceError: config is not defined
at login.html:9

any suggestions?

Folders

Hi This project is great! Is there a way to maintain the exact folder structure from the old account? While the playlists are coming over, the folder structures are gone. All of my playlists are sorted in folders within the old account.

Thanks!

Any way to automate this ?

I want to automatically make backups of my Spotify every X days.
Is there a way to do this using your code or perhaps my Python code ?

The below code finds 6707 out of my 8000+ songs.
Any idea maybe?
from spotipy.oauth2 import SpotifyOAuth
import json
import time
import requests

# Set up your Spotify API credentials
client_id = 'id'
client_secret = 'secret'
redirect_uri = 'redirect_uri'  # This is the local server address
username = 'username/email'

# Authenticate with the Spotify API
sp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id=client_id, client_secret=client_secret, redirect_uri=redirect_uri, scope='playlist-read playlist-read-private playlist-modify-public playlist-modify-private user-library-read user-library-modify'))

# Function to retrieve user's username
def get_user_username():
    user_info = sp.current_user()
    return user_info['id']

# Function to retrieve all tracks within a playlist (including paginated tracks)
def get_all_playlist_tracks(playlist_id):
    all_tracks = []
    limit = 100  # Set to the maximum limit

    tracks = sp.playlist_tracks(playlist_id, limit=limit)
    all_tracks.extend([track['track']['name'] for track in tracks['items']])

    while tracks['next']:
        tracks = sp.next(tracks)
        all_tracks.extend([track['track']['name'] for track in tracks['items']])

    return all_tracks

# Function to save data to a JSON file
def save_to_file(data, filename):
    with open(filename, 'w', encoding='utf-8') as file:
        json.dump(data, file, ensure_ascii=False, indent=4)

# Get the current user's username
username = get_user_username()

# Get a list of the user's playlists
playlists = sp.user_playlists(username)

# Initialize a counter for total tracks
total_tracks = 0

# Initialize a set to keep track of processed playlist IDs
processed_playlists = set()

# Start an infinite loop
while True:
    # Check if all playlists have been processed
    if len(processed_playlists) == len(playlists['items']):
        break

    # Backup all playlists with a 100 ms delay
    backup_data = {}
    for playlist in playlists['items']:
        if playlist['id'] not in processed_playlists:
            playlist_name = playlist['name']
            playlist_id = playlist['id']
            tracks = get_all_playlist_tracks(playlist_id)
            backup_data[playlist_name] = tracks
            total_tracks += len(tracks)
            processed_playlists.add(playlist_id)  # Mark playlist as processed
            time.sleep(0.1)

    # Save all playlist and track information to a JSON file
    save_to_file(backup_data, 'spotify_backup.json')

# Display the total number of tracks found
print(f'Total tracks found: {total_tracks}')
print('Backup of all playlists has been saved to spotify_backup.json')```

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.