08-20-2024, 08:56 PM
(This post was last modified: 10-29-2024, 05:31 PM by TheOldPresbyope.
Edit Reason: fixed name of credentials file and added serveral remarks as ETAs
)
TO NEW READERS - there's still work being done on the upmpdcli Tidal plugin. The first few posts in this thread are interesting, perhaps, but skip to my post #14 to find the current procedure for getting the plugin working in moOde.
_______________________________________________________________________________________________
@Tim Curtis
@GioF_71
[I'm placing this thread here rather than in the Test Team section so that Gio can see it too.]
So starting over, I was able to bring up the latest Tidal plugin code in moOde 9.0.6 through the following steps.
1. on the moOde player, install the necessary Python3 tidalapi module which is not included in the upmpdcli distro nor, apparently, in Raspberry Pi debs.
Note: The --break-system-packages option was necessary because I was forcing the installation of a non-Debian-packaged Python package "system wide". Debian wants me to install it in a virtual environment instead, but I was too lazy to explore this with the moOde/mpd/upmpdcli lashup.
-----
2. replace the existing upmpdcli-1.8.12 Tidal plugin code in the moOde player with the same code in latest upmpdcli sources (upmpdcli-1.8.16.tar.gz ATM)
Notes:
1. If I were smarter I'd know how to extract the needed subdirectory without bringing along the full path
2. I parked the existing code one level above the cdplugins directory so upmpdcli didn't interpret it as another plugin; could have stashed it in a tar or zip file somewhere else, or just deleted it for good.
-----
3. get Tidal credentials for this player. Here we have a choice of OAUTH2 or PKCE authentication (see upmpcli: Tidal). For the following, I've chosen to seek PKCE authentication so I can play Hi-Res files (up to 24bit/192kHz it says somewhere). OAUTH2 authentication apparently limits us to 24bit/48kHz. Doesn't matter to my aging ears but why not go for gold?
At a glance, the output of this command seems intimidating
where I have deleted the info relating to my account.
As it says, open the link in your browser and log into your Tidal account. A new 'Ooops' page will appear; paste the URL of that page into the command line and hit enter. Done and dusted.
OAUTH2 authentication is somewhat different (see the aforementioned link) but still entails a conversation with your browser.
-----
4. edit the /etc/upmpdcli.conf file to uncomment the tidaluser line. Don't bother changing the default value 'tidal' to something else. No need to enter Tidal credentials in this file because they've just been stored in the cache.
-----
5. go to the Renderers config screen in the moOde player's webUI and enable (or restart) the UPnP renderer.
ETA - this enables both the existing UPnP Media Renderer that moOde already had, as it did before, and also the UPnP MediaServer we just configured.
Should be good to go.
ATM I'm listening to a Tidal playlist of classical selections. According to moOde's audio info, these tracks are FLAC files coming in at 24bit/96kHz. According to the upmpdcli docs, with PKCE authentication we dealing with MPEG-DASH streams. How that's all being handled behind the screen is above my pay grade.
If this doesn't work, hit me up. I've been known to make a mistake from time to time
As an aside, I don't use UPnP daily so I can't answer to issues relating to the behavior of the moOdeUI when playing Tidal/Qobuz/local Media Server tracks, nor to issues relating to the behavior of various third-party UPnP control points. (ATM I'm using mconnectLite on my iPad but I've used others on my Android phone.)
As another aside, at first I set out to build an up-to-date upmpcli deb ala the moOde build recipes but I screwed up somewhere. Kept running into an undefined symbol error (this with upmpdcli-1.8.13.tar.gz a few days ago; suppose I should try again with 1.8.16).
Regards,
Kent
_______________________________________________________________________________________________
@Tim Curtis
@GioF_71
[I'm placing this thread here rather than in the Test Team section so that Gio can see it too.]
So starting over, I was able to bring up the latest Tidal plugin code in moOde 9.0.6 through the following steps.
1. on the moOde player, install the necessary Python3 tidalapi module which is not included in the upmpdcli distro nor, apparently, in Raspberry Pi debs.
Code:
sudo python3 -m pip install tidalapi==0.7.6 --break-system-packages
Note: The --break-system-packages option was necessary because I was forcing the installation of a non-Debian-packaged Python package "system wide". Debian wants me to install it in a virtual environment instead, but I was too lazy to explore this with the moOde/mpd/upmpdcli lashup.
-----
2. replace the existing upmpdcli-1.8.12 Tidal plugin code in the moOde player with the same code in latest upmpdcli sources (upmpdcli-1.8.16.tar.gz ATM)
Code:
# get the tarball to my home directory on my moOde player
cd
wget https://www.lesbonscomptes.com/upmpdcli/downloads/upmpdcli-1.8.16.tar.gz
# extract just the subdirectory containing the tidal plugin code
tar xf upmpdcli-1.8.16.tar.gz upmpdcli-1.8.16/src/mediaserver/cdplugins/tidal
# park the existing tidal subdirectory out of harm's way
sudo mv /usr/share/upmpdcli/cdplugins/tidal /usr/share/upmpdcli/tidal.dist
# copy over the new code
sudo cp -r upmpdcli-1.8.16/src/mediaserver/cdplugins/tidal /usr/share/upmpdcli/cdplugins/
Notes:
1. If I were smarter I'd know how to extract the needed subdirectory without bringing along the full path
2. I parked the existing code one level above the cdplugins directory so upmpdcli didn't interpret it as another plugin; could have stashed it in a tar or zip file somewhere else, or just deleted it for good.
-----
3. get Tidal credentials for this player. Here we have a choice of OAUTH2 or PKCE authentication (see upmpcli: Tidal). For the following, I've chosen to seek PKCE authentication so I can play Hi-Res files (up to 24bit/192kHz it says somewhere). OAUTH2 authentication apparently limits us to 24bit/48kHz. Doesn't matter to my aging ears but why not go for gold?
Code:
sudo python3 /usr/share/upmpdcli/cdplugins/tidal/get_credentials.py -t PKCE -f /var/cache/upmpdcli/tidal/pkce.credentials.json
At a glance, the output of this command seems intimidating
Code:
Credentials will be written to [/var/cache/upmpdcli/tidal/pkce.credentials.json]
Authentication type is [PKCE]
Keep existing pkce file: [False]
READ CAREFULLY!
---------------
You need to open this link and login with your username and password. Afterwards you will be redirected to an 'Oops' page. To complete the login you must copy the URL from this 'Oops' page and paste it to the input field.
https://login.tidal.com/authorize?response_type=code&redirect_uri=https%3A%2F%2Ftidal.com%2Fandroid%2Flogin%2Fauth&client_id=...&lang=EN&appMode=android&client_unique_key=...
Paste 'Ooops' page URL here and press <ENTER>:
where I have deleted the info relating to my account.
As it says, open the link in your browser and log into your Tidal account. A new 'Ooops' page will appear; paste the URL of that page into the command line and hit enter. Done and dusted.
OAUTH2 authentication is somewhat different (see the aforementioned link) but still entails a conversation with your browser.
-----
4. edit the /etc/upmpdcli.conf file to uncomment the tidaluser line. Don't bother changing the default value 'tidal' to something else. No need to enter Tidal credentials in this file because they've just been stored in the cache.
-----
5. go to the Renderers config screen in the moOde player's webUI and enable (or restart) the UPnP renderer.
ETA - this enables both the existing UPnP Media Renderer that moOde already had, as it did before, and also the UPnP MediaServer we just configured.
Should be good to go.
ATM I'm listening to a Tidal playlist of classical selections. According to moOde's audio info, these tracks are FLAC files coming in at 24bit/96kHz. According to the upmpdcli docs, with PKCE authentication we dealing with MPEG-DASH streams. How that's all being handled behind the screen is above my pay grade.
If this doesn't work, hit me up. I've been known to make a mistake from time to time
As an aside, I don't use UPnP daily so I can't answer to issues relating to the behavior of the moOdeUI when playing Tidal/Qobuz/local Media Server tracks, nor to issues relating to the behavior of various third-party UPnP control points. (ATM I'm using mconnectLite on my iPad but I've used others on my Android phone.)
As another aside, at first I set out to build an up-to-date upmpcli deb ala the moOde build recipes but I screwed up somewhere. Kept running into an undefined symbol error (this with upmpdcli-1.8.13.tar.gz a few days ago; suppose I should try again with 1.8.16).
Regards,
Kent