Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin: Refined Lyrics #1768

Closed
wants to merge 13 commits into from
Closed

plugin: Refined Lyrics #1768

wants to merge 13 commits into from

Conversation

ArjixWasTaken
Copy link
Contributor

@ArjixWasTaken ArjixWasTaken commented Feb 19, 2024

⚠️ THIS IS A DRAFT ⚠️

Made a draft PR, so I can easily work on this from multiple computers.
This plugin will be a replacement for lyrics-genius, but it will support more sources, synced lyrics, romanization, etc.

Roadmap:

  • Intercept the lyrics tab header and content.
    • Always enable the lyrics tab
    • Read/Write lyrics
  • Reach feature parity with lyrics-genius.

*More goals will be added at a later time.

@ArjixWasTaken ArjixWasTaken changed the title plugin: init plugin: Refined Lyrics Feb 19, 2024
@JellyBrick JellyBrick added the enhancement New feature or request label Feb 20, 2024
@JellyBrick
Copy link
Collaborator

JellyBrick commented Feb 22, 2024

Now that YTMD supports Solid.js.
So, as possible, it seems like a good choice to create UI components using Solid.js. (also for maintenance and readability)

see https://github.com/th-ch/youtube-music/tree/master/src/plugins/in-app-menu

@ArjixWasTaken ArjixWasTaken marked this pull request as ready for review February 22, 2024 07:05
@ArjixWasTaken
Copy link
Contributor Author

@JellyBrick Thanks, I'll be using that for the UI!

Although, it would be nice if we could hook into web components, but alas I've failed to monkey patch them many times.

@ArjixWasTaken ArjixWasTaken marked this pull request as draft February 22, 2024 08:47
@DereC4
Copy link
Contributor

DereC4 commented Mar 9, 2024

can't wait! Glad to pass the torch onto you

@ArjixWasTaken
Copy link
Contributor Author

PS: I've been inactive because it has been the exam season for the past 2 months.

(Normally it would only last one month)

@ArjixWasTaken
Copy link
Contributor Author

I am once again actively working on this.

@DereC4
Copy link
Contributor

DereC4 commented Apr 27, 2024

awesome

@ArjixWasTaken
Copy link
Contributor Author

ArjixWasTaken commented Apr 27, 2024

Looks like youtube provides synced lyrics on their own!
Dunno why the official client doesn't use them, maybe they are for the mobile apps?

Either way, I am going to use them :^)

Also, I'd like some input about genius lyrics, from what I can gather they do not provide synced lyrics.
And from what I can see, their lyrics are not focused on karaoke, because they group them by chorus, verse, etc.

@ArjixWasTaken
Copy link
Contributor Author

ArjixWasTaken commented Apr 28, 2024

I noticed that we are already using an excellent library named youtubei.js which wraps the youtubei API.
I looked into it and I do not get synced lyrics using it.

My hunch is that the client/version that youtubei.js uses does not support synced lyrics.
So I will keep my custom mini-wrapper until youtubei.js allows me to override the client name and version for the music endpoints.

(It may appear that they do support that, but the music endpoints use a hard-coded client type and version)

@MulverineX
Copy link
Contributor

Dunno why the official client doesn't use them, maybe they are for the mobile apps?

Indeed, they are only available on the mobile Flutter app (Android/iOS)

@Tortillas-IT
Copy link

Tortillas-IT commented May 16, 2024

Hi, idk if this can help in some way... But on vanilla youtube music (web) i'm using a script which permits live lyrics on youtube music web. Basically this is possible thanks to musixmatch APIs and lyrics. In case you're interested:
https://github.com/ProComGameS/ytm-lyrics-v2/tree/ProComGameS-YTMLyrics-V2

@chiqors
Copy link

chiqors commented Jun 7, 2024

any news from this? is this viable to put into the app? @Tortillas-IT found an interesting repo.. It looks like injecting the script when load the YTM

Edit: found another one that looks like have been updated here

@ArjixWasTaken
Copy link
Contributor Author

any news from this? is this viable to put into the app? @Tortillas-IT found an interesting repo.. It looks like injecting the script when load the YTM

Edit: found another one that looks like have been updated here

The news are that I am not to be trusted to not procrastinate 😭

@Tortillas-IT
Copy link

Tortillas-IT commented Jun 11, 2024

Look what i found, looks so much better (it's a browser exstension): https://github.com/boidushya/better-lyrics/

@ArjixWasTaken
Copy link
Contributor Author

ArjixWasTaken commented Jun 11, 2024

How can it look better when I haven't even made the plugin yet?

Like, you are comparing "nothing" (my unfinished plugin) to "something"

It ain't even an apples to oranges level of comparison

@Tortillas-IT
Copy link

Tortillas-IT commented Jun 12, 2024

How can it look better when I haven't even made the plugin yet?

Like, you are comparing "nothing" (my unfinished plugin) to "something"

It ain't even an apples to oranges level of comparison

No bro, there is a misunderstanding... I was comparing the first repo i sent and the last one 😅

I didn't explain myself well, sorry

@chiqors
Copy link

chiqors commented Jun 13, 2024

How can it look better when I haven't even made the plugin yet?
Like, you are comparing "nothing" (my unfinished plugin) to "something"
It ain't even an apples to oranges level of comparison

No bro, there is a misunderstanding... I was comparing the first repo i sent and the last one 😅

I didn't explain myself well, sorry

Looks like, it's better to create an issue for it

@boidushya
Copy link

Look what i found, looks so much better (it's a browser exstension): https://github.com/boidushya/better-lyrics/

Hey creator of this extension here, thanks to @MulverineX who brought this thread to my attention. I'm just hashing out some final deets to make my backend open source. Feel free to get in touch with me if you want to discuss anything specific related to it and Im happy to answer any questions (email: [email protected] / tg: @boidushyaB)

@ArjixWasTaken ArjixWasTaken marked this pull request as ready for review June 17, 2024 05:09
@ArjixWasTaken
Copy link
Contributor Author

ArjixWasTaken commented Jun 17, 2024

GitHub mobile sucks...it marked it as ready for review when I pressed the "view more" button for the comments...

And I cannot reverse it from GitHub mobile

@ArjixWasTaken
Copy link
Contributor Author

Look what i found, looks so much better (it's a browser exstension): https://github.com/boidushya/better-lyrics/

Hey creator of this extension here, thanks to @MulverineX who brought this thread to my attention. I'm just hashing out some final deets to make my backend open source. Feel free to get in touch with me if you want to discuss anything specific related to it and Im happy to answer any questions (email: [email protected] / tg: @boidushyaB)

I could steal the UI code if that is ok with you.
But when it comes to simply integrating the extension into this PR...sadly it doesn't match what the PR wants to achieve

A multi-source lyrics plugin, that allows you to change the lyrics provider on the fly

From the screenshots of your extension that is not possible.

But hey, that's just my PR, if you make a different PR that focuses on only one lyrics provider, and it gets accepted, then I could drop my PR.

@boidushya
Copy link

boidushya commented Jun 17, 2024

I could steal the UI code if that is ok with you.

I mean, Better Lyrics is using a GPL-3 License, so as long as you publicly attribute my repository/website in the UI somewhere, that's okay with me.
Also I don't have any plans to open a PR in this repo for Better Lyrics, I'd rather focus on its use case as a browser extension - all the best with your work!

@ArjixWasTaken ArjixWasTaken marked this pull request as draft June 17, 2024 06:24
@ArjixWasTaken
Copy link
Contributor Author

I mean, Better Lyrics is using a GPL-3 License, so as long as you publicly attribute my repository/website in the UI somewhere, that's okay with me.

Just because a licence allows me to "steal" code, it doesn't automatically mean that the author of said code is ok with it.
Thanks for saying that it is indeed ok with you!

@boidushya
Copy link

I mean, Better Lyrics is using a GPL-3 License, so as long as you publicly attribute my repository/website in the UI somewhere, that's okay with me.

Just because a licence allows me to "steal" code, it doesn't automatically mean that the author of said code is ok with it. Thanks for saying that it is indeed ok with you!

You're welcome! Just make sure you don't skip on the attribution part I mentioned and I'm all good with it! (A link to my extension/ extensions' homepage works - thanks!)

@MulverineX
Copy link
Contributor

A multi-source lyrics plugin, that allows you to change the lyrics provider on the fly

From the screenshots of your extension that is not possible.

But hey, that's just my PR, if you make a different PR that focuses on only one lyrics provider, and it gets accepted, then I could drop my PR.

@ArjixWasTaken

I think the idea wasn't to abandon multiple-source, its to add his API as a source

@ArjixWasTaken
Copy link
Contributor Author

A multi-source lyrics plugin, that allows you to change the lyrics provider on the fly

From the screenshots of your extension that is not possible.

But hey, that's just my PR, if you make a different PR that focuses on only one lyrics provider, and it gets accepted, then I could drop my PR.

@ArjixWasTaken

I think the idea wasn't to abandon multiple-source, its to add his API as a source

His API would most likely be taking lyrics from other sources though....

It was recommended because it is a ready-made alternative

@MulverineX
Copy link
Contributor

His API serves MusixMatch lyrics, afaict there isn't other good solutions for this

@MulverineX
Copy link
Contributor

MulverineX commented Jun 17, 2024

Also his backend is now open source. Feel free to take a look. Do note that due to the sensitive nature of scraping MusixMatch at scale for free, the endpoints are hidden. Just know they are to an external authoritative server that does not get the user's IP address. (I've discussed his methodology privately, it is trustworthy)

In the future @boidushya may investigate using alternative scraping methods that are more transparent, but for now it'll stay this way.

@MulverineX
Copy link
Contributor

MulverineX commented Jul 15, 2024

Looks like boidushya's backend got leapfrogged by #2207

https://github.com/tranxuanthang/lrclib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants