Giter VIP home page Giter VIP logo

gmusic_export's Introduction

gmusic_export

Export Google Music Takeout Data to Subsonic Based Servers

This script allows you export your playlists and liked songs to your subsonic based servers (eg. Airsonic or Funkwhale). The songs already need to be present at the server.

Prerequirement

This script requires py-sonic. The easiest way to install it is with pip3 install py-sonic

Usage

To use it, first you must modify the server url and credential variables at the top of the script. Then you call the script with python3:

python3 gmusic_export.py -s /home/user/googletakeout/

This will star all songs that have an CSV file in the folder googletakeout

python3 gmusic_export.py -p "Nice songs" /home/user/googletakeout/

This will add all songs that have an CSV file in the folder googletakeout to the new playlist "Nice Songs"

If any items fail (eg. cannot be looked up at the server), a copy of the CSV file will be placed in a subfolder named "failed" located in the folder where the script was called.

gmusic_export's People

Contributors

forceu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gmusic_export's Issues

Error creating playlist

Hey there. Thanks for making this little script!

I am getting the following error:

Traceback (most recent call last):
  File "gmusic_export.py", line 118, in <module>
    if create_playlist(conn, PLAYLIST_NAME, playlistSongs):
  File "gmusic_export.py", line 74, in create_playlist
    playlists=connection.createPlaylist(name=playlistname,songIds=playlistSongs)
  File "/home/zs/.local/lib/python3.8/site-packages/libsonic/connection.py", line 758, in createPlaylist
    res = self._doInfoReq(req)
  File "/home/zs/.local/lib/python3.8/site-packages/libsonic/connection.py", line 2782, in _doInfoReq
    dres = json.loads(res.read().decode('utf-8'))
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 2)

I'm guessing the response isn't in JSON format. Any idea how to remedy this?

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.