Hi everybody,
nice to hear that my Addon is used from so many users.
A TIDAL login session can become invalid if you don't use it for a while or if you use another player instead of the Kodi addon.
The easyest method is to logout and login again to get a new session id.
To understand the session id, here is a short description how my addon handles the login sessions:
To access the users TIDAL content the addon has to logon to the TIDAL servers. This is done by the users name, his password, a "unique hardware id" and an "API token".
The "unique hardware id" identifies the player hardware. I don't known how the TIDAL apps for Android and IOS generates this id. My Addon generates a random hexadecimal number, stores it in the Addon settings and uses this for each new login
The "API token" identifies the TIDAL client software. There are different API tokens for IOS, Android, Web-Browser, Audirvana and other TIDAL clients.
Each API token has different characteristics, for instance:
- A login with the IOS player token gets AAC for lossy and ALAC for lossless playback. ALAC works with MQA streams but they are not shown as "authenticated" within my Meridian Explorer 2 DAC (no blue LED).
And music videos are played as HLS streams with max. 1080p resolution. >> That is ok.
- A login with the Android token gets AAC for lossy playback and FLAC for lossless streams, but not with MQA quality. Music videos are streamed over HTTP with only 720p resolution !
So an Android session is not usable for MQA streaming and full HD music videos. But if the TIDAL servers are overloaded or you have a slow internet connection, the music video streaming over HTTP is the better choice because Kodi can read the stream into its large playback buffer. The HLS playback buffer in Kodi is not very large.
- Using the Audirvana API token the Addon gets AAC for lossy and FLAC streams with correct MQA contents (Blue LED on the Meridian Explorer 2 lights up).
But if a playpack URL for a music video is requested, the TIDAL servers returns only an audio stream. That is, because the Audirvana Player can't play music videos
- With the Web-Browser token it is not passible to play lossless streams, because they are encrypted, and the Lossy playpack with AAC works with the RTMP protocol.
So how it is possible for my TIDAL Addon to stream MQA with full quality and play music videos with 1080p resolution ?
The answer is: 2 Login sessions at the same time !
If you activate FLAC/MQA in the Addon settings the addon generates two login session ids with two API tokens, one to play FLAC/MQA and one to play music videos.
So if you play a music video, the addon uses the IOS login session and if you play a music track, it uses the Audirvana login session.
Browsing through the TIDAL library and the users content is also done with the IOS login session, because the Audirvana session can't handle Videos in playlists !
If you activate ALAC without MQA within the Addon settings, the Addon uses only one Login Token (from IOS) because it can play ALAC and music videos in 1080p !
I hope, this helps you to understand, why you sometimes need to logout and login again.
Arneson