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

New lyric source pack for ESLyric #115

Open
TT-ReBORN opened this issue Sep 17, 2023 · 31 comments
Open

New lyric source pack for ESLyric #115

TT-ReBORN opened this issue Sep 17, 2023 · 31 comments

Comments

@TT-ReBORN
Copy link

TT-ReBORN commented Sep 17, 2023

Hi ohyeah,

I have wrote some new ESLyric sources and refactored and fixed your original lyric sources scripts.
I will add them to my Georgia-ReBORN theme and hope you will also add them officially to your ESLyric source repo.

Here is the new ESLyric source pack:
eslyric_source_pack.zip

Installation:

Go to foobar's Preferences > Tools > ESLyric > Lyric Option > Lyric Sources
At the top right corner click on Get More... > Get online script > Download everything
Go to your foobar2000\profile\eslyric-data\scripts\searcher and replace all files from the eslyric_source_pack.zip


Added new sources:

  • absolutelyrics.js
  • bandcamp.js
  • chartlyrics.js
  • darklyrics.js
  • elyrics.js
  • letras.js
  • lyricalnonsense.js (will only fetch Japanese lyrics)
  • lyricalnonsense_en.js (will only fetch English lyrics)
  • lyricsmania.js
  • lyricsmode.js
  • lyricstranslate.js
  • netease_en.js (will only fetch English lyrics)
  • oldielyrics.js
  • plyrics.js
  • songlyrics.js
  • stlyrics.js

Refactored:

All original script files have been refactored and cleaned:

  • azlyrics.js
  • genius.js
  • kugou.js
  • minilyrics.js
  • musixmatch.js
  • netease.js
  • qqmusic.js

Changed:

Added better name descriptions for the users that shows if the source has synced or unsynced lyrics

Fixed:

AZLyrics - fixed search query and its results when artist names start with "A" and "The".
In the old script the search results were not found.


I have tested all lyric sources and they should work properly but there is a note for you in the bandcamp.js:

	// ! Tell ohyeah to implement meta.comment ( %comment% ), meta.label ( %label% ) and meta.publisher ( %publisher% ),
	// ! then we can use this to improve bandcamp search results:
	// const commentUrl = getUrlFromTags(meta.comment);
	// const labelUrl = getUrlFromTags(meta.label);
	// const publisherUrl = getUrlFromTags(meta.publisher);

	// const url =
	// 	commentUrl !== '' ? `https://${commentUrl.replace(/-/g, '')}.bandcamp.com/track/${title}` :
	// 	labelUrl !== '' ? `https://${labelUrl.replace(/-/g, '')}.bandcamp.com/track/${title}` :
	// 	publisherUrl !== '' ? `https://${publisherUrl.replace(/-/g, '')}.bandcamp.com/track/${title}` :
	// 	`https://${artist.replace(/-/g, '')}.bandcamp.com/track/${title}`;

To explain:
bandcamp search query only works if the artist name is the same as url subdomain.
But there are artist that do not have their exact bandname in the bandcamp subdomain.
Many bandcamp music files have their URL to their bandcamp site in either the %comment%, %label% or %publisher%.
So if you could implement meta.comment, meta.label, meta.publisher we could use the embedded url to have better search results.
It will search for the url in these tags via getUrlFromTag(tag) func and use this url instead. I think this would work, but it needs to be tested...


You can also close this issue here #76, thanks!
Hope your doing fine.

-Tom

@TT-ReBORN TT-ReBORN changed the title New lyric sources pack for ESLyric New lyric source pack for ESLyric Sep 17, 2023
@ESLyric
Copy link
Owner

ESLyric commented Sep 18, 2023

Thanks!! I'll take a look when I have time.
Maybe I'll provide another interface later which can be called in main thread, so we can do any title format things.

@TT-ReBORN
Copy link
Author

@ESLyric,

Hi ohyeah,
here are the refactored lyric parser: parser_refactored.zip

That is all for now, cheers.

-Tom

@ESLyric
Copy link
Owner

ESLyric commented Sep 23, 2023

updated. now you can download from the online fetcher.

@TT-ReBORN
Copy link
Author

Thanks ohyeah, don't forget the lyric parser js files from the post above.

@ESLyric
Copy link
Owner

ESLyric commented Sep 24, 2023

Hi, I think the original parsers are barely ok.

@TT-ReBORN
Copy link
Author

TT-ReBORN commented Oct 21, 2023

@ESLyric,

Hi ohyeah,

here is a new ESLyric source pack 2:
eslyric_source_pack2.zip

Contains 4 new lyric sources:

  • Lololyrics
  • LyricsOnDemand
  • Metallum
  • SongMeanings

and here is the new minilyrics_v0.4 ( suppress error log when server is down ):
eslyric_source_minilyrics_v0.4.zip

Did test those a bit and all seems OK.
This is it for now ( at least from my side ), we now have more than enough ;-)

-Tom

@ESLyric
Copy link
Owner

ESLyric commented Oct 21, 2023

@ESLyric,

Hi ohyeah,

here is a new ESLyric source pack 2: eslyric_source_pack2.zip

Contains 4 new lyric sources:

  • Lololyrics
  • LyricsOnDemand
  • Metallum
  • SongMeanings

Did test those a bit and all seems OK. This is it for now ( at least from my side ), we now have more than enough ;-)

-Tom

@TT-ReBORN ok, added to online downloader.

@sveakul
Copy link

sveakul commented Oct 21, 2023

Thanks for the new scripts, but Metallum hasn't worked at all over here. Placed at the top of the searcher list, and using LSP3-foo_multisource as a reference, every song found at Metallum by LSP3 is not found there by the metallum.js searcher. Some examples of the unfound songs and their lyrics as linked at Metal Archives:

Darkwell - Suspiria
https://www.metal-archives.com/release/ajax-view-lyrics/id/125875

Reaper - 1943
https://www.metal-archives.com/release/ajax-view-lyrics/id/2997907

Misery Loves Co. - 2 Seconds
https://www.metal-archives.com/release/ajax-view-lyrics/id/78190

Kaunis Kuolematon - Hurskas
https://www.metal-archives.com/release/ajax-view-lyrics/id/4143391

Danzig - Until You Call on the Dark
https://www.metal-archives.com/release/ajax-view-lyrics/id/861239

Had high hopes for this one and I hope it can be fixed.

@TT-ReBORN
Copy link
Author

TT-ReBORN commented Oct 21, 2023

I can find all lyrics for all the songs you have listed via the metallum searcher script.
It just need to have the same album title as on the site, e.g:
https://www.metal-archives.com/search/advanced/searching/songs?songTitle=Suspiria&bandName=Darkwell&releaseTitle=&lyrics=&genre=#songs

If the artist, album and title are the same as on the website, it will find them.

metallum_results

@TT-ReBORN
Copy link
Author

TT-ReBORN commented Oct 22, 2023

@ESLyric,

here is the last one ( deezer ) as a bonus. Tested it, but you need to add your own API key and cookie to make it work.
Now it contains only placeholders, you can decide what to do with it.

eslyric_source_deezer.zip

deezer has synced and unsynced lyrics, so I have added the description "Mixed".
That is all.

-Tom

@sveakul
Copy link

sveakul commented Oct 22, 2023

I should have mentioned that the Metallum search failures were all done using ESLyric on radio streams, not files, which almost never include an ALBUM name in their metadata. I was able to modify the metallum.js in the new package myself by removing album name from the search expression and from the "if.." statement 2 lines below it. The "const album =.." line can also be removed if desired. Now I am getting plenty of hits from radio streams on Metal Archives! A zip containing my modified metallum.js is attached for anyone interested

Just as a FYI I found that if the search done on the website returns hits from different releases from the band (EPs, etc) that contained the same song, some of the releases may not show the lyrics while others do. In these cases, the search produces results from the first album in the list only and does not "travel" the others, even if the first listed has no lyrics and the second listed does. I imagine accounting for this in a searcher script would be too complicated to worry about. Somehow, foo_multisource is able to do this.

The other 3 new scripts work fne with radio streams as-is. THANK YOU TT-ReBORN! Off to give deezer a try now :)
metallum mod.zip

@TT-ReBORN
Copy link
Author

TT-ReBORN commented Oct 22, 2023

Yes, I have included the album meta data to improve search results accuracy. Did not account for radio streams though as I never use them with lyrics. ohyeah could implement a new callback that checks if current playback is streaming. Then we could add conditional statement to use or not use album meta in the search.


@ESLyric,

just found out about meta.rawTitle in your Chinese docs. I have made a workaround in the lololyrics script that is sub-optimal. With meta.rawTitle it has much better search results. The issue is that it works on automatic search BUT when you do ESLyric Lyric Search, the meta.rawTitle will be processed. This seems like a bug, meta.rawTitle should always be unprocessed ( no stripping of special chars, i.e apostrophes, commas, dots etc ). Using the latest ESLyric version 0.5.4.1019

Example:
console.log(meta.rawString); outputs God's Child
when using Lyric Search:
console.log(meta.rawString); outputs Gods Child
It has stripped the apostrophe, this was just an example.

Also cfg.useRawMeta = true; does not matter...

Can you please fix this first? After that, I will then send you lololyrics.js v0.2.

-Tom

@ESLyric
Copy link
Owner

ESLyric commented Oct 22, 2023

I haven't seen any preprocess when manual search
image

@TT-ReBORN
Copy link
Author

TT-ReBORN commented Oct 22, 2023

Weird, I did check with original foobar and your original ESLyric and I can reproduce it.
Here is the new improved lololyrics script v0.2

I do not see any issues in the script...

See here:
meta rawTitle

@TT-ReBORN
Copy link
Author

TT-ReBORN commented Oct 22, 2023

Ok I have found the issue, when I deactivate ESLyric option Remove Characters, it works:

Animation

But this should be ignored for meta.rawArtist, meta.rawAlbum, meta.rawTitle
Don't you think?

@ESLyric
Copy link
Owner

ESLyric commented Oct 22, 2023

I checked also, the raw version are all expected.

@TT-ReBORN
Copy link
Author

TT-ReBORN commented Oct 22, 2023

@ESLyric, I have posted a video in the previous post that you can see.
It is the ESLyric option "Remove Characters" that also changes the meta.rawTitle.
I have console.logged this also and it changes to the correct one "God's Child" when I deactivate "Remove Characters".
If "Remove Characters" option is active, console.logged meta.rawTitle is "Gods Child".

@ESLyric
Copy link
Owner

ESLyric commented Oct 22, 2023

Yes, the 'Edit' field's initial values still are preprocessed by design(Most sources are suitable). When request manully, metadbs were override by the 'Edit' fileds.

@TT-ReBORN
Copy link
Author

TT-ReBORN commented Oct 22, 2023

OK but can you disable/ignore this for meta.rawArtist, meta.rawAlbum, meta.rawTitle for raw meta?
These should always be raw ( makes sense ) and not preprocessed? Otherwise if meta.rawTitle is not raw but preprocessed, forget the lololyrics v.0.2 zip ( although it has better search results ) I have posted as it will not work ( only when doing manual Lyric Search ) and use v0.1. The choice and effort is yours...

It should only use the preprocess for meta.artist, meta.album, meta.title but not when using raw meta.

-Tom

@ESLyric
Copy link
Owner

ESLyric commented Oct 22, 2023

The preprocess fileds are used as the initial values only when manual searchin, you can edit them. For example, if you changed the Title edit field to 'xxxx', the meta.title and meta.rawTitle will be 'xxxx'. In most cases, the preprocess values should be more convenient.

@TT-ReBORN
Copy link
Author

Yes I have understood this from the beginning, but why do you use the field preprocessing for meta.rawArtist, meta.rawAlbum and meta.rawTitle?
This does not make sense for raw meta, it should be not preprocessed and meta.rawArtist, meta.rawAlbum and meta.rawTitle should always be RAW ( original values ) and not processed via the ESLyric "Field processing" settings.

So I ask again, can you only exclude/disable ESLyric Field processing for meta.rawArtist, meta.rawAlbum and meta.rawTitle but only enable it for meta.artist, meta.album, meta.title?
I do not want that meta.rawArtist, meta.rawAlbum and meta.rawTitle being processed when ESLyric Field processing option "Remove Characters" is active and when doing manual Lyric Search as you see in the video. I do not see any problems in changing that behavior.

Thanks for understanding.

-Tom

@ESLyric
Copy link
Owner

ESLyric commented Oct 22, 2023

When manully search, the raw metas were not related with track's metadb, they repected the input fileds only(except album which cannot editable), it shouldn't use the track's original metadb in case of empty filelds or wrong infos.

So actually the initial value cause the 'issue'. As I said, Use the preprocess value as the initial values would be more conventient in most cases when search manully. If you cannot fetch the result, you should try different keywords any ways.

@Lovecraft-github
Copy link

Lovecraft-github commented Oct 22, 2023

Hi there people. Great to see more lyrics sources.
I have some problems with minilyrics.js
The console spawn
[eslyric]script search service: eval script failed, RangeError: invalid array length at set (native) at concatTypedArray (Z:/home/user/.foobar2000_v2/profile/eslyric-data/scripts/searcher/minilyrics.js:147) at encryptBuffer (Z:/home/user/.foobar2000_v2/profile/eslyric-data/scripts/searcher/minilyrics.js:88) at getLyrics (Z:/home/user/.foobar2000_v2/profile/eslyric-data/scripts/searcher/minilyrics.js:33)

Also some
[eslyric]TypeError: out-of-bound numeric index
when the search starts.

@TT-ReBORN
Copy link
Author

@Lovecraft-github,

happens when MiniLyrics server is down.
I have just uploaded a new version to suppress the error log nobody wants to see...
#115 (comment)

@TT-ReBORN
Copy link
Author

@ESLyric,

OK I get it now, this was so confusing ohyeah. Sorry :( , but you could have told me from the beginning to just check console.log when changing the title in the "Lyric Search" input field, took me long to figure it out...

Anyways thanks for the help. I have uploaded the new improved lololyrics.js here #115 (comment)
It is in the updated eslyric_source_pack2.zip , so please update yours and also the new minilyrics 0.4.

Thanks

-Tom

@Lovecraft-github
Copy link

Error log gone.
Thanks mate

@Lovecraft-github
Copy link

Lovecraft-github commented Oct 22, 2023

One more question.
Sometimes i have "Sorry, I have no, would you please to me? Thank You." as lyric.
Is there any way to filter this?

@ESLyric
Copy link
Owner

ESLyric commented Oct 23, 2023

@TT-ReBORN Please issue a PR instead, thanks.

@TT-ReBORN
Copy link
Author

An idea to filter out garbage lyrics would be to make an ESLyric blacklist filter feature where user can input these strings
and ESLyric could completely ignore these lyrics.

@ESLyric
Copy link
Owner

ESLyric commented Oct 24, 2023

You can remove lyric lines that meet the conditions. when no lines left, the lyric would be filtered.
For example:
0
Which will remove lines begin with Sorry.

@Lovecraft-github
Copy link

You can remove lyric lines that meet the conditions. when no lines left, the lyric would be filtered. For example: 0 Which will remove lines begin with Sorry.

So no line no lyric xD
Thanks

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

No branches or pull requests

4 participants