flecs icon indicating copy to clipboard operation
flecs copied to clipboard

plugin: Refined Lyrics

Open ArjixWasTaken opened this issue 1 year ago • 26 comments

⚠️ 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:

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

*More goals will be added at a later time.

ArjixWasTaken avatar Feb 19 '24 23:02 ArjixWasTaken

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

JellyBrick avatar Feb 22 '24 03:02 JellyBrick

@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 avatar Feb 22 '24 07:02 ArjixWasTaken

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

DereC4 avatar Mar 09 '24 02:03 DereC4

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 avatar Mar 09 '24 05:03 ArjixWasTaken

I am once again actively working on this.

ArjixWasTaken avatar Apr 27 '24 02:04 ArjixWasTaken

awesome

DereC4 avatar Apr 27 '24 09:04 DereC4

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 avatar Apr 27 '24 23:04 ArjixWasTaken

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)

ArjixWasTaken avatar Apr 28 '24 13:04 ArjixWasTaken

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)

MulverineX avatar May 16 '24 08:05 MulverineX

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

Tortillas-IT avatar May 16 '24 19:05 Tortillas-IT

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

chiqors avatar Jun 07 '24 13:06 chiqors

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 :sob:

ArjixWasTaken avatar Jun 07 '24 14:06 ArjixWasTaken

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

Tortillas-IT avatar Jun 11 '24 17:06 Tortillas-IT

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

ArjixWasTaken avatar Jun 11 '24 17:06 ArjixWasTaken

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

Tortillas-IT avatar Jun 12 '24 19:06 Tortillas-IT

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

chiqors avatar Jun 13 '24 01:06 chiqors

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)

boidushya avatar Jun 16 '24 23:06 boidushya

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 avatar Jun 17 '24 05:06 ArjixWasTaken

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.

ArjixWasTaken avatar Jun 17 '24 05:06 ArjixWasTaken

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!

boidushya avatar Jun 17 '24 05:06 boidushya

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!

ArjixWasTaken avatar Jun 17 '24 06:06 ArjixWasTaken

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!)

boidushya avatar Jun 17 '24 06:06 boidushya

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

MulverineX avatar Jun 17 '24 06:06 MulverineX

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

ArjixWasTaken avatar Jun 17 '24 06:06 ArjixWasTaken

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

MulverineX avatar Jun 17 '24 09:06 MulverineX

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 avatar Jun 17 '24 18:06 MulverineX

Looks like boidushya's backend got leapfrogged by #2207

https://github.com/tranxuanthang/lrclib

MulverineX avatar Jul 15 '24 03:07 MulverineX