Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_uie_lyrics3 (Read 880437 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: foo_uie_lyrics3

Reply #1900
Is it possible to automatically save the lyric .lrc/txt to folder immediately after a successful search?
Select, context menu, Download lyrics will batch download and save them. Although with separate window and more steps.

Do you mean by manually left click in the lyric panel and click save? I don't need this, I need the process to be fully automated, because I don't use the panel itself only it's fetch function...

In ESLyric there is a option ( Foobar -> Tools -> ESLyric ) called: Lyric save scheme: Save when loaded. I need the same option also in Lyric Show 3. That's what I am looking for.

I have a SMP script you may find useful.
It runs the command "View/Lyrics Show 3/Save" at a interval (1sec) until Lyric Show 3 downloads the lyrics.
It then reloads ESLyric and kills the timer.

Code: [Select]
"use strict";

window.DefinePanel('LS3 File Saver', {
    author: 'zeremy'
});

let esl;
let eslyric;

if (utils.CheckComponent("foo_uie_eslyric")){
    eslyric = true;
    esl = new ActiveXObject("ESLyric");
}

let artist;
let title;

function on_playback_new_track(metadb) {
    ls3_save(metadb);
}

function on_playback_dynamic_info_track() {
    ls3_save(fb.GetNowPlaying());
}

function ls3_save(metadb) {
    if (!metadb)
        return;
    let timer = setInterval(() => {
            let path = fb.TitleFormat('$if2(%__@%,%path%)').EvalWithMetadb(metadb);
            if (path.startsWith('http') || path.startsWith('mms')) {
                artist = fb.TitleFormat("[%artist%]").Eval().replace(/[<>:"/\\|?*]/g, "_");
                title = fb.TitleFormat("[%title%]").Eval().replace(/[<>:"/\\|?*]/g, "_");
            } else {
                artist = fb.TitleFormat("[%artist%]").EvalWithMetadb(metadb).replace(/[<>:"/\\|?*]/g, "_");
                title = fb.TitleFormat("[%title%]").EvalWithMetadb(metadb).replace(/[<>:"/\\|?*]/g, "_");
            }
            let filename_lrc = fb.ProfilePath + "lyrics\\" + artist + " - " + title + ".lrc";
            let filename_txt = fb.ProfilePath + "lyrics\\" + artist + " - " + title + ".txt";
            if (utils.FileExists(filename_lrc) || utils.FileExists(filename_txt)) {
                if (eslyric) esl.RunPanelContextMenu("Reload Lyric");
                clearInterval(timer);
            }
            else {
                fb.RunMainMenuCommand("View/Lyrics Show 3/Save");
            }
        }, 1000);
}

Re: foo_uie_lyrics3

Reply #1901
Thank you so much @zeremy !

I have modified your code and it works beautiful! Will credit you for sure =).

Re: foo_uie_lyrics3

Reply #1902
Do you mean by manually left click in the lyric panel and click save? I don't need this, I need the process to be fully automated, because I don't use the panel itself only it's fetch function...
No, not lyrics panel, you select a list of tracks in playlist view, right click - Download lyrics - batch lyric search window appears, lyrics are downloaded and saved for selected tracks.

Re: foo_uie_lyrics3

Reply #1903
Hi,

It's been a little while since my last message. I know that veksha has done since a much more elaborated work with more sources packaged in an all-in-one component, but as I previously said, I wanted anyway to backport my JS code to retrieve MusixMatch lyrics into a fb2k component... And I've finally find some time this week to finish a fully working version that I'm sharing here. :)

I had to spend a lot of time to fix crashes when dealing with MusixMatch results sometimes not structured as expected. I think I nuked now any possible case, but if you give my component a try and still encounter such a crash, please let me know with which artist and track it happens. ;)

As a little bonus, it should not be necessary with my version to mess with the user token as it automatically attempts to generate a fresh one. But if for some reasons, you need to reset it or just want to use a custom one, you can access it in foobar's advanced config, under Tools then MusixMatch source.

Re: foo_uie_lyrics3

Reply #1904
Thank you cedricpc for this plugin!  It complements Veksha's work, good to have both.  I hope you will consider making one for this site too:
http://www.songlyrics.com/

Re: foo_uie_lyrics3

Reply #1905
Can someone tell me where you're supposed to download the new plugin sources to? I've done it before but I can't find where there supposed to go now.

Re: foo_uie_lyrics3

Reply #1906
Unless I'm not understanding your question correctly, you just load them like a component.  And all you probably need is foo_multisource.

Re: foo_uie_lyrics3

Reply #1907
Can someone tell me where you're supposed to download the new plugin sources to? I've done it before but I can't find where there supposed to go now.

You need to install this https://drive.google.com/file/d/18fgiVBI3SqBRlytGgNOpqPxtuU_yy2nc/view
Then, after installing the component remove the other sources from settings and add the sources from this component (genius, azlyrics, musixmatch, lololyrics , minilyrics, qq, darklyrics)

Re: foo_uie_lyrics3

Reply #1908
Unless I'm not understanding your question correctly, you just load them like a component.  And all you probably need is foo_multisource.
Can someone tell me where you're supposed to download the new plugin sources to? I've done it before but I can't find where there supposed to go now.

You need to install this https://drive.google.com/file/d/18fgiVBI3SqBRlytGgNOpqPxtuU_yy2nc/view
Then, after installing the component remove the other sources from settings and add the sources from this component (genius, azlyrics, musixmatch, lololyrics , minilyrics, qq, darklyrics)
Thanks guys. I was actually trying to copy my configuration (with musixmatch already setup) from one foobar to another install, and thought these were loaded as scripts or something. Got it working now.

Re: foo_uie_lyrics3

Reply #1909
I'm not able to get local file search working. Could someone assist?

I have a decent collection of live tracks from a few of my favorite bands. Since they're all identically tagged with regard to artist and track, I want to have one copy of the lyrics which applies to all of those tracks. So, a very simple test case: The Allman Brothers Band - Statesboro Blues (Live). I've got quite a few of those, all with identical artist and title tags.

In my lyric searching preferences, artist is simply %artist%, and title %title%. "No preference" selected for type of lyric. Only local file and associations are enabled. Under lyric saving, automatic save is enabled, the filename format is %artist%\%title% and the custom directory is T:\Music\Lyrics. In the local file search properties, I have box boxes checked, with custom filename format of %artist%\%title% and custom search path of T:\Music\Lyrics\

The file exists, "T:\Music\Lyrics\The Allman Brothers Band\Statesboro Blues (Live).txt" is ready to go. It just does not read the file.

Curiously, I can play a copy of the song and edit the lyrics in, and it'll save that file for me, and in the right directory. And it'll even create the file association *for that one track*, and lyrics will show each time I come back to it. But if I play any of the other copies of the song I have, it doesn't find the file. The intent would obviously not be to have to manually edit lyrics for each copy of Statesboro Blues, rather for it to pull that file out of T:\Music\Lyrics\ each time that artist and song is played.

One last thing, just to drive home that I'm sure it's at least looking in the right location for a file. I can play 1 version of Statesboro, and edit in the right lyrics and it creates the text file. I play version 2, it finds nothing, so I edit in an entirely different (wrong) lyric. It updates the same text file. I then go back to play version 1 again, and it will now display the lyrics from version 2. Therefore, I know it's looking at that file once the file association is made, I just can't get it to find the file on its own.

Long winded post I know, but I wanted to be thorough? Any help please?

Re: foo_uie_lyrics3

Reply #1910
In the local file search properties, I have box boxes checked, with custom filename format of %artist%\%title%
I'm guessing because my brain froze couple of times reading it that:
if the file name is "Statesboro Blues (Live).txt" and the track title is "Statesboro Blues (Live)" than in file search properties - lyrics filename format - custom filename there should be only %title%.

Re: foo_uie_lyrics3

Reply #1911
In the local file search properties, I have box boxes checked, with custom filename format of %artist%\%title%
I'm guessing because my brain froze couple of times reading it that:
if the file name is "Statesboro Blues (Live).txt" and the track title is "Statesboro Blues (Live)" than in file search properties - lyrics filename format - custom filename there should be only %title%.
No luck there. I changed it to only %title%, no change. Also tried [%title%], %title%.txt, [%title%].txt, and all the above combinations including the artist tag. Still won't find the file on songs that don't have the association already.

Re: foo_uie_lyrics3

Reply #1912
No luck there. I changed it to only %title%, no change. Also tried [%title%], %title%.txt, [%title%].txt, and all the above combinations including the artist tag. Still won't find the file on songs that don't have the association already.
IMO it should be %title% anyway (with "Enable built-in artist-title search" checked), or to be precise the same format as in lyrics saving tab - Filename format. Presumably that's also a file format of saved lyrics.

I've run out of ideas, it's not a rocket science, there's a path and a file format:
- You can try removing associations: Associations search - Properties - Remove all.
- Double check paths, I assume "Search sub-directories" is checked
- What about online search? I'd backup lyrics, remove them all, search for lyrics online, check where and how they are saved, if search format is %title% and file format is title.txt component should fine them.


Re: foo_uie_lyrics3

Reply #1913
I agree, it's not rocket science, yet there it is, not doing it.

I removed all references to 'artist' so now it just saves the file as T:\Music\Lyrics\Statesboro Blues.txt and other copies of the song still don't create the file association on their own. Search sub-directories is checked.

If someone can get local file search to create file associations, I'd love to see how you did it.

Re: foo_uie_lyrics3

Reply #1914
How about creating associations by opening lyrics manually (right click - Choose lyrics...) for every version of the song?

Re: foo_uie_lyrics3

Reply #1915
Figured it out, thank goodness. The key was local file search. Custom filename format %title%.txt, custom search path T:\Music\Lyrics\%artist%. With all the combinations I've tried, I'm shocked that wasn't one I tried already, but whew, that's done and dusted.

 

Re: foo_uie_lyrics3

Reply #1916
v0.5 leaks 3 GDI objects per track. Could someone please fix that?

You can show the number of GDI objects per process in the Task Manager. I had this lyrics panel embedded, and foobar got to 6k or 9k GDI objects, at which point UI in other programs began to slow down. A workaround is to restart foobar or to keep the panel in a separate window and to close it from time to time.

Re: foo_uie_lyrics3

Reply #1917
@cedricpc  Only yesterday I started using your extension, so I was pleased with several successful searches for synchronized text. Today I found that I was pulling the inappropriate text - HIM-Tears on Tape-Kiss the Void uploaded by KISS-Psycho Circus - Into the Void

*I also want to note that the first line is always empty

And so perfectly pulls the lyrics, I like the fact that there is no dirt in the files

Re: foo_uie_lyrics3

Reply #1918

Re: foo_uie_lyrics3

Reply #1919
v0.5 leaks 3 GDI objects per track. Could someone please fix that?

You can show the number of GDI objects per process in the Task Manager. I had this lyrics panel embedded, and foobar got to 6k or 9k GDI objects, at which point UI in other programs began to slow down. A workaround is to restart foobar or to keep the panel in a separate window and to close it from time to time.
Probably a stupid question, but what does leaking GDI objects mean? What consequences does it have?


Re: foo_uie_lyrics3

Reply #1921
@veksha,
thanks for your hard work. I noticed that after several successful attempts to find lyrics for different tracks (about 10 times or a little more), the search process does not stop.
If in the process of searching for lyrics, you try to shut down the fb2k, this will lead to its freezing.

Re: foo_uie_lyrics3

Reply #1922
updated my foo_multisource (lyrics from genius, musixmatch, minilyrics, qq, darklyrics, azlyrics, lololyrics)
FIXED: musixmatch search was too slow for some reason.
download v0.32 here: https://www.reddit.com/r/foobar2000/comments/kl1ipj/lyric_show_panel_3_lyrics_from_genius_musixmatch/

Thanks Veksha!  Any chance of adding http://www.songlyrics.com/ ?

Re: foo_uie_lyrics3

Reply #1923
Is there any way to temporarily disable the lyric search for when streaming audio/radio stations so as to primarily save on data costs searching for lyrics that don't exist (like for example, strictly radio stations, non-vocal audio streaming, etc.)?

Re: foo_uie_lyrics3

Reply #1924
Is there any way to temporarily disable the lyric search for when streaming audio/radio stations so as to primarily save on data costs searching for lyrics that don't exist (like for example, strictly radio stations, non-vocal audio streaming, etc.)?

paste something like this in Search Filter (Advanced tab of LyricShow3 settings):
Code: [Select]
$strcmp($left(%path%,4),http)