tehkillerbee / mopidy-tidal

Tidal Backend plugin for Mopidy
Apache License 2.0
93 stars 29 forks source link

Browsing works, playback fails #1

Closed ZenithDK closed 8 years ago

ZenithDK commented 8 years ago

I tried the plug-in and while browsing seems to work for me, playback does not:

DEBUG    2016-02-12 00:37:29,651 [17090:HttpServer] mopidy.http.handlers
  Received WebSocket message from 10.0.0.102: u'{"method":"core.playback.play","jsonrpc":"2.0","id":739}'
DEBUG    2016-02-12 00:37:29,654 [17090:Core-9] mopidy.core.playback
  Changing state: stopped -> playing
DEBUG    2016-02-12 00:37:29,655 [17090:Core-9] mopidy.core.playback
  Triggering playback state change event
DEBUG    2016-02-12 00:37:29,656 [17090:MainThread] mopidy.listener
  Sending playback_state_changed to CoreListener: {'old_state': u'stopped', 'new_state': u'playing'}
DEBUG    2016-02-12 00:37:29,661 [17090:Audio-2] mopidy.audio.gst
  State change to GST_STATE_READY: result=GST_STATE_CHANGE_SUCCESS
INFO     2016-02-12 00:37:29,662 [17090:TidalBackend-8] mopidy_tidal.playback
  TIDAL uri: tidal:track:4597561:47623802:47623803
DEBUG    2016-02-12 00:37:29,667 [17090:MainThread] mopidy.audio.gst
  Got state-changed message: old=GST_STATE_NULL new=GST_STATE_READY pending=GST_STATE_VOID_PENDING
INFO     2016-02-12 00:37:30,215 [17090:TidalBackend-8] mopidy_tidal.playback
  transformed into rtmp.stream.tidalhifi.com/cfx/st/mp4:30832674/08549e6f28e46fe218d8bc93b82dd3fd_37.m4a?Expires=1455235650&Signature=JyAzpWJey92mp7OIU4nbvMhL~B2FuU25nZaulCSBTgAAIVqkZ6DyOUP22M2vdei9ghGi84deFuWYNbWHuewBKfcCSecVkJDVhHwOTD-h01KkU2HGH5RV1tv5bRTnH8OZeglDAg4-Fpvbh9BzgkuRr1l-sIbfH~9iRAloIinKWQXRvyUSY7uI84TkTi034DVf4B-pis0bNrEvRlEVZbEmScPW3ktWrPTGljk0G56fOrFh7rUCRr6SvBSYu3v8klAnWkOA0RyPFQUfg-Hu3cTOKG1ygM71RHQ0MaB806mfdy1OeUpv5S8LskK6jDo6VA3vTsOcXhFBmPd-HutkAeDfVQ__&Key-Pair-Id=APKAIZ3WPBE4R6SP555A
DEBUG    2016-02-12 00:37:30,215 [17090:TidalBackend-8] mopidy.backend
  Backend translated URI from tidal:track:4597561:47623802:47623803 to rtmp.stream.tidalhifi.com/cfx/st/mp4:30832674/08549e6f28e46fe218d8bc93b82dd3fd_37.m4a?Expires=1455235650&Signature=JyAzpWJey92mp7OIU4nbvMhL~B2FuU25nZaulCSBTgAAIVqkZ6DyOUP22M2vdei9ghGi84deFuWYNbWHuewBKfcCSecVkJDVhHwOTD-h01KkU2HGH5RV1tv5bRTnH8OZeglDAg4-Fpvbh9BzgkuRr1l-sIbfH~9iRAloIinKWQXRvyUSY7uI84TkTi034DVf4B-pis0bNrEvRlEVZbEmScPW3ktWrPTGljk0G56fOrFh7rUCRr6SvBSYu3v8klAnWkOA0RyPFQUfg-Hu3cTOKG1ygM71RHQ0MaB806mfdy1OeUpv5S8LskK6jDo6VA3vTsOcXhFBmPd-HutkAeDfVQ__&Key-Pair-Id=APKAIZ3WPBE4R6SP555A
DEBUG    2016-02-12 00:37:30,217 [17090:SoftwareMixer-1] mopidy.mixer
  Mixer event: volume_changed(volume=100)
DEBUG    2016-02-12 00:37:30,218 [17090:MainThread] mopidy.listener
  Sending volume_changed to MixerListener: {'volume': 100}
DEBUG    2016-02-12 00:37:30,221 [17090:Audio-2] mopidy.audio.gst
  State change to GST_STATE_PLAYING: result=GST_STATE_CHANGE_FAILURE
WARNING  2016-02-12 00:37:30,222 [17090:Audio-2] mopidy.audio.actor
  Setting GStreamer state to GST_STATE_PLAYING failed
ERROR    2016-02-12 00:37:30,223 [17090:MainThread] mopidy.audio.gst
  Resource not found.
DEBUG    2016-02-12 00:37:30,223 [17090:MainThread] mopidy.audio.gst
  gsturidecodebin.c(1262): gen_source_element (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin31
DEBUG    2016-02-12 00:37:30,224 [17090:MainThread] mopidy.audio.gst
  State change to GST_STATE_NULL: result=GST_STATE_CHANGE_SUCCESS
WARNING  2016-02-12 00:37:30,225 [17090:Core-9] mopidy.core.tracklist
  Track is not playable: tidal:track:4597561:47623802:47623803
DEBUG    2016-02-12 00:37:30,227 [17090:Audio-2] mopidy.audio.actor
  Position query failed
DEBUG    2016-02-12 00:37:30,229 [17090:Audio-2] mopidy.audio.gst
  State change to GST_STATE_NULL: result=GST_STATE_CHANGE_SUCCESS
DEBUG    2016-02-12 00:37:30,230 [17090:Core-9] mopidy.core.playback
  Changing state: playing -> stopped
DEBUG    2016-02-12 00:37:30,230 [17090:Core-9] mopidy.core.playback
  Triggering playback state change event
DEBUG    2016-02-12 00:37:30,230 [17090:Core-9] mopidy.core.playback
  Triggering track playback ended event
DEBUG    2016-02-12 00:37:30,231 [17090:MainThread] mopidy.listener
  Sending playback_state_changed to CoreListener: {'old_state': u'playing', 'new_state': u'stopped'}
DEBUG    2016-02-12 00:37:30,233 [17090:MainThread] mopidy.listener
  Sending track_playback_ended to CoreListener: {'time_position': 0, 'tl_track': TlTrack(tlid=11, track=Track(album=Album(artists=[Artist(name=u'Hero Fisher', uri='tidal:artist:4597561')], images=[u'http://images.osl.wimpmusic.com/im/im?w=512&h=512&albumid=47623802'], name=u'Delivery', uri='tidal:album:47623802'), artists=[Artist(name=u'Hero Fisher', uri='tidal:artist:4597561')], disc_no=1, length=236000, name=u'Brutish Words', track_no=1, uri='tidal:track:4597561:47623802:47623803'))}
DEBUG    2016-02-12 00:37:30,235 [17090:MainThread] mopidy.listener
  Sending volume_changed to CoreListener: {'volume': 100}

Any ideas on what is going wrong?

I'm running the following extensions:

00:39 $ mopidy -v
INFO     2016-02-12 00:39:25,851 [17286:MainThread] mopidy.__main__
  Starting Mopidy 1.1.2
DEBUG    2016-02-12 00:39:25,862 [17286:MainThread] mopidy.ext
  Loading entry point: primare = mopidy_primare:Extension
DEBUG    2016-02-12 00:39:25,864 [17286:MainThread] mopidy.ext
  Loaded extension: Mopidy-Primare 0.1.0
DEBUG    2016-02-12 00:39:25,866 [17286:MainThread] mopidy.ext
  Loading entry point: local-sqlite = mopidy_local_sqlite:Extension
DEBUG    2016-02-12 00:39:25,868 [17286:MainThread] mopidy.ext
  Loaded extension: Mopidy-Local-SQLite 1.0.0
DEBUG    2016-02-12 00:39:25,870 [17286:MainThread] mopidy.ext
  Loading entry point: spotify = mopidy_spotify:Extension
DEBUG    2016-02-12 00:39:25,872 [17286:MainThread] mopidy.ext
  Loaded extension: Mopidy-Spotify 2.3.0
DEBUG    2016-02-12 00:39:25,872 [17286:MainThread] mopidy.ext
  Loading entry point: spotify_tunigo = mopidy_spotify_tunigo:Extension
DEBUG    2016-02-12 00:39:25,874 [17286:MainThread] mopidy.ext
  Loaded extension: Mopidy-Spotify-Tunigo 0.2.1
DEBUG    2016-02-12 00:39:25,882 [17286:MainThread] mopidy.ext
  Loading entry point: dirble = mopidy_dirble:Extension
DEBUG    2016-02-12 00:39:25,883 [17286:MainThread] mopidy.ext
  Loaded extension: Mopidy-Dirble 1.3.0
DEBUG    2016-02-12 00:39:25,887 [17286:MainThread] mopidy.ext
  Loading entry point: mpd = mopidy.mpd:Extension
DEBUG    2016-02-12 00:39:25,887 [17286:MainThread] mopidy.ext
  Loaded extension: Mopidy-MPD 1.1.2
DEBUG    2016-02-12 00:39:25,887 [17286:MainThread] mopidy.ext
  Loading entry point: http = mopidy.http:Extension
DEBUG    2016-02-12 00:39:25,888 [17286:MainThread] mopidy.ext
  Loaded extension: Mopidy-HTTP 1.1.2
DEBUG    2016-02-12 00:39:25,888 [17286:MainThread] mopidy.ext
  Loading entry point: stream = mopidy.stream:Extension
DEBUG    2016-02-12 00:39:25,889 [17286:MainThread] mopidy.ext
  Loaded extension: Mopidy-Stream 1.1.2
DEBUG    2016-02-12 00:39:25,889 [17286:MainThread] mopidy.ext
  Loading entry point: m3u = mopidy.m3u:Extension
DEBUG    2016-02-12 00:39:25,889 [17286:MainThread] mopidy.ext
  Loaded extension: Mopidy-M3U 1.1.2
DEBUG    2016-02-12 00:39:25,889 [17286:MainThread] mopidy.ext
  Loading entry point: softwaremixer = mopidy.softwaremixer:Extension
DEBUG    2016-02-12 00:39:25,890 [17286:MainThread] mopidy.ext
  Loaded extension: Mopidy-SoftwareMixer 1.1.2
DEBUG    2016-02-12 00:39:25,890 [17286:MainThread] mopidy.ext
  Loading entry point: file = mopidy.file:Extension
DEBUG    2016-02-12 00:39:25,890 [17286:MainThread] mopidy.ext
  Loaded extension: Mopidy-File 1.1.2
DEBUG    2016-02-12 00:39:25,890 [17286:MainThread] mopidy.ext
  Loading entry point: local = mopidy.local:Extension
DEBUG    2016-02-12 00:39:25,894 [17286:MainThread] mopidy.ext
  Loaded extension: Mopidy-Local 1.1.2
DEBUG    2016-02-12 00:39:25,901 [17286:MainThread] mopidy.ext
  Loading entry point: tidal = mopidy_tidal:Extension
DEBUG    2016-02-12 00:39:25,902 [17286:MainThread] mopidy.ext
  Loaded extension: Mopidy-Tidal 0.1.0
DEBUG    2016-02-12 00:39:25,906 [17286:MainThread] mopidy.ext
  Loading entry point: mopify = mopidy_mopify:MopifyExtension
DEBUG    2016-02-12 00:39:26,002 [17286:MainThread] mopidy.ext
  Loaded extension: Mopidy-Mopify 1.5.14
DEBUG    2016-02-12 00:39:26,004 [17286:MainThread] mopidy.ext
  Discovered extensions: primare, local-sqlite, spotify, spotify_tunigo, dirble, mpd, http, stream, m3u, softwaremixer, file, local, tidal, mopify
mones88 commented 8 years ago

Are you sure you put quality = LOSSLESS in the config file? Looking at the converted URL (rtmp.stream.tidalhifi.com/cfx/st/mp4) suggests me it is trying to convert the tidal:track uri into a lossy stream, and for some reason it isn't working at the moment. I think TIDAL has changed something server side, I will look at it asap.

ZenithDK commented 8 years ago

No, I saw that the code had options for lossless, high, and low, and since I don't have tidal HiFi I chose high. Is that incorrect?

On Fri, Feb 12, 2016, 09:34 mones88 notifications@github.com wrote:

Are you sure you put quality = LOSSLESS in the config file? Looking at the converted URL (rtmp.stream.tidalhifi.com/cfx/st/mp4) suggests me it is trying to convert the tidal:track uri into a lossy stream, and for some reason it isn't working at the moment. I think TIDAL has changed something server side, I will look at it asap.

— Reply to this email directly or view it on GitHub https://github.com/mones88/mopidy-tidal/issues/1#issuecomment-183227283.

mones88 commented 8 years ago

The setting is correct per se, the problem sits in tidalapi that generates a bad uri for non-lossless streams. I will look at it in the weekend and I'll let you know.

ZenithDK commented 8 years ago

So I can't use this for now until I upgrade to HiFi?

On Fri, Feb 12, 2016, 10:33 Simone notifications@github.com wrote:

The setting is correct per se, the problem sits in tidalapi that generates a bad uri for non-lossless streams. I will look at it in the weekend and I'll let you know.

— Reply to this email directly or view it on GitHub https://github.com/mones88/mopidy-tidal/issues/1#issuecomment-183251397.

mones88 commented 8 years ago

Yep. But it shouldn't take long to fix it though, hold on for few days ;)

ZenithDK commented 8 years ago

Sounds great. Really happy you made this extension, I've been pondering giving it a try for a long time myself but never gotten around to it.

On Fri, Feb 12, 2016, 10:40 Simone notifications@github.com wrote:

Yep. But it shouldn't take long to fix it though, hold on for few days ;)

— Reply to this email directly or view it on GitHub https://github.com/mones88/mopidy-tidal/issues/1#issuecomment-183253252.

mones88 commented 8 years ago

It should work now with 0.2.0 version!! I've tested it right now with mopidy 2.0 and it seems to work fine. Let me know :)

ZenithDK commented 8 years ago

This now works, great work - thanks!