i write instantly legacy and abandoned code
acelikesghosts / ytm-rpc Goto Github PK
View Code? Open in Web Editor NEWa poorly made youtube music rpc
License: MIT License
a poorly made youtube music rpc
License: MIT License
look into and steal how premid does it
https://github.com/PreMiD/Presences/blob/main/websites/Y/YouTube%20Music/presence.ts
going to actually be taking this one myself and doing it ASAP
code 5 == played = what we need
IE:
etc
It may be necessary to reverse engineer the API to obtain a share link since it is not readily available on the page through scraping (IIRC)
not planned, simply an idea
the discord-rpc library being used straight up KILLS the application if we hit a ratelimit, with a code 1000.
todo: add a rate limiter to the server ig
Server Installation: 7 steps
Extension Installation: 4 steps
Client Mod: 5 steps
What we can do here is streamline the server installation and the client mod installation, most likely using a CLI.
The way I want to go for this will be something along the lines of the pseudo commands listed below:
git clone https://github.com/acelikesghosts/ytm-rpc.git
node ./scripts/streamline.js
Where streamline.js
would provide a CLI to decide between the following:
We already have support for BetterDiscord, so it is most likely in the best interests of the project to add support to both Replugged and Vencord
reduces bundle size and removes need to deal with legality of bundling it
attempting to resolve this on the refactor
branch, alongside adding pausing of music being displayed;
have to fix the double sending (which is present in the master branch o.o) in order to add pausing.
double sending of the state causes the paused
variable to flip flop because it sends the old state once and the new state once.
they swapped from webpack to rspack, most likely will have to fix webpack searches.
????
Random ass bug, no clue why.
No clue on how it got into the project, but it shouldn't be there.
https://github.com/AceLikesGhosts/ytm-rpc/blob/master/client-mods/replugged/manifest.json#L2
should be all lowercase
due to songs starting at a paused state, then automatically unpausing by YTM, the content script believes its paused; this is rather minor and can just be solved by pausing and unpausing the song, although its annoying.
Use dotenv
to migrate from hard coded IDs to just environment variables.
why are they organized like that.
its a mess
Will require:
WebSocket
WebSocket
code for the serverthe src is painful to look at, no separation between the client script and the page script, etc etc
most of it is es5, although there are a few parts which aren't. need to decide which to stick with
ex:
https://github.com/AceLikesGhosts/ytm-rpc/blob/master/index.js#L24-L26
This would involve the following:
and prolly more
every once in a while it will post data without the album text being defined.
module ids change a lot find a better way to find it in replugged
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.