Giter Site home page Giter Site logo

mopidy-tidal's People

Contributors

2e0byo avatar blacklight avatar dependabot[bot] avatar glog78 avatar greggilbert avatar mones88 avatar mrsurly avatar servcubed avatar stevedenman avatar tbjep avatar tehkillerbee avatar vaosilva 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mopidy-tidal's Issues

"My Playlists" not working

I have version 0.2.0 installed from Pip, but browsing my playlists does not work, I just get this:

DEBUG    2016-03-04 00:57:37,407 [6602:HttpServer] mopidy.http.handlers
  Received WebSocket message from 10.0.0.102: u'{"method":"core.library.browse","params":{"uri":"tidal:my_playlists"},"jsonrpc":"2.0","id":193}'
INFO     2016-03-04 00:57:37,409 [6602:TidalBackend-8] mopidy_tidal.library
  Browsing uri tidal:my_playlists


As in, nothing seems to happen.

mopidy tidal "oauth" JSON file cannot be written due to permissions issue.

HI !
i installed mopidy-tidal on debian10 according to the specs.
I specify that I am using the root user for all operations
activating "systemctl restart mopidy" in effect appears on "journalctl -u mopidy | tail -5" the invitation link for authentication, and inserting user and psw mopidy would seem to be connected successfully, instead it is not so and the file "tidal- oauth.json "is not created.
Can you give me some suggestions? Thank you
tidal_error

tidal_error2

Use Extension to get data_dir

Use Extension to get correct data_dir, as mentioned in #45

from mopidy_tidal import Extension

oauth_file = Extension.get_data_dir(self.config) / "tidal-oauth.json"

Track is Not Playable, Tidal Login OK

Maybe there's problem with Tidal API or token...

pi@raspberrypi:~ $ sudo journalctl -u mopidy
May 20 11:32:46 raspberrypi systemd[1]: Starting Mopidy music server...
May 20 11:32:46 raspberrypi systemd[1]: Started Mopidy music server.
May 20 11:32:52 raspberrypi mopidy[3163]: INFO     2020-05-20 11:32:52,108 [3163:MainThread] mopidy.__main__
May 20 11:32:52 raspberrypi mopidy[3163]:   Starting Mopidy 3.0.2
May 20 11:32:52 raspberrypi mopidy[3163]: INFO     2020-05-20 11:32:52,622 [3163:MainThread] mopidy.config
May 20 11:32:52 raspberrypi mopidy[3163]:   Loading config from builtin defaults
May 20 11:32:52 raspberrypi mopidy[3163]: INFO     2020-05-20 11:32:52,767 [3163:MainThread] mopidy.config
May 20 11:32:52 raspberrypi mopidy[3163]:   Loading config from file:///etc/mopidy/mopidy.conf
May 20 11:32:52 raspberrypi mopidy[3163]: INFO     2020-05-20 11:32:52,823 [3163:MainThread] mopidy.config
May 20 11:32:52 raspberrypi mopidy[3163]:   Loading config from command line options
May 20 11:32:59 raspberrypi mopidy[3163]: INFO     2020-05-20 11:32:59,292 [3163:MainThread] mopidy.__main__
May 20 11:32:59 raspberrypi mopidy[3163]:   Enabled extensions: musicbox_webclient, youtube, stream, softwaremixer, mpd, iris, tidal, alsamixer, http, file, m3u
May 20 11:32:59 raspberrypi mopidy[3163]: INFO     2020-05-20 11:32:59,299 [3163:MainThread] mopidy.__main__
May 20 11:32:59 raspberrypi mopidy[3163]:   Disabled extensions: none
May 20 11:33:08 raspberrypi mopidy[3163]: INFO     2020-05-20 11:33:08,373 [3163:MainThread] mopidy.commands
May 20 11:33:08 raspberrypi mopidy[3163]:   Starting Mopidy mixer: SoftwareMixer
May 20 11:33:08 raspberrypi mopidy[3163]: INFO     2020-05-20 11:33:08,403 [3163:MainThread] mopidy.commands
May 20 11:33:08 raspberrypi mopidy[3163]:   Starting Mopidy audio
May 20 11:33:08 raspberrypi mopidy[3163]: INFO     2020-05-20 11:33:08,442 [3163:MainThread] mopidy.commands
May 20 11:33:08 raspberrypi mopidy[3163]:   Starting Mopidy backends: FileBackend, M3UBackend, StreamBackend, YouTubeBackend, TidalBackend
May 20 11:33:08 raspberrypi mopidy[3163]: INFO     2020-05-20 11:33:08,698 [3163:Audio-2] mopidy.audio.actor
May 20 11:33:08 raspberrypi mopidy[3163]:   Audio output set to "alsasink"
May 20 11:33:08 raspberrypi mopidy[3163]: INFO     2020-05-20 11:33:08,887 [3163:YouTubeBackend-6] mopidy_youtube
May 20 11:33:08 raspberrypi mopidy[3163]:   using bs4API
May 20 11:33:08 raspberrypi mopidy[3163]: INFO     2020-05-20 11:33:08,962 [3163:TidalBackend-7] mopidy_tidal.backend
May 20 11:33:08 raspberrypi mopidy[3163]:   Connecting to TIDAL.. Quality = LOSSLESS
May 20 11:33:10 raspberrypi mopidy[3163]: INFO     2020-05-20 11:33:10,760 [3163:TidalBackend-7] mopidy_tidal.backend
May 20 11:33:10 raspberrypi mopidy[3163]:   TIDAL Login OK
May 20 11:33:10 raspberrypi mopidy[3163]: INFO     2020-05-20 11:33:10,771 [3163:MainThread] mopidy.commands
May 20 11:33:10 raspberrypi mopidy[3163]:   Starting Mopidy core
May 20 11:33:10 raspberrypi mopidy[3163]: INFO     2020-05-20 11:33:10,952 [3163:MainThread] mopidy.commands
May 20 11:33:10 raspberrypi mopidy[3163]:   Starting Mopidy frontends: HttpFrontend, YouTubeAutoplayer, MpdFrontend, IrisFrontend
May 20 11:33:10 raspberrypi mopidy[3163]: INFO     2020-05-20 11:33:10,967 [3163:HttpFrontend-10] mopidy.http.actor
May 20 11:33:10 raspberrypi mopidy[3163]:   HTTP server running at [::ffff:0.0.0.0]:6680
May 20 11:33:11 raspberrypi mopidy[3163]: INFO     2020-05-20 11:33:11,002 [3163:MainThread] mopidy_mpd.actor
May 20 11:33:11 raspberrypi mopidy[3163]:   MPD server running at [::ffff:0.0.0.0]:6600
May 20 11:33:11 raspberrypi mopidy[3163]: INFO     2020-05-20 11:33:11,092 [3163:IrisFrontend-13] mopidy_iris.core
May 20 11:33:11 raspberrypi mopidy[3163]:   Starting Iris 3.48.0
May 20 11:33:11 raspberrypi mopidy[3163]: INFO     2020-05-20 11:33:11,099 [3163:MainThread] mopidy.commands
May 20 11:33:11 raspberrypi mopidy[3163]:   Starting GLib mainloop
May 20 11:33:11 raspberrypi mopidy[3163]: INFO     2020-05-20 11:33:11,126 [3163:HttpServer] mopidy.internal.path
May 20 11:33:11 raspberrypi mopidy[3163]:   Creating dir file:///var/lib/mopidy/.local/share/mopidy/http
May 20 11:38:30 raspberrypi mopidy[3163]: INFO     2020-05-20 11:38:30,775 [3163:TidalBackend-7] mopidy_tidal.search
May 20 11:38:30 raspberrypi mopidy[3163]:   Searching Tidal for:  {'any': ['didi kempot keroncong']}
May 20 11:38:33 raspberrypi mopidy[3163]: INFO     2020-05-20 11:38:33,102 [3163:TidalBackend-7] mopidy_tidal.search
May 20 11:38:33 raspberrypi mopidy[3163]:   Searching Tidal for:  {'album': ['didi kempot keroncong']}
May 20 11:38:39 raspberrypi mopidy[3163]: INFO     2020-05-20 11:38:39,429 [3163:TidalBackend-7] mopidy_tidal.search
May 20 11:38:39 raspberrypi mopidy[3163]:   Searching Tidal for:  {'artist': ['didi kempot keroncong']}
May 20 11:38:41 raspberrypi mopidy[3163]: INFO     2020-05-20 11:38:41,335 [3163:YouTubeBackend-6] mopidy_youtube
May 20 11:38:41 raspberrypi mopidy[3163]:   youtube LibraryProvider.search "{'any': ['didi kempot keroncong']}"
May 20 11:38:41 raspberrypi mopidy[3163]: INFO     2020-05-20 11:38:41,342 [3163:YouTubeBackend-6] mopidy_youtube
May 20 11:38:41 raspberrypi mopidy[3163]:   Searching YouTube for query "didi kempot keroncong"
May 20 11:38:41 raspberrypi mopidy[3163]: INFO     2020-05-20 11:38:41,344 [3163:YouTubeBackend-6] mopidy_youtube
May 20 11:38:41 raspberrypi mopidy[3163]:   session.get triggered: search
May 20 11:38:46 raspberrypi mopidy[3163]: INFO     2020-05-20 11:38:46,608 [3163:YouTubeBackend-6] mopidy_youtube
May 20 11:38:46 raspberrypi mopidy[3163]:   youtube LibraryProvider.search "{'album': ['didi kempot keroncong']}"
May 20 11:38:46 raspberrypi mopidy[3163]: INFO     2020-05-20 11:38:46,642 [3163:YouTubeBackend-6] mopidy_youtube
May 20 11:38:46 raspberrypi mopidy[3163]:   youtube LibraryProvider.search "{'artist': ['didi kempot keroncong']}"
May 20 11:39:06 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:06,333 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:06 raspberrypi mopidy[3163]:   Lookup uris 'tidal:album:85081120'
May 20 11:39:08 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:08,064 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:08 raspberrypi mopidy[3163]:   Returning 12 tracks
May 20 11:39:08 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:08,314 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:08 raspberrypi mopidy[3163]:   Lookup uris 'tidal:track:4889383:85081120:85081121'
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,747 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Returning 1 tracks
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,757 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Lookup uris 'tidal:track:4889383:85081120:85081122'
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,768 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Returning 1 tracks
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,773 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Lookup uris 'tidal:track:4889383:85081120:85081123'
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,782 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Returning 1 tracks
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,787 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Lookup uris 'tidal:track:4889383:85081120:85081124'
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,796 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Returning 1 tracks
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,800 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Lookup uris 'tidal:track:4889383:85081120:85081125'
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,810 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Returning 1 tracks
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,815 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Lookup uris 'tidal:track:4889383:85081120:85081126'
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,824 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Returning 1 tracks
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,829 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Lookup uris 'tidal:track:4889383:85081120:85081127'
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,838 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Returning 1 tracks
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,842 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Lookup uris 'tidal:track:4889383:85081120:85081128'
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,851 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Returning 1 tracks
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,856 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Lookup uris 'tidal:track:4889383:85081120:85081129'
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,866 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Returning 1 tracks
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,870 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Lookup uris 'tidal:track:4889383:85081120:85081130'
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,879 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Returning 1 tracks
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,884 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Lookup uris 'tidal:track:4889383:85081120:85081131'
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,893 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Returning 1 tracks
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,898 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Lookup uris 'tidal:track:4889383:85081120:85081132'
May 20 11:39:09 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:09,907 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:09 raspberrypi mopidy[3163]:   Returning 1 tracks
May 20 11:39:17 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:17,127 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:17 raspberrypi mopidy[3163]:   Lookup uris 'tidal:track:4889383:85081120:85081126'
May 20 11:39:17 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:17,140 [3163:TidalBackend-7] mopidy_tidal.library
May 20 11:39:17 raspberrypi mopidy[3163]:   Returning 1 tracks
May 20 11:39:17 raspberrypi mopidy[3163]: INFO     2020-05-20 11:39:17,290 [3163:TidalBackend-7] mopidy_tidal.playback
May 20 11:39:17 raspberrypi mopidy[3163]:   TIDAL uri: tidal:track:4889383:85081120:85081126
May 20 11:39:18 raspberrypi mopidy[3163]: ERROR    2020-05-20 11:39:18,666 [3163:Core-8] mopidy.core.playback
May 20 11:39:18 raspberrypi mopidy[3163]:   TidalBackend backend caused an exception.
May 20 11:39:18 raspberrypi mopidy[3163]: Traceback (most recent call last):
May 20 11:39:18 raspberrypi mopidy[3163]:   File "/usr/local/lib/python3.7/dist-packages/mopidy/core/playback.py", line 349, in _change
May 20 11:39:18 raspberrypi mopidy[3163]:     if not backend.playback.change_track(pending_tl_track.track).get():
May 20 11:39:18 raspberrypi mopidy[3163]:   File "/usr/local/lib/python3.7/dist-packages/pykka/_threading.py", line 45, in get
May 20 11:39:18 raspberrypi mopidy[3163]:     _compat.reraise(*self._data['exc_info'])
May 20 11:39:18 raspberrypi mopidy[3163]:   File "/usr/local/lib/python3.7/dist-packages/pykka/_compat/__init__.py", line 29, in reraise
May 20 11:39:18 raspberrypi mopidy[3163]:     raise value
May 20 11:39:18 raspberrypi mopidy[3163]:   File "/usr/local/lib/python3.7/dist-packages/pykka/_actor.py", line 193, in _actor_loop
May 20 11:39:18 raspberrypi mopidy[3163]:     response = self._handle_receive(envelope.message)
May 20 11:39:18 raspberrypi mopidy[3163]:   File "/usr/local/lib/python3.7/dist-packages/pykka/_actor.py", line 299, in _handle_receive
May 20 11:39:18 raspberrypi mopidy[3163]:     return callee(*message.args, **message.kwargs)
May 20 11:39:18 raspberrypi mopidy[3163]:   File "/usr/local/lib/python3.7/dist-packages/mopidy/backend.py", line 248, in change_track
May 20 11:39:18 raspberrypi mopidy[3163]:     uri = self.translate_uri(track.uri)
May 20 11:39:18 raspberrypi mopidy[3163]:   File "/usr/local/lib/python3.7/dist-packages/mopidy_tidal/playback.py", line 16, in translate_uri
May 20 11:39:18 raspberrypi mopidy[3163]:     newurl = self.backend._session.get_media_url(track_id)
May 20 11:39:18 raspberrypi mopidy[3163]:   File "/usr/local/lib/python3.7/dist-packages/tidalapi/__init__.py", line 243, in get_media_url
May 20 11:39:18 raspberrypi mopidy[3163]:     r = self.request('GET', 'tracks/%s/streamUrl' % track_id, params)
May 20 11:39:18 raspberrypi mopidy[3163]:   File "/usr/local/lib/python3.7/dist-packages/tidalapi/__init__.py", line 112, in request
May 20 11:39:18 raspberrypi mopidy[3163]:     request.raise_for_status()
May 20 11:39:18 raspberrypi mopidy[3163]:   File "/usr/lib/python3/dist-packages/requests/models.py", line 940, in raise_for_status
May 20 11:39:18 raspberrypi mopidy[3163]:     raise HTTPError(http_error_msg, response=self)
May 20 11:39:18 raspberrypi mopidy[3163]: requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.tidalhifi.com/v1/tracks/85081126/streamUrl?sessionId=45057001-46ab-411e-85d
May 20 11:39:18 raspberrypi mopidy[3163]: WARNING  2020-05-20 11:39:18,705 [3163:Core-8] mopidy.core.tracklist
May 20 11:39:18 raspberrypi mopidy[3163]:   Track is not playable: tidal:track:4889383:85081120:85081126

Error messages with Mopidy 2.1.0 / Mopidy-Tidal: 0.2.2 / tidalapi4mopidy 0.1.3

I installed mopidy using apt-get and mopidy-tidal using pip.

Search and play functionality works with Tidal, but I get the following errors on startup, and at regular intervals.

The output of mopidy:

INFO Starting Mopidy 2.1.0
INFO Loading config from builtin defaults
INFO Loading config from /var/lib/mopidy/.config/mopidy/mopidy.conf
INFO Loading config from command line options
INFO Creating dir /var/lib/mopidy/.cache/mopidy
INFO Creating dir /var/lib/mopidy/.local/share/mopidy
INFO Enabled extensions: iris, http, stream, local-sqlite, softwaremixer, local-images, tidal, local
INFO Disabled extensions: spotify, mpd, m3u, file
INFO Starting Mopidy mixer: SoftwareMixer
INFO Starting Mopidy audio
INFO Starting Mopidy backends: StreamBackend, LocalBackend, TidalBackend
INFO Creating dir /var/lib/mopidy/.local/share/mopidy/local-sqlite
INFO Creating SQLite database schema v6
INFO Audio output set to "autoaudiosink"
INFO Loaded 0 local tracks using sqlite
INFO Connecting to TIDAL.. Quality = LOSSLESS
INFO TIDAL Login OK
INFO Starting Mopidy core
ERROR TidalBackend backend caused an exception.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/mopidy/core/playlists.py", line 18, in _backend_error_handling
yield
File "/usr/lib/python2.7/dist-packages/mopidy/core/playlists.py", line 66, in as_list
playlists = future.get()
File "/usr/lib/python2.7/dist-packages/pykka/threading.py", line 52, in get
compat.reraise(*self._data['exc_info'])
File "/usr/lib/python2.7/dist-packages/pykka/compat.py", line 12, in reraise
exec('raise tp, value, tb')
File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 201, in _actor_loop
response = self._handle_receive(message)
File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 295, in _handle_receive
return callee(*message['args'], **message['kwargs'])
File "/usr/lib/python2.7/dist-packages/mopidy_tidal/playlists.py", line 22, in as_list
self.refresh()
File "/usr/lib/python2.7/dist-packages/mopidy_tidal/playlists.py", line 62, in refresh
pl_tracks = session.get_playlist_tracks(pl.id)
File "/usr/lib/python2.7/dist-packages/tidalapi4mopidy/init.py", line 119, in get_playlist_tracks
return self._map_request('playlists/%s/tracks' % playlist_id, ret='tracks')
File "/usr/lib/python2.7/dist-packages/tidalapi4mopidy/init.py", line 198, in _map_request
return list(map(parse, items))
File "/usr/lib/python2.7/dist-packages/tidalapi4mopidy/init.py", line 265, in _parse_track
album = _parse_album(json_obj['album'], artist)
File "/usr/lib/python2.7/dist-packages/tidalapi4mopidy/init.py", line 235, in _parse_album
kwargs['release_date'] = datetime.datetime(*map(int, json_obj['releaseDate'].split('-')))
AttributeError: 'NoneType' object has no attribute 'split'
INFO Starting Mopidy frontends: HttpFrontend, IrisFrontend
INFO HTTP server running at [::ffff:0.0.0.0]:6680
INFO Starting GLib mainloop
INFO Starting Iris 3.14.2
INFO Creating dir /var/lib/mopidy/.local/share/mopidy/local-images
ERROR TidalBackend backend caused an exception.
(The error repeats)

The output of mopidy deps:

Executable: /usr/bin/mopidy
Platform: Linux-4.15.6-300.fc27.x86_64-x86_64-with-debian-9.3
Python: CPython 2.7.13 from /usr/lib/python2.7
Mopidy: 2.1.0 from /usr/lib/python2.7/dist-packages
Mopidy-Iris: 3.14.2 from /usr/lib/python2.7/dist-packages
pylast>=1.6.0: 2.1.0 from /usr/lib/python2.7/dist-packages
six: 1.11.0 from /usr/lib/python2.7/dist-packages
requests>=2.0.0: 2.18.4 from /usr/lib/python2.7/dist-packages
urllib3<1.23,>=1.21.1: 1.22 from /usr/lib/python2.7/dist-packages
idna<2.7,>=2.5: 2.6 from /usr/lib/python2.7/dist-packages
chardet<3.1.0,>=3.0.2: 3.0.4 from /usr/lib/python2.7/dist-packages
certifi>=2017.4.17: 2018.1.18 from /usr/lib/python2.7/dist-packages
Mopidy>=2.0: 2.1.0 from /usr/lib/python2.7/dist-packages
setuptools>=3.3: 38.5.2 from /usr/lib/python2.7/dist-packages
Mopidy-Local-Images>=1.0: 1.0.0 from /usr/lib/python2.7/dist-packages
Mopidy>=1.1: 2.1.0 from /usr/lib/python2.7/dist-packages
setuptools: 38.5.2 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
uritools>=1.0: 2.1.0 from /usr/lib/python2.7/dist-packages
ipaddress; python_version == "2.7": 1.0.19 from /usr/lib/python2.7/dist-packages
ConfigObj>=5.0.6: 5.0.6 from /usr/lib/python2.7/dist-packages
six: 1.11.0 from /usr/lib/python2.7/dist-packages
raven>=6.1.0: 6.6.0 from /usr/lib/python2.7/dist-packages
contextlib2; python_version < "3.2": 0.5.5 from /usr/lib/python2.7/dist-packages
Mopidy-Local-Images: 1.0.0 from /usr/lib/python2.7/dist-packages
Mopidy>=1.1: 2.1.0 from /usr/lib/python2.7/dist-packages
setuptools: 38.5.2 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
uritools>=1.0: 2.1.0 from /usr/lib/python2.7/dist-packages
ipaddress; python_version == "2.7": 1.0.19 from /usr/lib/python2.7/dist-packages
Mopidy-Tidal: 0.2.2 from /usr/lib/python2.7/dist-packages
Mopidy>=1.0: 2.1.0 from /usr/lib/python2.7/dist-packages
setuptools: 38.5.2 from /usr/lib/python2.7/dist-packages
requests>=2.0.0: 2.18.4 from /usr/lib/python2.7/dist-packages
urllib3<1.23,>=1.21.1: 1.22 from /usr/lib/python2.7/dist-packages
idna<2.7,>=2.5: 2.6 from /usr/lib/python2.7/dist-packages
chardet<3.1.0,>=3.0.2: 3.0.4 from /usr/lib/python2.7/dist-packages
certifi>=2017.4.17: 2018.1.18 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
tidalapi4mopidy>=0.1.2: 0.1.3 from /usr/lib/python2.7/dist-packages
requests: 2.18.4 from /usr/lib/python2.7/dist-packages
urllib3<1.23,>=1.21.1: 1.22 from /usr/lib/python2.7/dist-packages
idna<2.7,>=2.5: 2.6 from /usr/lib/python2.7/dist-packages
chardet<3.1.0,>=3.0.2: 3.0.4 from /usr/lib/python2.7/dist-packages
certifi>=2017.4.17: 2018.1.18 from /usr/lib/python2.7/dist-packages
pytest: 3.4.2 from /usr/lib/python2.7/dist-packages
attrs>=17.2.0: 17.4.0 from /usr/lib/python2.7/dist-packages
pluggy<0.7,>=0.5: 0.6.0 from /usr/lib/python2.7/dist-packages
funcsigs; python_version < "3.0": 1.0.2 from /usr/lib/python2.7/dist-packages
six>=1.10.0: 1.11.0 from /usr/lib/python2.7/dist-packages
setuptools: 38.5.2 from /usr/lib/python2.7/dist-packages
py>=1.5.0: 1.5.2 from /usr/lib/python2.7/dist-packages
Mopidy-Local-SQLite: 1.0.0 from /usr/lib/python2.7/dist-packages
Mopidy>=1.1: 2.1.0 from /usr/lib/python2.7/dist-packages
setuptools: 38.5.2 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
uritools>=1.0: 2.1.0 from /usr/lib/python2.7/dist-packages
ipaddress; python_version == "2.7": 1.0.19 from /usr/lib/python2.7/dist-packages
Mopidy-Spotify: 3.1.0 from /usr/lib/python2.7/dist-packages
Mopidy>=2.0: 2.1.0 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
pyspotify>=2.0.5: 2.0.5 from /usr/lib/python2.7/dist-packages
cffi>=1.0.0: 1.9.1 from /usr/lib/python2.7/dist-packages
requests>=2.0: 2.18.4 from /usr/lib/python2.7/dist-packages
urllib3<1.23,>=1.21.1: 1.22 from /usr/lib/python2.7/dist-packages
idna<2.7,>=2.5: 2.6 from /usr/lib/python2.7/dist-packages
chardet<3.1.0,>=3.0.2: 3.0.4 from /usr/lib/python2.7/dist-packages
certifi>=2017.4.17: 2018.1.18 from /usr/lib/python2.7/dist-packages
GStreamer: 1.10.4.0 from /usr/lib/python2.7/dist-packages/gi
Detailed information:
Python wrapper: python-gi 3.22.0
Relevant elements:
Found:
uridecodebin
souphttpsrc
appsrc
alsasink
osssink
oss4sink
pulsesink
id3demux
id3v2mux
lamemp3enc
mad
mpegaudioparse
mpg123audiodec
vorbisdec
vorbisenc
vorbisparse
oggdemux
oggmux
oggparse
flacdec
flacparse
shout2send
Not found:
flump3dec

Please advise!

401 Unauthorized attempting to play track

I'm getting this exception on every track I try to play regardless of whether it's from a search or a playlist:

HTTPError: 401 Client Error: Unauthorized for url: https://api.tidalhifi.com/v1/tracks//streamUrl?soundQuality=LOSSLESS&limit=999&countryCode=US

I see this in the log however when starting mopidy:

May 19 07:57:48 drakej-ws mopidy[8870]: INFO Connecting to TIDAL.. Quality = LOSSLESS
May 19 07:57:48 drakej-ws mopidy[8870]: INFO Audio output set to "autoaudiosink"
May 19 07:57:48 drakej-ws mopidy[8870]: INFO No local library metadata cache found at /var/lib/mopidy/local/library.json.gz. Please run mopidy local scan to index your local music library. If you do not have a local music collection
May 19 07:57:48 drakej-ws mopidy[8870]: INFO Loaded 0 local tracks using json
May 19 07:57:49 drakej-ws mopidy[8870]: INFO TIDAL Login OK

Setup issue: what should i do?

Hi
im setting up mopidy tidal but im stuck

'''
OAuth Flow
Using the new OAuth flow, you have to visit a link to connect the mopidy app to your login.

When you restart the Mopidy server, check the latest systemd logs and find a line like:

journalctl -u mopidy | tail -5
...
Visit link.tidal.com/AAAAA to log in, the code will expire in 300 seconds``
Go to that link in your browser, approve it, and that should be it.

Note that the login process is a blocking action, so Mopidy will not load until you approve the application. The OAuth session will be reloaded automatically when Mopidy is restarted. It will be necessary to perform these steps again if/when the session expires or if the json file is moved.

'''

I got up to the step above but I'm having trouble
I did:

journalctl -u mopidy | tail -5

but I only got this back:

May 22 16:47:00 ###### mopidy[1768]: ERROR    [PodcastBackend-4 (_actor_loop)] mopidy_podcast.library Cannot retrieve Podcast root directory
May 22 16:47:00 ######mopidy[1768]: INFO     [MainThread] mopidy.commands Starting Mopidy frontends: QueueManagerFrontend, MpdFrontend, HttpFrontend
May 22 16:47:00 ###### mopidy[1768]: INFO     [MainThread] mopidy_mpd.actor MPD server running at [::]:6600
May 22 16:47:00 ###### mopidy[1768]: INFO     [HttpFrontend-12 (_actor_loop)] mopidy.http.actor HTTP server running at [::ffff:0.0.0.0]:6680
May 22 16:47:00###### mopidy[1768]: INFO     [MainThread] mopidy.commands Starting GLib mainloop

What should I do?

Extension failed during setup

After installing with python3.7 -m pip install Mopidy-Tidal I cannot seem to get Tidal to start up with the rest of Mopidy. All I observe is a startup error as below:

ERROR    2020-04-28 22:06:05,493 [6:MainThread] mopidy.__main__
  Extension tidal failed during setup. This might have left the registry in a bad state.
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/Mopidy-3.0.1-py3.7.egg/mopidy/__main__.py", line 129, in main
    extension.setup(registry)
  File "/usr/local/lib/python3.7/site-packages/mopidy_tidal/__init__.py", line 33, in setup
    from .backend import TidalBackend
  File "/usr/local/lib/python3.7/site-packages/mopidy_tidal/backend.py", line 11, in <module>
    from mopidy_tidal import library, playback, playlists
  File "/usr/local/lib/python3.7/site-packages/mopidy_tidal/library.py", line 15, in <module>
    from mopidy_tidal.search import tidal_search
  File "/usr/local/lib/python3.7/site-packages/mopidy_tidal/search.py", line 7, in <module>
    from lru_cache import SearchCache
ModuleNotFoundError: No module named 'lru_cache'

Switch to pyopenTIDAL

Due to the state of the python-tidal project, it might be a good idea to switch to the only alternative I can find; pyopenTIDAL. This will require some rewriting of the existing Mopidy-Tidal code and also pyopenTIDAL should be rewritten into pure C to allow packaging it as a PyPi package.

Playlists missing

Playlists are not available.
Neither in browsing Tidal nor in Mopidys Playlists.

Can't switch song

I have installed latest mopidy and latest Mopidy-Tidal and every time i try to switch song, previous song starts all over again. In the end, i am able to play only one song, even local music.

Without this plugin, mopidy works flawlessly. Any clues, what could cause this? Here is my mopidy.conf

#   http://docs.mopidy.com/
#
# The initial commented out values reflect the defaults as of:
#   Mopidy 2.1.0
#   Mopidy-File 2.1.0
#   Mopidy-HTTP 2.1.0
#   Mopidy-Local 2.1.0
#   Mopidy-M3U 2.1.0
#   Mopidy-MPD 2.1.0
#   Mopidy-SoftwareMixer 2.1.0
#   Mopidy-Stream 2.1.0
#
# Available options and defaults might have changed since then,
# run `mopidy config` to see the current effective config and
# `mopidy --version` to check the current version.

[core]
#cache_dir = $XDG_CACHE_DIR/mopidy
#config_dir = $XDG_CONFIG_DIR/mopidy
#data_dir = $XDG_DATA_DIR/mopidy
#max_tracklist_length = 10000
#restore_state = false

[logging]
#color = true
#console_format = %(levelname)-8s %(message)s
#debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n  %(message)s
#debug_file = mopidy.log
#config_file =

[audio]
#mixer = software
#mixer_volume = 
#output = autoaudiosink
#buffer_time = 

[proxy]
#scheme = 
#hostname = 
#port = 
#username = 
#password = 

[mpd]
enabled = true
hostname = 127.0.0.1
port = 6600
password = uberpass
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist = 
  listall
  listallinfo
  update
default_playlist_scheme = m3u

[http]
#enabled = true
#hostname = 127.0.0.1
#port = 6680
#static_dir =
#zeroconf = Mopidy HTTP server on $hostname

[stream]
#enabled = true
#protocols = 
#  http
#  https
#  mms
#  rtmp
#  rtmps
#  rtsp
#metadata_blacklist = 
#timeout = 5000

[m3u]
#enabled = true
#base_dir =
#default_encoding = latin-1
#default_extension = .m3u8
#playlists_dir =

[softwaremixer]
#enabled = true

[file]
enabled = true
media_dirs = 
  $XDG_MUSIC_DIR|Music
  ~/|Home
excluded_file_extensions = 
  .jpg
  .jpeg
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[local]
enabled = true
library = json
media_dir = ~/Music
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
excluded_file_extensions = 
  .directory
  .html
  .jpeg
  .jpg
  .log
  .nfo
  .png
  .txt

[tidal]
enabled = true
username = [email protected]
password = lolpasswordhere
quality = LOSSLESS

Tidal playlist are not loaded in Mopidy unless refreshed manually

I have just installed this plugin and authorized. It is working (in Iris I can Browse my Tidal).

Now, I have a program which lists all Mopidy's playlists (from Mopidy API, with method "core.playlists.as_list") but Tidal's playlists are not there. What should I do?
Thanks

Slow browsing into songs list

This is my environment:
Manjaro 19.02 x64
python 3.8.2
mopidy 3.0.2
mopidy-tidal 0.2.2

I'm using mopidy-musicbox-webclient, but I have the same issue with all mopidy webclients (and other gtk mpd client). When I'm trying to browse into an album or playlist I have to wait a lot of time until I can choose to play one song, this appens only into tidal browsing.

The logs are crystal clear:

INFO 2020-04-21 13:13:43,033 [3462:TidalBackend-6] mopidy_tidal.library
Lookup uris 'tidal:track:6164258:102387249:102387250'
INFO 2020-04-21 13:13:43,761 [3462:TidalBackend-6] mopidy_tidal.library
Returning 1 tracks
INFO 2020-04-21 13:13:43,761 [3462:TidalBackend-6] mopidy_tidal.library
Lookup uris 'tidal:track:8149304:86638235:86638238'
INFO 2020-04-21 13:13:44,353 [3462:TidalBackend-6] mopidy_tidal.library
Returning 1 tracks
INFO 2020-04-21 13:13:44,354 [3462:TidalBackend-6] mopidy_tidal.library
Lookup uris 'tidal:track:4818468:93636554:93636556'
INFO 2020-04-21 13:13:44,921 [3462:TidalBackend-6] mopidy_tidal.library
Returning 1 tracks
INFO 2020-04-21 13:13:44,921 [3462:TidalBackend-6] mopidy_tidal.library
Lookup uris 'tidal:track:9817165:96843255:96843256'
INFO 2020-04-21 13:13:45,530 [3462:TidalBackend-6] mopidy_tidal.library
Returning 1 tracks
INFO 2020-04-21 13:13:45,530 [3462:TidalBackend-6] mopidy_tidal.library
Lookup uris 'tidal:track:5701795:93139653:93139654'
INFO 2020-04-21 13:13:46,112 [3462:TidalBackend-6] mopidy_tidal.library
Returning 1 tracks
INFO 2020-04-21 13:13:46,113 [3462:TidalBackend-6] mopidy_tidal.library
Lookup uris 'tidal:track:16056:101269540:101269541'
INFO 2020-04-21 13:13:46,716 [3462:TidalBackend-6] mopidy_tidal.library
Returning 1 tracks
INFO 2020-04-21 13:13:46,717 [3462:TidalBackend-6] mopidy_tidal.library
Lookup uris 'tidal:track:4579716:97132833:97132834'
INFO 2020-04-21 13:13:47,278 [3462:TidalBackend-6] mopidy_tidal.library
Returning 1 tracks
INFO 2020-04-21 13:13:47,278 [3462:TidalBackend-6] mopidy_tidal.library
Lookup uris 'tidal:track:8049126:82247412:82247413'
INFO 2020-04-21 13:13:47,838 [3462:TidalBackend-6] mopidy_tidal.library
Returning 1 tracks
INFO 2020-04-21 13:13:47,838 [3462:TidalBackend-6] mopidy_tidal.library
Lookup uris 'tidal:track:5023237:78196153:78196154'
INFO 2020-04-21 13:13:48,443 [3462:TidalBackend-6] mopidy_tidal.library
Returning 1 tracks

It takes 0.5-1 seconds for each track, so even if an album contains 10 tracks I have to wait at least 6-10 seconds. Can you implement multithread, async or reviewing code for speed up the browsing feature?

Thank you very much

mopidy-tidal only partially reproduces the Tidal music catalog

HI !
After the changes introduced yesterday, mopidy-tidal cannot fully reproduce the Tidal music catalog.

For example, the well-known song "u2 - the Joshua Tree // With or Without" does not play, this is the error

'# journalctl -u mopidy | tail -5'

Jan 20 08:42:15 test-c mopidy[993]: File "/usr/lib/python3/dist-packages/requests/models.py", line 940, in raise_for_status
Jan 20 08:42:15 test-c mopidy[993]: raise HTTPError(http_error_msg, response=self)
Jan 20 08:42:15 test-c mopidy[993]: requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.tidalhifi.com/v1/tracks/1218917/streamUrl?sessionId=36ac749a-d8d2-4caa-9cdb-c1d42c54d316&countryCode=GB&limit=999&soundQuality=LOSSLESS
Jan 20 08:42:15 test-c mopidy[993]: WARNING [Core-5] mopidy.core.tracklist Track is not playable: tidal:track:17123:1218916:1218917
Jan 20 08:42:15 test-c mopidy[993]: INFO [Core-5] mopidy.core.playback No playable track in the lis

Mopidy-tidal is set up with a "Tidal HIFI Plus" subscription; I also add that it works only partially in "LOSSLESS" mode while it no longer works for any songs in "LOW" mode (before the modification it worked perfectly).

Probably, client_id, client_secret are incorrect.

I trust in solving the problem.
Thank you very much

Better caching to avoid timeouts on large collections

Initializing large collections (or accounts with many playlists) often results in timeouts, even when the collection has already been opened once and the application has simply been restarted.

The current lru_cache implementation only stores cached items in memory, but it'd be good if we could store them to disk (at least the playlist IDs -> names) in order to speed up the initialization time.

MQA, HIFI Playback

Hey Tehkillerbee,
Looking the the master and dev fork seems like you & your team(?) are working on getting access for MQA track into Mopidy? Is there anything you need to help this endeavor along? I have very limited programming skills, but if there is something you need to help you, please let me know. This feature would be really great. Thank you for maintaining this Git
Kyle

Facebook login

Is it possible login using the facebook account?

Thanks

ERROR in initialisation: "Invalid token" (kgsOOmYk3zShYrNP)

Hi,
I powered a mopidy instance up just as always but now mopidy-tidal has an invalid token.

{"status":401,"subStatus":6004,"userMessage":"Invalid token"}
ERROR    2020-05-13 19:00:56,197 [13520:TidalBackend-3] pykka
  Unhandled exception in TidalBackend (urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-5a4b08ae0590):
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 186, in _actor_loop
    self.on_start()
  File "/home/pi/.local/lib/python3.8/site-packages/mopidy_tidal/backend.py", line 35, in on_start
    if self._session.login(self._username, self._password):
  File "/home/pi/.local/lib/python3.8/site-packages/tidalapi/__init__.py", line 86, in login
    request.raise_for_status()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.tidalhifi.com/v1/login/username?token=xxxxxxxxxxxxxxxx
ERROR    2020-05-13 19:00:56,203 [13520:MainThread] mopidy.commands
  Actor died: TidalBackend (urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-5a4b08ae0590) stopped before handling the message

OAuth session expires after some time

I have noticed that the new OAuth login appears to stop working after some time on my setup. It is possible that the session expires after some time and must be renewed (refresh token). This is currently not handled correctly by mopidy-tidal and therefore the following error is seen in the log:

requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: XX

The temporary solution is a restart of the mopidy service and reauthentification by visiting the OAuth link.

If anyone else has noticed this, please feel free to update this issue.

See tamland/python-tidal#65 for more details

Add Bitrate, Bitdepth and Decoder information to playing track

Add track technical metadata (bitrate, bitdepth, decoder) to the track model exposed via the API

See also here : jaedb/Iris#808

Using Mopidy-tidal (0.2.7) as a backend I get this:

{
   "id" : 1,
   "jsonrpc" : "2.0",
   "result" : {
      "__model__" : "Track",
      "album" : {
         "__model__" : "Album",
         "artists" : [
            {
               "__model__" : "Artist",
               "name" : "Amy Winehouse",
               "uri" : "tidal:artist:15796"
            }
         ],
         "name" : "Back To Black",
         "uri" : "tidal:album:2798956"
      },
      "artists" : [
         {
            "__model__" : "Artist",
            "name" : "Amy Winehouse",
            "uri" : "tidal:artist:15796"
         }
      ],
      "disc_no" : 1,
      "length" : 240000,
      "name" : "Back To Black",
      "track_no" : 5,
      "uri" : "tidal:track:15796:2798956:2798961"
   }
}

Which means that bitrate is not exposed by the backend ?

current sample rate

Hello, thanks for the plugin, it works very well.
I'm trying to get sample rate of playing tracks. Neither the json rpc nor logs (in debugging mode) show that info.
I ask because I wanted to know, if that's possible, what's the sample rate of tidal using quality = LOSSLESS.
Thanks in advance.

Improve integration with Mopidy-Iris

After testing Mopidy-Tidal together with Iris, it is clear that there are improvements needed as outlined here,

Essentially, the following tasks must be fixed to give a better user experience:

  • Speed up album art display, eg with additional local caching. This is especially visible when running on a RPi3. Sometimes a refresh is needed before the album arts are displayed. Cold startup results in a very long delay before album arts are displayed, likely since they have to be cached first.11/09/2022: Appears to be fixed
  • Better caching in general, as described in #60
  • Album images, artist images, playlist images are downloaded each time the relevant folder is browsed. 11/09/2022: Appears to be fixed/cannot replicate
  • When requesting images from eg. "My Albums", the album images are requested twice - once for each album and once as a list.
  • Handle deleted playlists/albums/artists, without a full refresh. 11/09/2022: Full refresh is not necessary, only reloading the playlist dir.
  • When browsing using the Iris "Playlists"/"Artists" shortcuts, album art is not shown. When browsing using "Tidal/My Playlists", "Tidal/My Artists", album art is displayed. It looks like the album art is never requested.

11/09/2022: Does not work with latest master)

  • When browsing playlists, the number of tracks is always listed as zero. Playlist must be opened to show the actual number of tracks.

11/09/2022: Does not work with latest master

  • When searching, search result does not have images populated.

11/09/2022: Does not work with latest master

  • Playlist editing

25/09/22 Added in #76, although not fully implemented/tested. See PR comments for details

  • Playlist adding

01/10/20 Added in #76, although not fully implemented. See #87 for details

Feel free to add more comments in case you have discovered other issues.

Browsing works, playback fails

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

Unauthorized for lossless playback

I am unable to play any tracks through Tidal. Last month when I was on the Tidal HiFi Plus subscription I was only able to play master quality tracks (even though my mopidy config was set to LOSSLESS), but this month since my subscription only allows up to lossless, I am unable to hear even those master tracks.

Here is the output from journalctl

Mar 08 11:09:12 alarmpi mopidy[18375]: ERROR    2022-03-08 11:09:12,664 [18375:Core-12 (_actor_loop)] mopidy.core.playback
Mar 08 11:09:12 alarmpi mopidy[18375]:   TidalBackend backend caused an exception.
Mar 08 11:09:12 alarmpi mopidy[18375]: Traceback (most recent call last):
Mar 08 11:09:12 alarmpi mopidy[18375]:   File "/usr/lib/python3.10/site-packages/mopidy/core/playback.py", line 350, in _change
Mar 08 11:09:12 alarmpi mopidy[18375]:     if not backend.playback.change_track(pending_tl_track.track).get():
Mar 08 11:09:12 alarmpi mopidy[18375]:   File "/usr/lib/python3.10/site-packages/pykka/_threading.py", line 55, in get
Mar 08 11:09:12 alarmpi mopidy[18375]:     raise exc_value
Mar 08 11:09:12 alarmpi mopidy[18375]:   File "/usr/lib/python3.10/site-packages/pykka/_actor.py", line 186, in _actor_loop
Mar 08 11:09:12 alarmpi mopidy[18375]:     response = self._handle_receive(envelope.message)
Mar 08 11:09:12 alarmpi mopidy[18375]:   File "/usr/lib/python3.10/site-packages/pykka/_actor.py", line 286, in _handle_receive
Mar 08 11:09:12 alarmpi mopidy[18375]:     return callee(*message.args, **message.kwargs)
Mar 08 11:09:12 alarmpi mopidy[18375]:   File "/usr/lib/python3.10/site-packages/mopidy/backend.py", line 313, in change_track
Mar 08 11:09:12 alarmpi mopidy[18375]:     uri = self.translate_uri(track.uri)
Mar 08 11:09:12 alarmpi mopidy[18375]:   File "/usr/lib/python3.10/site-packages/Mopidy_Tidal-0.2.7-py3.10.egg/mopidy_tidal/playback.py", line 16, in translate_uri
Mar 08 11:09:12 alarmpi mopidy[18375]:     newurl = self.backend._session.get_media_url(track_id)
Mar 08 11:09:12 alarmpi mopidy[18375]:   File "/usr/lib/python3.10/site-packages/tidalapi-0.6.9-py3.10.egg/tidalapi/__init__.py", line 466, in get_media_url
Mar 08 11:09:12 alarmpi mopidy[18375]:     r = self.request('GET', 'tracks/%s/streamUrl' % track_id, params)
Mar 08 11:09:12 alarmpi mopidy[18375]:   File "/usr/lib/python3.10/site-packages/tidalapi-0.6.9-py3.10.egg/tidalapi/__init__.py", line 335, in request
Mar 08 11:09:12 alarmpi mopidy[18375]:     request.raise_for_status()
Mar 08 11:09:12 alarmpi mopidy[18375]:   File "/usr/lib/python3.10/site-packages/requests/models.py", line 943, in raise_for_status
Mar 08 11:09:12 alarmpi mopidy[18375]:     raise HTTPError(http_error_msg, response=self)
Mar 08 11:09:12 alarmpi mopidy[18375]: requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.tidalhifi.com/v1/tracks/134858531/streamUrl?sessionId=76bdd793-4259-4e27-b281-9c48f94bd523&countryCode=AU&limit=999&soundQuality=LOSSLESS

To reiterate, I am on the HiFi subscription, and I have authenticated Tidal.

How to extract cover-art - images from mopidy-tidal ?

Hi !
I would need to know, if it is possible, to extract the cover-art images that mopidy-tidal displays through Mopidy-MusicBox-Webclient in jpg or bmp format, in a dedicated folder, when play songs.
This for a possible use through Obs Studio (visual radio project).
Also to execute the "mpc current" command to detect the title of the song being played exactly when it starts.
very thank you

A maximum of 999 items is loaded in a playlist

When loading a large playlist, a maximum of 999 items is loaded, no matter its size.

I suppose that 999 is a hard upper limit imposed on the API - but if that's the case mopidy-tidal should at least perform multiple requests to properly manage pagination.

Crash with Mopidy 2.0.0.5 and mopidy-tidal

I am using python-tidal with the "fix_lossy" patch, and just updated to latest mopidy version from GitHub.
When I try to browse my artists in Mopidy-Mobile, I get this backtrace:

INFO     2016-02-18 20:30:36,379 [7037:TidalBackend-8] mopidy_tidal.library
  Browsing uri tidal:my_artists
ERROR    2016-02-18 20:30:36,937 [7037:Core-9] mopidy.core.library
  TidalBackend backend caused an exception.
Traceback (most recent call last):
  File "/home/lasse/dev/mopidy/mopidy/core/library.py", line 19, in _backend_error_handling
    yield
  File "/home/lasse/dev/mopidy/mopidy/core/library.py", line 112, in _browse
    result = backend.library.browse(uri).get()
  File "/usr/lib/python2.7/dist-packages/pykka/threading.py", line 52, in get
    compat.reraise(*self._data['exc_info'])
  File "/usr/lib/python2.7/dist-packages/pykka/compat.py", line 12, in reraise
    exec('raise tp, value, tb')
  File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 201, in _actor_loop
    response = self._handle_receive(message)
  File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 295, in _handle_receive
    return callee(*message['args'], **message['kwargs'])
  File "/home/lasse/.virtualenvs/mopidy/local/lib/python2.7/site-packages/mopidy_tidal/library.py", line 60, in browse
    return ref_models_mappers.create_artists(session.user.favorites.artists())
  File "/home/lasse/dev/python-tidal/tidalapi/__init__.py", line 320, in artists
    return self._session._map_request(self._base_url + '/artists', ret='artists')
  File "/home/lasse/dev/python-tidal/tidalapi/__init__.py", line 190, in _map_request
    return list(map(parse, [item['item'] for item in items]))
  File "/home/lasse/dev/python-tidal/tidalapi/__init__.py", line 214, in _parse_artist
    return Artist(id=json_obj['id'], name=json_obj['name'], role=Role(json_obj['type']))
KeyError: u'type'

Forbidden error after playback paused for a few hours

I've found that if I pause playback midtrack and come back to it a few hours later, it'll dump out the buffer and then throw this error:

Feb 15 17:08:57 python[1956447]: ERROR    2021-02-15 17:08:57,740 [1956447:MainThread] mopidy.audio.gst
Feb 15 17:08:57 python[1956447]:   GStreamer error: Forbidden

The only thing that fixes it is going to the next track. It seems like the error is thrown further upstream, that is outside of this module, but I'm wondering if it's possible to catch the error and restart playback or something like that. Any thoughts?

Some releases available on tidal not showing up when searching

I'm using mopidy with ncmpcpp. When I search for some releases I know are available on Tidal, for some reason they do not show up within the ncmpcpp search. For example, the album "Fatale" by "Pedestrian Deposit" (which is available on tidal) does not show up when searching by artist or album name. Instead, only songs from three other albums appear: "Dyer's Hands", "Austere" and "Nostalgia: 2000-06".

Any idea why?

By the way, thanks for the extension, has been really useful for me.

Need help?

Do you need help maintaining this or adding features?

Tracks break after around 4 Minutes of Playback

Since the last tidal api update somehow my tracks don't playout but stop playing after around 4 minutes. I checked if there is some other issue with the podcast plugin, but this works fine. Any idea what that could be ?

Tidal backend caused an exception

During a playlst play I got this error:

`2022-05-23 11:26:39,328 ERROR [1066:Core-17] mopidy.core.playback: TidalBackend backend caused an exception.
Traceback (most recent call last):

File "/usr/lib/python3/dist-packages/mopidy/core/playback.py", line 203, in _on_about_to_finish
if backend.playback.change_track(pending.track).get():
File "/usr/lib/python3/dist-packages/pykka/_threading.py", line 45, in get
_compat.reraise(*self._data['exc_info'])
File "/usr/lib/python3/dist-packages/pykka/_compat/init.py", line 29, in reraise
raise value
File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 193, in _actor_loop
response = self._handle_receive(envelope.message)
File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 299, in _handle_receive
return callee(*message.args, **message.kwargs)
File "/usr/lib/python3/dist-packages/mopidy/backend.py", line 315, in change_track
uri = self.translate_uri(track.uri)
File "/usr/local/lib/python3.7/dist-packages/mopidy_tidal/playback.py", line 16, in translate_uri
newurl = self.backend._session.get_media_url(track_id)
File "/usr/local/lib/python3.7/dist-packages/tidalapi/init.py", line 496, in get_media_url
request = self.request('GET', 'tracks/%s/urlpostpaywall' % track_id, params)
File "/usr/local/lib/python3.7/dist-packages/tidalapi/init.py", line 361, in request
request.raise_for_status()
File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.tidalhifi.com/v1/tracks/174
661866/urlpostpaywall?sessionId=...........&countryCode=IT&limit=999&urlusagemode=STR
EAM&audioquality=LOSSLESS&assetpresentation=FULL`

Session json file not created if started as s systemd service as a non-root user

Hi
Thanks for taking up on this project.
I do not have a exact reproduction, running the latest version of mopidy and mopidy-tidal but it seems that if mopidy is started as a service the json session file is not created. The most likely culprit could be that the HOME environment variable is not set ?.
The problem went away when I started manually the service using the owner (user mopidy).
Can I suggest that in the configuration file there is an optional parameter to set the file where we want to put the session file?.

thanks a lot

Album art requested from tidalapi is always very large

When requesting an image from tidalapi, the image resolution is not specified. This results in a relatively large image returned from the backend.

We can override the resolution in library.py by using album.picture(..) instead of album.image(..)

PIP2

Not exactly an issue, but using pip to install didn't work, I had to use pip2
.

mopidy-tidal with proxy can't play songs

Hi !
I realized that after updating to new versions 2.7 and tidalapi 0.6.10 by entering the proxy credentials in the /etc/mopidy/mopidy.conf, mopidy-tidal connects regularly but cannot play audio.
Without the proxy credentials, everything works fine.
You can check ? many thanks !

Invalid token=kgsOOmYk3zShYrNP

Please note that the mopidy tidal player has recently been unable to authenticate:
Please let me know if the problem can be solved. Many thanks !

May 14 20:12:25 localhost mopidy[14159]: INFO 2020-05-14 20:12:25,149 [14159:MainThread] mopidy.commands
May 14 20:12:25 localhost mopidy[14159]: GLib mainloop got SIGTERM. Exiting...
May 14 20:12:25 localhost mopidy[14159]: INFO 2020-05-14 20:12:25,149 [14159:MainThread] mopidy.commands
May 14 20:12:25 localhost mopidy[14159]: Stopping Mopidy frontends
May 14 20:12:25 localhost mopidy[14159]: INFO 2020-05-14 20:12:25,152 [14159:MainThread] mopidy.commands
May 14 20:12:25 localhost mopidy[14159]: Stopping Mopidy core
May 14 20:12:25 localhost mopidy[14159]: INFO 2020-05-14 20:12:25,154 [14159:MainThread] mopidy.commands
May 14 20:12:25 localhost mopidy[14159]: Stopping Mopidy backends
May 14 20:12:25 localhost mopidy[14159]: INFO 2020-05-14 20:12:25,156 [14159:MainThread] mopidy.commands
May 14 20:12:25 localhost mopidy[14159]: Stopping Mopidy audio
May 14 20:12:25 localhost mopidy[14159]: INFO 2020-05-14 20:12:25,157 [14159:MainThread] mopidy.commands
May 14 20:12:25 localhost mopidy[14159]: Stopping Mopidy mixer
May 14 20:12:25 localhost mopidy[14159]: {"status":401,"subStatus":6004,"userMessage":"Invalid token"}
May 14 20:12:25 localhost systemd[1]: Stopping Mopidy music server...
May 14 20:12:25 localhost systemd[1]: mopidy.service: Succeeded.
May 14 20:12:25 localhost systemd[1]: Stopped Mopidy music server.
May 14 20:12:25 localhost systemd[1]: Starting Mopidy music server...
May 14 20:12:25 localhost systemd[1]: Started Mopidy music server.
May 14 20:12:25 localhost mopidy[14303]: INFO 2020-05-14 20:12:25,512 [14303:MainThread] mopidy.main
May 14 20:12:25 localhost mopidy[14303]: Starting Mopidy 3.0.2
May 14 20:12:25 localhost mopidy[14303]: INFO 2020-05-14 20:12:25,526 [14303:MainThread] mopidy.config
May 14 20:12:25 localhost mopidy[14303]: Loading config from builtin defaults
May 14 20:12:25 localhost mopidy[14303]: INFO 2020-05-14 20:12:25,527 [14303:MainThread] mopidy.config
May 14 20:12:25 localhost mopidy[14303]: Loading config from file:///usr/share/mopidy/conf.d/mopidy.conf
May 14 20:12:25 localhost mopidy[14303]: INFO 2020-05-14 20:12:25,527 [14303:MainThread] mopidy.config
May 14 20:12:25 localhost mopidy[14303]: Loading config from file:///etc/mopidy/mopidy.conf
May 14 20:12:25 localhost mopidy[14303]: INFO 2020-05-14 20:12:25,528 [14303:MainThread] mopidy.config
May 14 20:12:25 localhost mopidy[14303]: Loading config from command line options
May 14 20:12:25 localhost mopidy[14303]: INFO 2020-05-14 20:12:25,604 [14303:MainThread] mopidy.main
May 14 20:12:25 localhost mopidy[14303]: Enabled extensions: musicbox_webclient, file, http, stream, m3u, tidal, softwaremixer
May 14 20:12:25 localhost mopidy[14303]: INFO 2020-05-14 20:12:25,605 [14303:MainThread] mopidy.main
May 14 20:12:25 localhost mopidy[14303]: Disabled extensions: none
May 14 20:12:25 localhost mopidy[14303]: INFO 2020-05-14 20:12:25,664 [14303:MainThread] mopidy.commands
May 14 20:12:25 localhost mopidy[14303]: Starting Mopidy mixer: SoftwareMixer
May 14 20:12:25 localhost mopidy[14303]: INFO 2020-05-14 20:12:25,666 [14303:MainThread] mopidy.commands
May 14 20:12:25 localhost mopidy[14303]: Mixer volume set to 100
May 14 20:12:25 localhost mopidy[14303]: INFO 2020-05-14 20:12:25,666 [14303:MainThread] mopidy.commands
May 14 20:12:25 localhost mopidy[14303]: Starting Mopidy audio
May 14 20:12:25 localhost mopidy[14303]: INFO 2020-05-14 20:12:25,668 [14303:MainThread] mopidy.commands
May 14 20:12:25 localhost mopidy[14303]: Starting Mopidy backends: TidalBackend, FileBackend, M3UBackend, StreamBackend
May 14 20:12:25 localhost mopidy[14303]: INFO 2020-05-14 20:12:25,673 [14303:Audio-2] mopidy.audio.actor
May 14 20:12:25 localhost mopidy[14303]: Audio output set to "autoaudiosink"
May 14 20:12:25 localhost mopidy[14303]: INFO 2020-05-14 20:12:25,674 [14303:TidalBackend-3] mopidy_tidal.backend
May 14 20:12:25 localhost mopidy[14303]: Connecting to TIDAL.. Quality = LOSSLESS
May 14 20:12:26 localhost mopidy[14303]: ERROR 2020-05-14 20:12:26,086 [14303:TidalBackend-3] pykka
May 14 20:12:26 localhost mopidy[14303]: Unhandled exception in TidalBackend (urn:uuid:15e456d7-4bd1-4747-b4c6-aa9b1b34ae9f):
May 14 20:12:26 localhost mopidy[14303]: Traceback (most recent call last):
May 14 20:12:26 localhost mopidy[14303]: File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 186, in _actor_loop
May 14 20:12:26 localhost mopidy[14303]: self.on_start()
May 14 20:12:26 localhost mopidy[14303]: File "/usr/local/lib/python3.7/dist-packages/Mopidy_Tidal-0.2.3-py3.7.egg/mopidy_tidal/backend.py", line 35, in on_start
May 14 20:12:26 localhost mopidy[14303]: if self._session.login(self._username, self._password):
May 14 20:12:26 localhost mopidy[14303]: File "/usr/local/lib/python3.7/dist-packages/tidalapi-0.6.4-py3.7.egg/tidalapi/init.py", line 86, in login
May 14 20:12:26 localhost mopidy[14303]: request.raise_for_status()
May 14 20:12:26 localhost mopidy[14303]: File "/usr/lib/python3/dist-packages/requests/models.py", line 940, in raise_for_status
May 14 20:12:26 localhost mopidy[14303]: raise HTTPError(http_error_msg, response=self)
May 14 20:12:26 localhost mopidy[14303]: requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.tidalhifi.com/v1/login/username?token=kgsOOmYk3zShYrNP
May 14 20:12:26 localhost mopidy[14303]: ERROR 2020-05-14 20:12:26,091 [14303:MainThread] mopidy.commands
May 14 20:12:26 localhost mopidy[14303]: Actor died: TidalBackend (urn:uuid:15e456d7-4bd1-4747-b4c6-aa9b1b34ae9f) stopped before handling the message
May 14 20:12:26 localhost mopidy[14303]: INFO 2020-05-14 20:12:26,091 [14303:MainThread] mopidy.commands
May 14 20:12:26 localhost mopidy[14303]: Starting Mopidy core
May 14 20:12:26 localhost mopidy[14303]: INFO 2020-05-14 20:12:26,118 [14303:MainThread] mopidy.commands
May 14 20:12:26 localhost mopidy[14303]: Starting Mopidy frontends: HttpFrontend
May 14 20:12:26 localhost mopidy[14303]: INFO 2020-05-14 20:12:26,119 [14303:HttpFrontend-9] mopidy.http.actor
May 14 20:12:26 localhost mopidy[14303]: HTTP server running at [::ffff:0.0.0.0]:6680
May 14 20:12:26 localhost mopidy[14303]: INFO 2020-05-14 20:12:26,119 [14303:MainThread] mopidy.commands
May 14 20:12:26 localhost mopidy[14303]: Starting GLib mainloop

pykka Unhandled exception in TidalBackend

On Raspberry, I am getting this error in log after authentication in web:

Jan 10 19:02:49 tidal-pi mopidy[3489]: ERROR    [TidalBackend-6] pykka Unhandled exception in TidalBackend (urn:uuid:a3a4d7d7-8991-4cdf-ad4b-7a6eeced585f):
Jan 10 19:02:49 tidal-pi mopidy[3489]: Traceback (most recent call last):
Jan 10 19:02:49 tidal-pi mopidy[3489]:   File "/usr/local/lib/python3.9/dist-packages/pykka/_actor.py", line 179, in _actor_loop
Jan 10 19:02:49 tidal-pi mopidy[3489]:     self.on_start()
Jan 10 19:02:49 tidal-pi mopidy[3489]:   File "/usr/local/lib/python3.9/dist-packages/mopidy_tidal/backend.py", line 68, in on_start
Jan 10 19:02:49 tidal-pi mopidy[3489]:     self.oauth_login_new_session(oauth_file)
Jan 10 19:02:49 tidal-pi mopidy[3489]:   File "/usr/local/lib/python3.9/dist-packages/mopidy_tidal/backend.py", line 43, in oauth_login_new_session
Jan 10 19:02:49 tidal-pi mopidy[3489]:     with open(oauth_file, 'w') as outfile:
Jan 10 19:02:49 tidal-pi mopidy[3489]: FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/mopidy/.config/tidal-oauth.json'
Jan 10 19:02:49 tidal-pi mopidy[3489]: ERROR    [MainThread] mopidy.commands Actor died: TidalBackend (urn:uuid:a3a4d7d7-8991-4cdf-ad4b-7a6eeced585f) stopped before handling the message

Tidal Backend Launch Issue

Trying to set up Tidal for Mopidy on a Raspberry Pi 4. Configuration works fine and I have no problem doing the OAuth login by finding the link in the initial logs. However, once the authentication is successful the following output emerges in the mopidy logs, resulting in a failure to launch for Tidal:

image

Add cache

Adding cache to playlists and tracks would be a great thing. Requesting 100 playlists each time mopidy loads is quite time consuming.

And also - thanks for the awesome plugin :)

lru_cache error in Mopidy 3

Edit: I had a different question here before, so I'm reusing the issue.

I've got Mopidy 3 running in a virtualenv with Python 3.8 on Ubuntu 18.04. When I try to start Mopidy with this extension installed, I get this error:

ERROR    2020-02-27 00:39:22,235 [15843:MainThread] mopidy.__main__
  Extension tidal failed during setup. This might have left the registry in a bad state.
Traceback (most recent call last):
  File "/srv/mopidy/_venv/lib/python3.8/site-packages/mopidy/__main__.py", line 129, in main
    extension.setup(registry)
  File "/srv/mopidy/_venv/lib/python3.8/site-packages/mopidy_tidal/__init__.py", line 33, in setup
    from .backend import TidalBackend
  File "/srv/mopidy/_venv/lib/python3.8/site-packages/mopidy_tidal/backend.py", line 11, in <module>
    from mopidy_tidal import library, playback, playlists
  File "/srv/mopidy/_venv/lib/python3.8/site-packages/mopidy_tidal/library.py", line 15, in <module>
    from mopidy_tidal.search import tidal_search
  File "/srv/mopidy/_venv/lib/python3.8/site-packages/mopidy_tidal/search.py", line 7, in <module>
    from lru_cache import SearchCache
ModuleNotFoundError: No module named 'lru_cache'

I have lru_cache installed, though:

# python -m pip show lru_cache
Name: lru-cache
Version: 0.2.3
Summary: thread safe lru cache
Home-page: https://github.com/acmerfight/lru_cache
Author: acmerfight
Author-email: [email protected]
License: MIT
Location: /srv/mopidy/_venv/lib/python3.8/site-packages
Requires:

Any idea what's up?

tidal-oauth.json expires after 7 days - tidalapi-0.6.9

Hi,
I must point out that the authorization created with tidal-oauth.json, after the new changes, expires after 7 days.

This problem had already been solved by you some time ago:
#37

It is possible to solve this too, it seems to me a fairly important fact.
thank you

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.