mopidy / mopidy-gmusic

DEPRECATED (Mopidy extension for playing music from Google Play Music)
https://mopidy.com
Apache License 2.0
214 stars 60 forks source link

Error streaming some (not all) music from mpd #12

Closed aronson closed 11 years ago

aronson commented 11 years ago

I have found that some songs in my library (possibly only ones I get as a part of all-access) create this traceback in my logs and play only a split second of each track affected:

** Message: pygobject_register_sinkfunc is deprecated (GstObject)
INFO     Starting Mopidy 0.15.0
INFO     Loading config from: builtin defaults, /home/isaac/.config/mopidy/mopidy.conf, command line options
INFO     Disabled extension http: Dependency ws4py>=0.2.3 not found
INFO     Disabled extension scrobbler: Dependency pylast>=0.5.7 not found
INFO     Enabled extensions: mpd, local, mpris, stream, gmusic
INFO     Disabled extensions: spotify, http, scrobbler
INFO     Starting Mopidy audio
INFO     Audio output set to "autoaudiosink"
INFO     Starting Mopidy backends: StreamBackend, LocalBackend, GMusicBackend
INFO     Loaded 0 local tracks from /home/isaac/Music using /home/isaac/.local/share/mopidy/local/tag_cache
INFO     Loaded 0 local playlists from /home/isaac/.local/share/mopidy/local/playlists
INFO     Mopidy uses Google Music
INFO     !-- begin debug log --!
INFO     version: 2.0.0
INFO     logging to: /home/isaac/.cache/gmusicapi/log/gmusicapi.log
INFO     initialized
INFO     logged out
INFO     Starting Mopidy core
INFO     Audio mixer set to "alsamixer" using track "Master"
INFO     Starting new HTTPS connection (1): www.google.com
INFO     Starting new HTTPS connection (1): play.google.com
INFO     authenticated
INFO     Starting Mopidy frontends: MpdFrontend, MprisFrontend
INFO     MPD server running at [::]:6600
INFO     MPRIS server connected to D-Bus
WARNING  MPRIS frontend setup failed (To make asynchronous calls, receive signals or export objects, D-Bus connections must be attached to a main loop by passing mainloop=... to the constructor or calling dbus.set_default_main_loop(...))
INFO     New MPD connection from [::1]:52897
ERROR    Unhandled exception in MpdSession (urn:uuid:d63ffedd-dc6e-4ca4-905d-4c98c9b37cff):
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pykka/actor.py", line 200, in _actor_loop
    response = self._handle_receive(message)
  File "/usr/lib/python2.7/site-packages/pykka/actor.py", line 303, in _handle_receive
    return self.on_receive(message)
  File "/usr/lib/python2.7/site-packages/mopidy/utils/network.py", line 354, in on_receive
    self.on_line_received(line)
  File "/usr/lib/python2.7/site-packages/mopidy/frontends/mpd/session.py", line 33, in on_line_received
    response = self.dispatcher.handle_request(line)
  File "/usr/lib/python2.7/site-packages/mopidy/frontends/mpd/dispatcher.py", line 46, in handle_request
    return self._call_next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/site-packages/mopidy/frontends/mpd/dispatcher.py", line 67, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/site-packages/mopidy/frontends/mpd/dispatcher.py", line 75, in _catch_mpd_ack_errors_filter
    return self._call_next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/site-packages/mopidy/frontends/mpd/dispatcher.py", line 67, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/site-packages/mopidy/frontends/mpd/dispatcher.py", line 85, in _authenticate_filter
    return self._call_next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/site-packages/mopidy/frontends/mpd/dispatcher.py", line 67, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/site-packages/mopidy/frontends/mpd/dispatcher.py", line 106, in _command_list_filter
    response = self._call_next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/site-packages/mopidy/frontends/mpd/dispatcher.py", line 67, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/site-packages/mopidy/frontends/mpd/dispatcher.py", line 135, in _idle_filter
    response = self._call_next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/site-packages/mopidy/frontends/mpd/dispatcher.py", line 67, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/site-packages/mopidy/frontends/mpd/dispatcher.py", line 148, in _add_ok_filter
    response = self._call_next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/site-packages/mopidy/frontends/mpd/dispatcher.py", line 67, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/site-packages/mopidy/frontends/mpd/dispatcher.py", line 160, in _call_handler_filter
    response = self._format_response(self._call_handler(request))
  File "/usr/lib/python2.7/site-packages/mopidy/frontends/mpd/dispatcher.py", line 168, in _call_handler
    return handler(self.context, **kwargs)
  File "/usr/lib/python2.7/site-packages/mopidy/frontends/mpd/protocol/music_db.py", line 92, in find
    results = context.core.library.find_exact(**query).get()
  File "/usr/lib/python2.7/site-packages/pykka/future.py", line 299, in get
    exec('raise exc_info[0], exc_info[1], exc_info[2]')
  File "/usr/lib/python2.7/site-packages/pykka/actor.py", line 200, in _actor_loop
    response = self._handle_receive(message)
  File "/usr/lib/python2.7/site-packages/pykka/actor.py", line 294, in _handle_receive
    return callee(*message['args'], **message['kwargs'])
  File "/usr/lib/python2.7/site-packages/mopidy/core/library.py", line 75, in find_exact
    return [result for result in pykka.get_all(futures) if result]
  File "/usr/lib/python2.7/site-packages/pykka/future.py", line 330, in get_all
    return [future.get(timeout=timeout) for future in futures]
  File "/usr/lib/python2.7/site-packages/pykka/future.py", line 299, in get
    exec('raise exc_info[0], exc_info[1], exc_info[2]')
  File "/usr/lib/python2.7/site-packages/pykka/actor.py", line 200, in _actor_loop
    response = self._handle_receive(message)
  File "/usr/lib/python2.7/site-packages/pykka/actor.py", line 294, in _handle_receive
    return callee(*message['args'], **message['kwargs'])
  File "/usr/lib/python2.7/site-packages/mopidy_gmusic/library.py", line 45, in find_exact
    result_tracks = filter(date_filter, result_tracks)
  File "/usr/lib/python2.7/site-packages/mopidy_gmusic/library.py", line 32, in <lambda>
    date_filter = lambda t: q == str(t['year'])
``
hechtus commented 11 years ago

I suspect that playing some tracks stops after a short time is indeed related to the missing All Access support of the current release. It should have been fixed by #9.

The error you reported in the log file seems to be caused by an optional (missing) year field of a track. This is indeed a bug, but should also be fixed in the current development branch.

Is it possible, that you try the current development snapshot? Please note, that you will have to set the mobile device ID of your registered Android device in the Mopidy config file, as described in the README.rst of the plugin.

hechtus commented 11 years ago

Fixed in v0.2.