Giter VIP home page Giter VIP logo

gmusicfs's Introduction

GMusicFS

This is a FUSE filesystem for Google Music written in Python. It utilizes the unofficial gmusicapi written by Simon Weber.

This creates a filesystem that does the following:

  • Creates a directory of artists/<name of artist>/<albums>/<tracks>.
  • Access the cover image for each album as cover.jpg in the album directory.
  • Stream each track as an mp3 directly from the filesystem.

What this is useful for:

  • Copying a few tracks from Google Music directly to your hard drive (using a file manager or cp directly.)
  • Streaming music with mplayer or another simple music player.

What this is NOT useful for (yet..):

  • Importing all your music into iTunes, banshee, amarok etc. These big media players will attempt to read all the ID3 information from the files and not knowing that all the files are on a remote server. It might work, but it's going to be extremely inefficient and this might bring down the banhammer from Google..
  • Importing new music. The filesystem is read-only (this might change in a new version.)
  • Random-access within the mp3 files. You cannot seek() inside the mp3 files, they will only stream from the beginning of the file.

GMusicFS doesn't implement any caching. Copying a file should always work, because latency doesn't matter, but if you're streaming the music, you may want to turn on your player's caching system (eg. mplayer -cache 200.) You may notice a few blips in the sound during the first few seconds of each song without it. If you're on a low latency connection this might not affect you.

Installation

Installing GMusicFS requires two dependencies which currently cannot be resolved automatically:

Neither of these are able to be installed via setuptools at the current time. fusepy due to this bug and we currently require the development version of gmusicapi which is not on PyPI yet. No worries, we can install the dependencies manually:

pip install https://github.com/terencehonles/fusepy/tarball/master
pip install https://github.com/simon-weber/Unofficial-Google-Music-API/tarball/develop

Then install GMusicFS:

pip install https://github.com/EnigmaCurry/GMusicFS/tarball/master

Usage

Create a config file in ~/.gmusicfs:

[credentials]
username = [email protected]
password = your_password
deviceId = your_mobile_id

If you use 2-factor authentication, make sure you use an application specific password.

To find the device id, you may run gmusicfs with the parameter --deviceid after providing login informations.

gmusicfs --deviceid

Secure the configuration file so that no one else can read it (GMusicFS will complain about this if you forget):

chmod 600 ~/.gmusicfs

Command line parameters:

usage: gmusicfs [-h] [-f] [-v] [-vv] [-t] mountpoint

GMusicFS

positional arguments:
  mountpoint          The location to mount to

optional arguments:
  -h, --help          show this help message and exit
  -f, --foreground    Don't daemonize, run in the foreground.
  -v, --verbose       Be a little verbose
  -vv, --veryverbose  Be very verbose
  -t, --truefilesize  Report true filesizes (slower directory reads)
  --nolibrary         Don't scan the library at launch
  --deviceid          Get the mobile device ids bounded to your account

Example

Mount your music:

mkdir -p $HOME/google_music
gmusicfs $HOME/google_music

Unmount your music:

fusermount -u $HOME/google_music

gmusicfs's People

Contributors

enigmacurry avatar karlak avatar jaduncan avatar rjbell4 avatar

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.