Coder Social home page Coder Social logo

helpstertee / spotify-playlists-2-deezer Goto Github PK

View Code? Open in Web Editor NEW
42.0 2.0 7.0 17 KB

Upload your Spotify Playlists to Deezer with this Python3 application.

License: MIT License

Python 100.00%
spotify spotify-playlist deezer deezer-api deezer-playlist playlist

spotify-playlists-2-deezer's People

Contributors

helpstertee 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

Watchers

 avatar  avatar

spotify-playlists-2-deezer's Issues

Outdated Script

The other script mentioned here which is used to fetch playlist details from spotify has been updated and now the json file structure is different and hence this script doesnt work with the outputted json file

"! Error adding tracks" when importing a playlist

If a playlist contains the same song twice, the answer from the Deezer API will be "This song already exists in this playlist".

An easy fix is to add
tracklist = list(dict.fromkeys(tracklist))
on line 266 of spotify-restore.py.

Timeouts after script runs for about 15 mins

I get the following output after the script runs for about 15 mins:

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1317, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1229, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1275, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1224, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1016, in _send_output
    self.send(msg)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 956, in send
    self.connect()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1384, in connect
    super().connect()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 928, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 727, in create_connection
    raise err
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 716, in create_connection
    sock.connect(sa)
TimeoutError: [Errno 60] Operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "spotify-restore.py", line 353, in <module>
    start_import()
  File "spotify-restore.py", line 312, in start_import
    id_ = add_playlist(li['name'])
  File "spotify-restore.py", line 209, in add_playlist
    f = urllib.request.urlopen(url, data=params)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 543, in _open
    '_open', req)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1360, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1319, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 60] Operation timed out>

TypeError: 'NoneType' object is not subscriptable

- Unavailable track Yea!! [USUYG1227510]
- Unavailable track Plastic [QMJMT1801953]
- Unavailable track Order [USUM71816897]
Traceback (most recent call last):
  File "spotify-restore.py", line 353, in <module>
    start_import()
  File "spotify-restore.py", line 300, in start_import
    if 'isrc' not in trk['track']['external_ids']:
TypeError: 'NoneType' object is not subscriptable

Above is the error I got upon first running script on a new deezer account. Below error happens every subsequent run.

+ Found track Yea!!
+ Found track Plastic
+ Found track Order
Traceback (most recent call last):
  File "spotify-restore.py", line 353, in <module>
    start_import()
  File "spotify-restore.py", line 300, in start_import
    if 'isrc' not in trk['track']['external_ids']:
TypeError: 'NoneType' object is not subscriptable

Unable to launch spotify-restore.py

Hey there, just started trying out this script, but I seem to always be stuck in the step where I have to launch the spotify-restore.py file. I've attached the errors shown in command prompt, so I hope that would help.
screenshot 54

Doesn't update playlists that already exist

I've noticed when trying to run this after updating my spotify that it doesn't add tracks to the playlists that already exist on deezer. Is there any way you can implement this? Or if it's easier, an option to delete all playlists from deezer to allow the updated playlists to transfer properly?

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.