Mastermindzh / tidal-hifi

The web version of Tidal running in electron with hifi support thanks to widevine.
Other
994 stars 56 forks source link

Make Tidal-HiFi Discord RPC work with arRPC (Armcord, etc) #314

Open nyabinary opened 9 months ago

nyabinary commented 9 months ago

This will make it so other Discord clients that use arRPC work with Tidal-HiFi implementation.

MiMillieuh commented 4 months ago

I managed to get it working fine on vencord by following this :

mkdir -p ~/.config/user-tmpfiles.d
echo 'L %t/discord-ipc-0 - - - - .flatpak/dev.vencord.Vesktop/xdg-run/discord-ipc-0' > ~/.config/user-tmpfiles.d/discord-rpc.conf
systemctl --user enable --now systemd-tmpfiles-setup.service

Source

I have Vencord as a Flatpak and Tidal as an Appimage. Even following the flatpak guide it doesn't work when tidal is in a flatpak for whatever reason...

MiMillieuh commented 4 days ago

To fix it in the flatpak you can also bind discord to vesktop folder.

Seems like Tidal-hifi only checks for the discord client and redirecting to another one is not compatible for whatever of my incompetences... (tried to link it without succes :( )

Anyway if you want to achive this you can

Create a systemd service if you want it to be created on startup so you don't have to do it again :

sudo nano /etc/systemd/system/Vesktop-RPC-Bind-Flatpak.service

Enter the following :

[Unit]
Description=Bind mount for Flatpak Vencord to Discord
Requires=user@1000.service
After=user@1000.service

[Service]
Type=oneshot
ExecStartPre=/usr/bin/mkdir -p /run/user/1000/.flatpak/dev.vencord.Vesktop/xdg-run
ExecStartPre=/usr/bin/mkdir -p /run/user/1000/app/com.discordapp.Discord
ExecStartPre=/usr/bin/chmod -R 777 /run/user/1000/.flatpak
ExecStartPre=/usr/bin/chmod -R 777 /run/user/1000/app
ExecStart=/usr/bin/mount --bind /run/user/1000/.flatpak/dev.vencord.Vesktop/xdg-run /run/user/1000/app/com.discordapp.Discord
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

save it with ctrl + x and y and enable the service now with systemctl enable --now Vesktop-RPC-Bind-Flatpak.service

Note that it's not really a rocket science solution and that a proper fix would be welcome anyway.

if you don't want to create a service and run just the command you need you can too but it's more convenient to not have to think about anything.

To explain it quickly, it creates folders for vesktop and discord and give it all user permission so it's usable and then it binds it with a mount

This may be applicable to something else than Vesktop.