Giter Site home page Giter Site logo

discordtidal's Introduction

discordtidal

⚠️ USE AT YOUR OWN RISK!

This code is openly abusing Discord's API to upload album covers as "game assets" in real time to a Discord application, which probably wouldn't be good if Discord caught your account doing that. I take no responsibility if your account gets terminated using discordtidal!

Check out the safer branch here. It offers the following:

  • less risk of your account getting terminated
  • much simpler to use, just click on an exe and it works
  • looks much more boring

Remember when Discord added a Spotify integration and all of your friends started having fun with it, but then being the weirdo you are, you had TIDAL instead of Spotify Premium?

Well, I do. And this is what I did to make the currently playing TIDAL song show up in my Discord status.

Okay, so, what is this again?

A tool that makes the TIDAL song you're listening to show up in your Discord status. Only works on Windows using the TIDAL desktop application (not the browser version) and looks like this compared to a Spotify listening status:

spotify tidal

How do I use it?

Since this uses a Discord application that's modified to match the song you're listening to, you need to create your own Discord Application.

  • Download a release from the releases tab.

  • Run the exe, it will most likely crash but that's fine. Now you will see a config.toml file in the folder.

  • Go to https://discord.com/developers, create a new application and set the Application ID value in the config.

  • Get your Discord account token and set it in the config too.

    You can get this using different methods, I used Firefox' network monitor (Ctrl+Shift+E) to check the https requests that contain my token as authorization.

  • Get a User Agent of your choice and paste it in the config. I wanted to make this configurable for the fun of it. If you don't know what a User Agent is, you can copy your user agent from here.

  • Start Discord, then discordtidal, and then the TIDAL desktop app. You may need to add it as a game for it to show up on your playing status.

  • Start listening!

⚠️ The album artwork might not appear the first time you're listening to a new album, because Discord's asset cache takes some time to update. In a couple minutes or the next time you listen to the same album, the cover should be there.

How does it work?

That's a little more complicated than you would probably expect, but I had my fun. Here's how it works step by step:

  • get the song name from the TIDAL application window title
  • look up for the song in TIDAL api
  • get the metadata and album cover
  • upload the album cover to a Discord application as an application rich presence asset
  • update the application name to be the song name (so that it shows up at the top, in bold)
  • connect to discord using rich-go
  • store albums and assets in a leveldb so that the same album cover is not uploaded twice (thanks to discord cache)
  • clear up assets if they reach 250, since discord has a limit of 300

discordtidal's People

Contributors

andregamma avatar unickorn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

andregamma

discordtidal's Issues

No Image in Rich Presence

image
The Image inside the Rich pressence doesn´t work for me at all
I love your effort and you coded exactly what I was searching for, but this small thing is needed for the perfection

Minimize to tray option

Would be nice if the cmd is minimized to tray since the start of it, as you dont have to do anything with it, just start it, or being able to simply hide it after starting

Use imgur for images

Instead of uploading the album art to Discord's dev platform and risking your account, use imgur to store and display album art.
An another music platform RPC (MusicBee RPC) uses that approach and works perfectly.

Images aren't loading

seems the code may have broken or somethin, cuz the image is only loading like 1 out of 10 times

App panicking and crashing after a couple of song refreshes

Seems I'm having the same issue as #3, log attached below. I'm running Windows 11 on the latest Insider dev build, if that helps any.

2022-09-03T13:37:49.366+0200 INFO discord/assets.go:64 syncing discord
2022-09-03T13:37:49.404+0200 INFO rpc/presence.go:45 logged out of discord
panic: runtime error: slice bounds out of range [:19] with length 0

goroutine 1 [running]:
discordtidal/discord.unhash(0x8377b0, 0x0, 0x0, 0x20, 0x0, 0x8377b0, 0x0)
C:/Dev/go/discord-tidal/discord/assets.go:207 +0x11d
discordtidal/discord.Sync()
C:/Dev/go/discord-tidal/discord/assets.go:86 +0x44a
discordtidal.Start()
C:/Dev/go/discord-tidal/tidal.go:106 +0x4d1
main.main()
C:/Dev/go/discord-tidal/examples/main.go:8 +0x27

RPC keeps crashing on certain songs

As I said in the title, the RPC keeps crashing on certain songs. An example is "paris freestyle (skrilla remix)" by Pashanim and many Lucio101 songs. I tried deleting the db folder, re-downloading the RPC, but nothing helped.

Hi

Hi Nick! I am an averge NovaPrimer

how do i get this to work?

im super confused on the steps. i ran the exe and did all the stuff on the config file and it doesnt work

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.