GithubHelp home page GithubHelp 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 jaduncan avatar karlak avatar rjbell4 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  avatar  avatar

gmusicfs's Issues

TabError on startup

After a fresh install on GMusicFS with all the dependencies, I get an error when executing gmusicfs ~/google_music

The full output of the command is this :

Traceback (most recent call last):
  File "/usr/bin/gmusicfs", line 9, in <module>
    load_entry_point('GMusicFS==0.1', 'console_scripts', 'gmusicfs')()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 549, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2542, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2202, in load
    return self.resolve()
  File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2208, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3.5/site-packages/gmusicfs/gmusicfs.py", line 95
    if self.library.true_file_size:
                                  ^
TabError: inconsistent use of tabs and spaces in indentation

FUSE options

Mounting with the option --allusers sets the owner as group as root.
Is there any way to fix this?

logging in issue

Hi, there is an issue by logging in. gmusicfs.py needs at line 176 an extra 3rd argument passed:

deviceId

see: self.api.login(username, password, deviceId)

Feature Request: directory of playlists

It would be great if this could also present a directory of playlists in my Google Play Music account. It would make it much easier to sync songs to an offline MP3 player.

Missing album tags confuses the filesystem

nick@polaris ~/gmusicfs/artists % ls celia\ pavey
ls: cannot access celia pavey/0000 - : No such file or directory
0000 -

I'm not sure what "expected behavior" would be. The web client shows "Unknown Album", perhaps "0000 - unknown album"?

Why is it all lowercase?

Sorry to create an issue for this, but I can't determine if there's a better forum in which to ask a question and have a discussion.

Why does GMusicFS switch everything to lowercase? I can understand why case insensitivity might be nice for lookups, etc., but when browsing my files, I'd prefer to see them in mixed case. Can't we display things in mixed case, and just use lowercase internally?

issue when mounting the fs

Hello,
I managed to install fusepy, gmusicapi and GMusicFS

But when I try to mount the google music fs, I have this issue :

[root@alarmpi bin]# gmusicfs /media/music/brendan/
Traceback (most recent call last):
File "/usr/bin/gmusicfs", line 9, in
load_entry_point('GMusicFS==0.1', 'console_scripts', 'gmusicfs')()
File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 357, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 2394, in load_entry_point
return ep.load()
File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 2108, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/usr/lib/python3.3/site-packages/gmusicfs/gmusicfs.py", line 229
'st_mode' : (S_IFDIR |0755),
^
SyntaxError: invalid token

Cannot Mount FS: "KeyError: 'albumArtist'"

RaspberryPi / RuneAudio
Linux version 3.18.7-3-ARCH (builduser@leming) (gcc version 4.9.2 20141224 (prerelease) (GCC) ) #1 SMP PREEMPT Fri Feb 13 06:23:21 MST 2015

Error in console:

INFO:gmusicapi.Mobileclient1:!-- begin debug log --!
INFO:gmusicapi.Mobileclient1:version: 5.0.0-dev
INFO:gmusicapi.Mobileclient1:logging to: /root/.cache/gmusicapi/log/gmusicapi.log
INFO:gmusicapi.Mobileclient1:initialized
INFO:gmusicapi.Mobileclient1:logged out
INFO:gmusicfs:Logging in...
DEBUG:gmusicapi.Mobileclient1:ClientLogin()
DEBUG:gmusicapi.Mobileclient1:Init(args=[], kwargs={})
DEBUG:gmusicapi.Mobileclient1:
INFO:gmusicapi.Mobileclient1:authenticated
INFO:gmusicfs:Login successful.
INFO:gmusicfs:Gathering track information...
DEBUG:gmusicapi.Mobileclient1:ListTracks(args=[], kwargs={'start_token': None, 'max_results': 20000})
DEBUG:gmusicapi.Mobileclient1:{u'kind': u'sj#trackList', u'data': {u'items': ['<1128 tracks>']}}
Traceback (most recent call last):
File "/usr/bin/gmusicfs", line 9, in
load_entry_point('GMusicFS==0.1', 'console_scripts', 'gmusicfs')()
File "/usr/lib/python2.7/site-packages/gmusicfs/gmusicfs.py", line 479, in main
fs = GMusicFS(mountpoint, true_file_size=args.true_file_size, verbose=verbosity, scan_library= not args.nolibrary)
File "/usr/lib/python2.7/site-packages/gmusicfs/gmusicfs.py", line 243, in init
true_file_size=true_file_size, verbose=verbose, scan=scan_library)
File "/usr/lib/python2.7/site-packages/gmusicfs/gmusicfs.py", line 140, in init
self.rescan()
File "/usr/lib/python2.7/site-packages/gmusicfs/gmusicfs.py", line 146, in rescan
self.__aggregate_albums()
File "/usr/lib/python2.7/site-packages/gmusicfs/gmusicfs.py", line 189, in __aggregate_albums
artist = formatNames(track['albumArtist'].lower())
KeyError: 'albumArtist'

gmusicapi log:

version: 5.0.0-dev
logging to: /root/.cache/gmusicapi/log/gmusicapi.log
2015-03-14 20:13:26,719 - gmusicapi.Mobileclient1 (shared:70) [INFO]: initialized
2015-03-14 20:13:26,724 - gmusicapi.Mobileclient1 (shared:93) [INFO]: logged out
2015-03-14 20:13:26,990 - gmusicapi.Mobileclient1 (shared:205) [DEBUG]: ClientLogin()
2015-03-14 20:13:27,522 - gmusicapi.Mobileclient1 (shared:202) [DEBUG]: Init(args=[], kwargs={})
2015-03-14 20:13:28,043 - gmusicapi.Mobileclient1 (shared:243) [DEBUG]:
2015-03-14 20:13:28,046 - gmusicapi.Mobileclient1 (mobileclient:49) [INFO]: authenticated
2015-03-14 20:13:28,060 - gmusicapi.Mobileclient1 (shared:202) [DEBUG]: ListTracks(args=[], kwargs={'start_token': None, 'max_results': 20000})
2015-03-14 20:13:31,241 - gmusicapi.Mobileclient1 (shared:243) [DEBUG]: {u'kind': u'sj#trackList', u'data': {u'items': ['<1128 tracks>']}}

cannot retrieve device id

gmusicfs --deviceid
ERROR:gmusicapi.Webclient1:the response format for GetSettings was not recognized.

Failed to validate field 'devices' list schema: additional property 'lastUsedMs' not defined by 'properties' or 'patternProperties' are not allowed in list item

First, try the develop branch. If you can recreate this error with the most recent code please create an issue that includes the above ValidationException and the following request/response:
{'url': 'https://play.google.com/music/services/loadsettings', 'headers': {'Authorization': ''}, 'data': {'json': '{"sessionId": ""}'}, 'method': 'POST', 'params': {'u': 0, 'xt': 'CjUKATASMEFNLVdiWGo0eERNOS1TYjJJT3NBX0tXMUxla2Njb1luckE6MTQwMTUzMDI1NDM3Nw=='}}

'{"settings":{"labs":[{"enabled":false,"title":"Desktop Notifications","description":"Find out what\u0027s playing without having to switch back to your Google Play Music tab. A notification will appear at the start of each song with the song title, artist name, album title and album cover. Support for this lab is still experimental and it may not work in all cases.","name":"dn"},{"enabled":true,"title":"HTML5 Audio","description":"Listen to your music without the need for Flash. Support for this lab is still experimental and it may not work in all cases.","name":"ha"},{"enabled":false,"title":"5-Star Ratings","description":"Rate songs on a 5-star scale rather than thumbs up or thumbs down.","name":"sr"},{"enabled":false,"title":"View Track Comments","description":"Enable a comments field to be seen and edited for all songs. Although many people ignore this field, some find it helpful for storing additional information such as multiple genres, moods, musicians, conductors, dance styles,...'

A traceback follows:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gmusicapi/protocol/shared.py", line 248, in perform
cls.validate(response, parsed_response)
File "/usr/local/lib/python2.7/dist-packages/gmusicapi/protocol/webclient.py", line 103, in validate
return validictory.validate(msg, cls._res_schema)
File "/usr/local/lib/python2.7/dist-packages/validictory/init.py", line 36, in validate
return v.validate(data, schema)
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 584, in validate
self._validate(data, schema)
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 587, in _validate
self.__validate("_data", {"_data": data}, schema)
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 618, in __validate
newschema.get(schemaprop))
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 242, in validate_properties
properties.get(eachProp))
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 618, in __validate
newschema.get(schemaprop))
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 242, in validate_properties
properties.get(eachProp))
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 618, in __validate
newschema.get(schemaprop))
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 288, in validate_items
e.value)
ValidationException: Failed to validate field 'devices' list schema: additional property 'lastUsedMs' not defined by 'properties' or 'patternProperties' are not allowed in list item
NoName : 0x31e5e5d2a733c961
NoName : 0x32395fbc9dd954d0
NoName : 0x347322676594dc60
NoName : 0x365c49c1e87c99a7
NoName : 0x39eb63e4b2554c72
NoName : 0x3a52b4c0db878e79
NoName : 0x3cf7ca5d1486996a
NoName : 0x3f3c45c0af468c89

Debug Logging causes fatal error

I've installed and configured the packages as described in the README, however a series of tracebacks are logged to the console which indicate some type of bug in the logging of debug information:

gmusicfs /mnt/gmusicfs/
INFO:gmusicapi:!-- begin debug log --!
INFO:gmusicapi:version: 2013.03.1X
DEBUG:gmusicapi.protocol.shared:ClientLogin()
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): www.google.com
DEBUG:requests.packages.urllib3.connectionpool:"POST /accounts/ClientLogin HTTP/1.1" 200 881
DEBUG:gmusicapi.protocol.shared:Init(args=[], kwargs={})
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): play.google.com
DEBUG:requests.packages.urllib3.connectionpool:"HEAD /music/listen HTTP/1.1" 200 0
DEBUG:gmusicapi.protocol.shared:
INFO:gmusicapi.api:authenticated
DEBUG:gmusicapi.protocol.shared:AuthenticateUploader(args=['60:21:C0:EC:72', u'localhost (gmusicapi)'], kwargs={})
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): android.clients.google.com
DEBUG:requests.packages.urllib3.connectionpool:"POST /upsj/upauth HTTP/1.1" 200 4
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/init.py", line 846, in emit
msg = self.format(record)
File "/usr/lib/python2.7/logging/init.py", line 723, in format
return fmt.format(record)
File "/usr/lib/python2.7/logging/init.py", line 464, in format
record.message = record.getMessage()
File "/usr/lib/python2.7/logging/init.py", line 324, in getMessage
msg = str(self.msg)
File "/usr/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 660, in str
return text_format.MessageToString(self)
File "/usr/lib/python2.7/site-packages/google/protobuf/text_format.py", line 58, in MessageToString
PrintMessage(message, out, as_utf8=as_utf8, as_one_line=as_one_line)
File "/usr/lib/python2.7/site-packages/google/protobuf/text_format.py", line 72, in PrintMessage
PrintField(field, value, out, indent, as_utf8, as_one_line)
File "/usr/lib/python2.7/site-packages/google/protobuf/text_format.py", line 101, in PrintField
PrintFieldValue(field, value, out, indent, as_utf8, as_one_line)
File "/usr/lib/python2.7/site-packages/google/protobuf/text_format.py", line 123, in PrintFieldValue
out.write(field.enum_type.values_by_number[value].name)
KeyError: 16L
Logged from file shared.py, line 219
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/init.py", line 846, in emit
msg = self.format(record)
File "/usr/lib/python2.7/logging/init.py", line 723, in format
return fmt.format(record)
File "/usr/lib/python2.7/logging/init.py", line 464, in format
record.message = record.getMessage()
File "/usr/lib/python2.7/logging/init.py", line 324, in getMessage
msg = str(self.msg)
File "/usr/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 660, in str
return text_format.MessageToString(self)
File "/usr/lib/python2.7/site-packages/google/protobuf/text_format.py", line 58, in MessageToString
PrintMessage(message, out, as_utf8=as_utf8, as_one_line=as_one_line)
File "/usr/lib/python2.7/site-packages/google/protobuf/text_format.py", line 72, in PrintMessage
PrintField(field, value, out, indent, as_utf8, as_one_line)
File "/usr/lib/python2.7/site-packages/google/protobuf/text_format.py", line 101, in PrintField
PrintFieldValue(field, value, out, indent, as_utf8, as_one_line)
File "/usr/lib/python2.7/site-packages/google/protobuf/text_format.py", line 123, in PrintFieldValue
out.write(field.enum_type.values_by_number[value].name)
KeyError: 16L
Logged from file shared.py, line 219
Traceback (most recent call last):
File "/usr/bin/gmusicfs", line 9, in
load_entry_point('GMusicFS==0.1', 'console_scripts', 'gmusicfs')()
File "/usr/lib/python2.7/site-packages/gmusicfs/gmusicfs.py", line 338, in main
fuse = FUSE(GMusicFS(mountpoint, true_file_size=args.true_file_size),
File "/usr/lib/python2.7/site-packages/gmusicfs/gmusicfs.py", line 193, in init
true_file_size=true_file_size)
File "/usr/lib/python2.7/site-packages/gmusicfs/gmusicfs.py", line 106, in init
self.__login(username, password)
File "/usr/lib/python2.7/site-packages/gmusicfs/gmusicfs.py", line 135, in __login
self.api.login(username, password)
File "/usr/lib/python2.7/site-packages/gmusicapi/api.py", line 112, in login
uploader_name)
File "/usr/lib/python2.7/site-packages/gmusicapi/api.py", line 909, in _make_call
return protocol.perform(self.session, _args, *_kwargs)
File "/usr/lib/python2.7/site-packages/gmusicapi/protocol/shared.py", line 223, in perform
cls.check_success(response, msg)
File "/usr/lib/python2.7/site-packages/gmusicapi/protocol/musicmanager.py", line 76, in check_success
res_name = enum_desc.values_by_number[msg.auth_status].name
KeyError: 16L

The gmusicfs.log file contains:
!-- begin debug log --!
version: 2013.03.1X
2013-03-19 10:49:19,236 - gmusicapi.protocol.shared (201) [DEBUG]: ClientLogin()
2013-03-19 10:49:19,471 - gmusicapi.protocol.shared (198) [DEBUG]: Init(args=[], kwargs={})
2013-03-19 10:49:19,947 - gmusicapi.protocol.shared (219) [DEBUG]:
2013-03-19 10:49:19,947 - gmusicapi.api (90) [INFO]: authenticated
2013-03-19 10:49:19,948 - gmusicapi.protocol.shared (198) [DEBUG]: AuthenticateUploader(args=['60:21:C0:EC:72', u'localhost (gmusicapi)'], kwargs={})

mpv occasionally skips

nick@polaris ~/gmusicfs/artists % mpv --cache-initial 2000 blue\ stahli/2011\ -\ blue\ stahli/001\ -\ ultranumb.mp3
Playing: blue stahli/2011 - blue stahli/001 - ultranumb.mp3
Cache fill: 8.20% (2099200 bytes)
[ffmpeg/demuxer] mp3: Estimating duration from bitrate, this may be inaccurate
(+) Audio --aid=1 (mp3)
AO: [pulse] 44100Hz stereo 2ch s16
A: 00:00:02 / 00:04:45 (0%) Cache: 2s+9856KB
[file] Connection lost! Attempting to reconnect (1)...
A: 00:01:01 / 00:04:45 (21%) Cache: 2s+7871KB
[ffmpeg/audio] mp3: Header missing
Error decoding audio.

The bold is what mpv prints when it skips by about a second. (I've also seen "incomplete frame" towards the end of one file) Playback otherwise is fine.

SSL certificate failing... I think?

 File "gmusicfs.py", line 452, in <module>
    main()
  File "gmusicfs.py", line 444, in main
    fs = GMusicFS(mountpoint, true_file_size=args.true_file_size, verbose=verbosity, scan_library= not args.nolibrary)
  File "gmusicfs.py", line 225, in __init__
    true_file_size=true_file_size, verbose=verbose, scan=scan_library)
  File "gmusicfs.py", line 117, in __init__
    self.__login_and_setup(username, password)
  File "gmusicfs.py", line 161, in __login_and_setup
    self.api.login(username, password)
  File "/usr/local/lib/python2.7/dist-packages/gmusicapi/clients/mobileclient.py", line 34, in login
    if not self.session.login(email, password):
  File "/usr/local/lib/python2.7/dist-packages/gmusicapi/session.py", line 87, in login
    res = ClientLogin.perform(self, True, email, password)
  File "/usr/local/lib/python2.7/dist-packages/gmusicapi/protocol/shared.py", line 208, in perform
    response = session.send(req_kwargs, cls.required_auth)
  File "/usr/local/lib/python2.7/dist-packages/gmusicapi/session.py", line 59, in send
    return self._send_without_auth(req_kwargs, rsession)
  File "/usr/local/lib/python2.7/dist-packages/gmusicapi/session.py", line 30, in _send_without_auth
    res = rsession.request(**req_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 354, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 460, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 250, in send
    raise SSLError(e)

And the actual error:

requests.exceptions.SSLError: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

I've not got any problem running the this on Ubuntu 13.04 but trying to get it running on my Raspberry Pi for a side project. Unsure if there is something I've just not setup correctly?

Exception thrown when -t parameter is used: AttributeError: 'list' object has no attribute 'strip'

When I use real file sizes, GMusicFS doesn't work at all, just throws an exception when I try and browse directory contents.

When I use fake sizes (no -t), then everything works as expected.

DEBUG:fuse.log-mixin:<- readdir '[Unhandled Exception]'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/fuse.py", line 420, in _wrapper
return func(_args, *_kwargs) or 0
File "/usr/local/lib/python2.7/dist-packages/fuse.py", line 608, in readdir
fip.contents.fh):
File "/usr/local/lib/python2.7/dist-packages/fuse.py", line 887, in call
ret = getattr(self, op)(path, *args)
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 344, in readdir
for track in album.get_tracks(get_size=True):
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 55, in get_tracks
r = urllib2.Request(self.get_track_stream(t))
File "/usr/lib/python2.7/urllib2.py", line 202, in init
self.__original = unwrap(url)
File "/usr/lib/python2.7/urllib.py", line 1057, in unwrap
url = url.strip()
AttributeError: 'list' object has no attribute 'strip'

Changed API of gmusicapi?

INFO:gmusicfs:Logging in...
Traceback (most recent call last):
File "/usr/local/bin/gmusicfs", line 9, in
load_entry_point('GMusicFS==0.1', 'console_scripts', 'gmusicfs')()
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 476, in main
fs = GMusicFS(mountpoint, true_file_size=args.true_file_size, verbose=verbosity, scan_library= not args.nolibrary)
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 240, in init
true_file_size=true_file_size, verbose=verbose, scan=scan_library)
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 132, in init
self.__login_and_setup(username, password)
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 176, in __login_and_setup
self.api.login(username, password)
TypeError: login() takes at least 4 arguments (3 given)

Increment Playcount.

May it be possible that I submit a patch, that enables the fs to increment the play count of a file, every time it is played?

your readme sucks ...

the documentation on how to install and use is really lacking like shit.. why the hell bother if you are gonna half ass it. someone needs to write out DETAILED step by step install instructions. once i have everything installed where am i creating a config file?
what should be the name of the config file?
why is ~/.gmusicfs different than /root/.gmusicfs ?

some better documentation for use beginners would be nice

root@localhost:# gmusicfs --deviceid
Traceback (most recent call last):
File "/usr/local/bin/gmusicfs", line 9, in
load_entry_point('GMusicFS==0.1', 'console_scripts', 'gmusicfs')()
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 426, in main
getDeviceId()
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 389, in getDeviceId
% cred_path)
gmusicfs.gmusicfs.NoCredentialException: No username/password was specified. No config file could be found either. Try creating /root/.gmusicfs and specifying your username/password there. Make sure to chmod 600.
root@localhost:
# ls
config gmusicfs tmp
root@localhost:# cd ./gmusicfs/
root@localhost:
/gmusicfs# ls
root@localhost:~/gmusicfs#

Not showing much of my music

Previously I used to be able to add an album to my library, remount the folder and that album would appear, now it seems to be only showing a small selection of what I have in my library, and seemingly its random.

any idea about this?

thanks

20MB file size limit

If I download a file that is more than 20MB in size, it just stops downloading at exactly 20MB. This is obviously problematic for recordings of technical talks and such.

This error is occuring on Debian wheezy amd64 and Ubuntu 13.10 beta 1 x86, so I don't think it's a simple configuration issue. Any ideas?

MP3 files grabbed from Google Play Music All Access using GMusicFS is corrupted/abrupt/incomplete (have invalid/corrupted/abrupt/incomplete last MP3 frame)

I've subscribed to Google Play Music All Access,
have added 3 tracks to my Google Music Library,
have mounted my Google Music Library to directory on my hard drive using GMusicFS,
have copied these 3 MP3 files from mounted directory to another directory using a file manager,
have bought these 3 tracks from Google Play Music,
have downloaded these 3 bought MP3 files via Google Music web interface,
have processed these 3 downloaded MP3 files (have removed ID3 tags placed at the start of the files),
have compared these 3 processed (without ID3 tags) MP3 files by content to 3 copied using GMusicFS MP3 files,
and have found that MP3 files copied using GMusicFS is corrupted/abrupt/incomplete (have invalid/corrupted/abrupt/incomplete last MP3 frame).

File name: f1cbc8b4-ecd4-35e2-8b51-1a0c4b5c80db_GooglePlay.mp3
Size: 12 610 872 bytes
SHA-1: A5D03D0B6F5C6A6FA715CC1335CB643C278A1371
Valid MP3 frames: 12 068
Invalid MP3 frames: 0
File name: f1cbc8b4-ecd4-35e2-8b51-1a0c4b5c80db_GMusicFS.mp3
Size: 12 609 840 bytes
SHA-1: 86400FEC534B5FF77CEBF19671FEFD78944E6585
Valid MP3 frames: 12 067
Invalid MP3 frames: 1

12 610 872 - 12 609 840 = 1 302 bytes
1 - 0 = 1 invalid frame

File name: e69adc53-b424-39b0-87a2-59c7f2dbe8e5_GooglePlay.mp3
Size: 12 648 488 bytes
SHA-1: C0823E55A16B9E1C731815A13EC0A08CF166261A
Valid MP3 frames: 12 104
Invalid MP3 frames: 0
File name: e69adc53-b424-39b0-87a2-59c7f2dbe8e5_GMusicFS.mp3
Size: 12 647 480 bytes
SHA-1: 41E76AB689CECF9047A602CDFD94612AE4D0BAE8
Valid MP3 frames: 12 103
Invalid MP3 frames: 1

12 648 488 - 12647480 = 1 108 bytes
1 - 0 = 1 invalid frame

File name: 8ef837bb-f47c-3ad5-8e21-14644a085f15_GooglePlay.mp3
Size: 7 480 423 bytes
SHA-1: 94D80819797E7A65B0AF7F366C1BC71819D7132C
Valid MP3 frames: 7 158
Invalid MP3 frames: 0
File name: 8ef837bb-f47c-3ad5-8e21-14644a085f15_GMusicFS.mp3
Size: 7 479 440 bytes
SHA-1: 271D8F8005070928EC2C3E50C8E92621421891D2
Valid MP3 frames: 7 157
Invalid MP3 frames: 1

7 480 423 - 7 479 440 = 983 bytes
1 - 0 = 1 invalid frame

Id3 info in copied files

first off thanks for this awsome app.

what seem missing is id3 info after a copy. don't know how to implement it myself.
would be a great feature.

cannot mount file system

gmusicfs ~/music
Traceback (most recent call last):
File "/usr/local/bin/gmusicfs", line 9, in
load_entry_point('GMusicFS==0.1', 'console_scripts', 'gmusicfs')()
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 452, in main
fs = GMusicFS(mountpoint, true_file_size=args.true_file_size, verbose=verbosity)
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 229, in init
true_file_size=true_file_size, verbose=verbose)
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 132, in init
self.rescan()
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 138, in rescan
self.__aggregate_albums()
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 172, in __aggregate_albums
tracks = self.api.get_all_songs()
AttributeError: 'Webclient' object has no attribute 'get_all_songs'

Directory Structure

Directory Structure options:

  1. Create base folders based on genre with subfolders for artists and albums (e.g. \Genre\Artist\Album)
  2. Create base folders based on artist with subfolders for albums (e.g. \Artist\Album)

Error when reading files - AttributeError: 'Buffer' object has no attribute 'headers'

Hi,

cp gives me this error when I try to copy files:

elizabeth@ein ~/google_music/artists/crudbump/2012 - real art $ cp 002\ -\ white\ house.mp3 ~
cp: error reading ‘002 - white house.mp3’: Bad address
cp: failed to extend ‘/home/elizabeth/002 - white house.mp3’: Bad address

The debug log is filled with stuff like this:

DEBUG:fuse.log-mixin:<- open 32768
DEBUG:fuse.log-mixin:-> read /artists/crudbump/2012 - real art/006 - i'm meaty.mp3 (16384L, 0, 32768L)
DEBUG:fuse.log-mixin:<- read '[Unhandled Exception]'
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/fuse.py", line 420, in _wrapper
    return func(*args, **kwargs) or 0
  File "/usr/lib64/python2.7/site-packages/fuse.py", line 500, in read
    offset, fh)
  File "/usr/lib64/python2.7/site-packages/fuse.py", line 887, in __call__
    ret = getattr(self, op)(path, *args)
  File "/usr/lib64/python2.7/site-packages/gmusicfs/gmusicfs.py", line 332, in read
    if artist_album_track_m and (int(u.headers['Content-Length']) < (offset + size)):
AttributeError: 'Buffer' object has no attribute 'headers'

Cannot open for reading: Bad address

Lately I'm getting the following error:

cp gmusic/artists/x/y.mp3 .
cp: cannot open 'gmusic/artists/x/y.mp3' for reading: Bad address

Is it still supposed to work or did Google change anything?

Using rsync to copy files results in each song being 2GB big

First song:
2,000,000,000 100% 202.93MB/s 0:00:09 (xfr#1, to-chk=12/15)
second song:
2,000,000,000 100% 146.62MB/s 0:00:13 (xfr#2, to-chk=11/15)
...
A simple cp created a reasonable file size within the same session.

I prefer using rsync though for several reasons: I can skip already downloaded files and it gives me a nice progress report.

After mounting fs, system can't read audio tracks

After
eric@pico:~$ gmusicfs audio/google_music

Files can't be read by OS:

eric@pico:~$ file *
audio/google_music/artists/alain souchon/1995 - défoule sentimentale (live)/017 - le fil (live).mp3: executable, regular file, no read permission

even as root I can't read it:
eric@pico:~$ sudo su
root@pico:/home/eric# file audio/google_music/artists/alain\ souchon/1995\ -\ défoule\ sentimentale\ (live)/*
audio/google_music/artists/alain souchon/1995 - défoule sentimentale (live)/017 - le fil (live).mp3: executable, regular file, no read permission

So I can't listen to the file or even copy it

Module has no license

Hi,
I would like to make an AUR package for your module. I can't seem to find a license, though. Have you picked one or is it in the public domain?

Webclient1:failed to authenticate ... gmusicfs:Login successful.

Hello,

I'm having a little problem with mounting the filesystem.
It says that I'm logged in but then the logs show otherwise. No need to say but my password is correct, I do know it :-)

Here is the detail of the error I got (Platform Ubuntu 13.10 x86_64)
The only thing I can think of is that my password has some special characters... can this be the problem ?

xxx@yyy:~$ gmusicfs -vv Music/Google/

INFO:gmusicapi.Webclient1:!-- begin debug log --!
INFO:gmusicapi.Webclient1:version: 3.1.1-dev
INFO:gmusicapi.Webclient1:logging to: /home/acharlier/.cache/gmusicapi/log/gmusicapi.log
INFO:gmusicapi.Webclient1:initialized
INFO:gmusicapi.Webclient1:logged out
INFO:gmusicfs:Logging in...
DEBUG:gmusicapi.Webclient1:ClientLogin()
INFO:urllib3.connectionpool:Starting new HTTPS connection (1): www.google.com
DEBUG:urllib3.connectionpool:"POST /accounts/ClientLogin HTTP/1.1" 403 49
INFO:gmusicapi.Webclient1:failed to authenticate
INFO:gmusicfs:Login successful.
INFO:gmusicfs:Gathering track information...
DEBUG:gmusicapi.Webclient1:GetLibrarySongs(args=[None], kwargs={})
Traceback (most recent call last):
File "/usr/local/bin/gmusicfs", line 9, in
load_entry_point('GMusicFS==0.1', 'console_scripts', 'gmusicfs')()
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 452, in main
fs = GMusicFS(mountpoint, true_file_size=args.true_file_size, verbose=verbosity)
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 229, in init
true_file_size=true_file_size, verbose=verbose)
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 132, in init
self.rescan()
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 138, in rescan
self.__aggregate_albums()
File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 172, in __aggregate_albums
tracks = self.api.get_all_songs()
File "/usr/local/lib/python2.7/dist-packages/gmusicapi/clients/webclient.py", line 312, in get_all_songs
to_return = [song for chunk in to_return for song in chunk]
File "/usr/local/lib/python2.7/dist-packages/gmusicapi/clients/webclient.py", line 324, in _get_all_songs
lib_chunk['continuationToken'])
File "/usr/local/lib/python2.7/dist-packages/gmusicapi/clients/shared.py", line 80, in _make_call
return protocol.perform(self.session, self.validate, _args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/gmusicapi/protocol/shared.py", line 208, in perform
response = session.send(req_kwargs, cls.required_auth)
File "/usr/local/lib/python2.7/dist-packages/gmusicapi/session.py", line 80, in send
raise NotLoggedIn
gmusicapi.exceptions.NotLoggedIn

Thanks !!!

GMusicFS fails to mount after upgrading gmusicapi to 6.0.0

GMusicFS fails to mount after upgrading gmusicapi to 6.0.0:

Traceback (most recent call last):
  File "/usr/bin/gmusicfs", line 9, in <module>
    load_entry_point('GMusicFS==0.1', 'console_scripts', 'gmusicfs')()
  File "/usr/lib64/python2.7/site-packages/gmusicfs/gmusicfs.py", line 476, in main
    fs = GMusicFS(mountpoint, true_file_size=args.true_file_size, verbose=verbosity, scan_library= not args.nolibrary)
  File "/usr/lib64/python2.7/site-packages/gmusicfs/gmusicfs.py", line 240, in __init__
    true_file_size=true_file_size, verbose=verbose, scan=scan_library)
  File "/usr/lib64/python2.7/site-packages/gmusicfs/gmusicfs.py", line 132, in __init__
    self.__login_and_setup(username, password)
  File "/usr/lib64/python2.7/site-packages/gmusicfs/gmusicfs.py", line 176, in __login_and_setup
    self.api.login(username, password)
TypeError: login() takes exactly 4 arguments (3 given)

Input/Ouput error

gmusicfs -vv mountdir lists the following number of tracks

DEBUG:gmusicfs:6615 tracks loaded.
DEBUG:gmusicfs:786 artists loaded.
DEBUG:gmusicfs:963 albums loaded.

going into the mounted directory and trying to ls I get 111 artists:

ls: reading directory .: Input/output error

Any ideas?

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.