upmpdcli Tidal plugin - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Feature requests (https://moodeaudio.org/forum/forumdisplay.php?fid=8) +--- Thread: upmpdcli Tidal plugin (/showthread.php?tid=6835) |
upmpdcli Tidal plugin - TheOldPresbyope - 08-20-2024 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. 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 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] 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 RE: upmpdcli Tidal plugin - GioF_71 - 08-21-2024 Hello, thank you for the nice write-up. Just a small correction. When creating the PKCE authentication file, the resulting file should be named "pkce.credentials.json", so the command line should be: Code: sudo python3 /usr/share/upmpdcli/cdplugins/tidal/get_credentials.py -t PKCE -f /var/cache/upmpdcli/tidal/pkce.credentials.json while when using OAUTH2 (default for -t) the file should be "/var/cache/upmpdcli/tidal/credentials.json" so: Code: sudo python3 /usr/share/upmpdcli/cdplugins/tidal/get_credentials.py -f /var/cache/upmpdcli/tidal/credentials.json The plugin examines those files and creates the session choosing the best available option. If pkce.credentials.json is available, a pkce session is created, otherwise it falls back to the regular credentials.json file and an oauth2 session will be created. RE: upmpdcli Tidal plugin - Nutul - 08-21-2024 (08-21-2024, 12:12 AM)GioF_71 Wrote: while when using OAUTH2 (default for -t) the file should be "/var/cache/upmpdcli/tidal/pkce.credentials.json" so: I think this is a copy-paste typo... ;-) RE: upmpdcli Tidal plugin - GioF_71 - 08-21-2024 It is indeed... I will correct later! RE: upmpdcli Tidal plugin - GioF_71 - 09-18-2024 Hello, a quick update (you might have seen this already). Things are going to get simpler for the Tidal plugin, see here, thanks to tehkillerbee. I already have a working version of the plugin running and I will prepare a release soon. Of course, the Tidal account will always be a requirement (should go without saying), but the authentication scheme will be only one, and we will be back to the original one (1-step). RE: upmpdcli Tidal plugin - TheOldPresbyope - 09-18-2024 (09-18-2024, 07:56 PM)GioF_71 Wrote: Hello, a quick update (you might have seen this already). Thanks. I’ll wait for your release. Regards, Kent RE: upmpdcli Tidal plugin - Snoil - 09-26-2024 good morning, with 9.1.0 I tried this starting with 3. (get credentials), first trying OAUTH2 (also with the alternative of editing upmpdcli.conf as instructed) and then PKCE. No error messages but login fails. Are steps 1. and 2. necassary to get this to work with 9.1.0? RE: upmpdcli Tidal plugin - TheOldPresbyope - 09-26-2024 @Snoil I haven’t had time to revisit this topic recently. Some of the initial steps may not be necessary now but I was waiting for a new release of the underlying code when real life overtook me. Maybe I can have a look this weekend. Regards, Kent RE: upmpdcli Tidal plugin - GioF_71 - 09-27-2024 (09-26-2024, 10:58 AM)Snoil Wrote: good morning, Hello, can you provide: 1) upmpdcli.conf 2) listing of /var/cache/upmpdcli/cache/tidal, especially .json files (don't post the contents, just the file names) 3) applications logs Thank you RE: upmpdcli Tidal plugin - Snoil - 09-28-2024 Code: ... 3) I'm not sure what logs you mean thank you |