secuvera / spotmybackup Goto Github PK
View Code? Open in Web Editor NEWBackup and Restore your Spotify Playlists and "My Music"
License: GNU General Public License v2.0
Backup and Restore your Spotify Playlists and "My Music"
License: GNU General Public License v2.0
Current backups ignore folders. It would be nice if they were handled by the backup. From
https://community.spotify.com/t5/user/viewprofilepage/user-id/82541
This appears to occur when the object is too large, and may be Chrome only. See https://stackoverflow.com/questions/42958598/failed-network-error-when-trying-to-provide-download-in-html5-using-downloa for some suggestions.
It simply won't import the file saying 'Failed to load file'.
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?
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
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.
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
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
Current backups take a snapshot of referenced playlists. It would be nice if you could choose to keep those playlists as mere references. From s
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
this is the url:
http://www.spotmybackup.com/login.html#access_token=*REMOVED*&token_type=Bearer&expires_in=3600
All it does is open the 3D veiwer... and as far as I can tell no files were downloaded.
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
Hey tried to deploy this keep getting this error
login.html:9 Uncaught ReferenceError: config is not defined
at login.html:9
any suggestions?
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!
Hi,
It seems the pictures that are added to the playlist are not transferred. Would be a neat feature to add.
Collaborative playlists are not included in the exported JSON file.
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.
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?
I have tried clicking Login with Spotify in 3 different browsers, but they seem to not do anything.
Anyone else having this issue?
It stays in 5400 songs (more or less) and it doesn't work more... Before it served me :/
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)
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!
I don't know about you guys but the order of my playlists matter. 😅😅
Good luck secuvera. And thanks.
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
I tried all the solutions I knew but the bot still imported my playlist from the bottom, how to fix it?
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!
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!
When I go to http://www.spotmybackup.com/ and click "Login with spotify" the OAuth window shows up for a second but then before it finishes to load it disappears. So I'm not able to sign in. Does anyone have the same problem?
Hello,
after logging into my account on http://www.spotmybackup.com it just stops loading the playlists.
Console says then:
HTTP429: The user has sent too many requests in a given amount of time
(XHR)GET - https://api.spotify.com/v1/playlists/3s5SQknGscWyRpH5JL/tracks
One week before it worked, even with this amounts of data (~300 plalists, ~18K Songs)
Any help wold be appreciated.
It's possible to add a backup of the Artists that I'm following?
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
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.
Hi, i have exported my playlist and tracks as a json file.
could i import it on amazon music?
kind regards
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);
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:
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!
thx in advance
Guys i wanna import my music file
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!
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')```
Hey
Today I tried to export all my playlists when I click download it gives me an error?
It's
277 playlists
22625 tracks
Is it too much?
EDIT: this appears on (f12)
GET https://api.spotify.com/v1/users/spotify/playlists/37i9dQZF1DXdbkmlag2h7b/tracks 429 (Too Many Requests)
Title for reference, not sure what's going wrong with it
It counted all tracks and playlists in a few minutes;
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:
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:
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:
No more errors has occured since the start of the backup.
Chrome 70.0.3538.77 (official)
Sincerely,
Jack
Seems it cannot login to my Spotify account (Facebook login). I'm on IE11, Windows 7 64bit at the moment. From https://community.spotify.com/t5/user/viewprofilepage/user-id/269006
Unable to create a backup for months now. It won't finish loading tracks. Gets stuck at around 60 000 tracks. Is this not updated/working anymore or what is the problem..
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.