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 873812 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: foo_uie_lyrics3

Reply #1950
Can someone explain to me what the "Lyrics Show 3/Lyrics Search..." menu entry is supposed to do? It seems that without a Lyrics Show Panel in the theme, it does nothing, and with a LS3 panel in the theme, the panel is already automatically searching, and there's no need for this menu entry.

What I was hoping was that I would not need a LS3 panel, and that manually calling the Lyrics Search... method would retrieve the lyrics for me so that I could save them as needed. It doesn't appear that this is possible though, unless I'm missing something.

Re: foo_uie_lyrics3

Reply #1951
MordredKLB, You can try the following option:
1. Enable the "Download lyrics ..." fb2k context menu item (see attached picture lsp3_dwnll.jpg).
2. Disable the option to automatically save lyrics in the LSP3 settings (see attached picture lsp3_dwnll.jpg).
3. Use the fb2k context menu item "Download lyrics ..." with the right mouse button while playing a track.
This should save the found lyric text as You need without the LSP3 panel.

veksha, thank You so much. I will test your plugin for a while.

Re: foo_uie_lyrics3

Reply #1952
@MordredKLB

The LS3 panel works even when it it hidden.
Both menu entries (Lyrics Search.. & Download Lyrics ) display a dialog box which I believe you do not want.

Below a mod which I use in your Georgia theme.

Code: [Select]
// Automatic Lyric Show 3 File Saver

let ls3_timer = 0;

let esl;
let eslyric;

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

function lyricShow3save(metadb) {
    if (!metadb)
        return;

    displayLyrics = true;
    btns.lyrics.enable = displayLyrics;
    btns.lyrics.repaint();

    utils.WriteTextFile(fb.ProfilePath + "lyrics\\#status.txt", "");
    let counter = -1;
    const timewait = 15;

    let artist;
    let title;
    ls3_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)) {
                clearInterval(ls3_timer);
                console.log("LS3 - got lyrics");
                utils.WriteTextFile(fb.ProfilePath + "lyrics\\#status.txt", "");
if (eslyric) esl.RunPanelContextMenu("Reload Lyric");
            } else {
                counter++;
                if (counter == 15) {
                    clearInterval(ls3_timer);
                    utils.WriteTextFile(fb.ProfilePath + "lyrics\\#status.txt", "No Lyrics Found");
displayLyrics = false;
window.Repaint();
return;
                } else {
                    console.log("LS3 - save lyrics");
                    fb.RunMainMenuCommand("View/Lyrics Show 3/Save");
                    utils.WriteTextFile(fb.ProfilePath + "lyrics\\#status.txt", "Searching for lyrics... \n \n Please wait... " + (timewait - counter));
                }
            }
            initLyrics();
        }, 1000);

}

Re: foo_uie_lyrics3

Reply #1953
The LS3 panel works even when it it hidden.
:D I'm asking about this precisely because another member showed me your code and I want to add it into Georgia. Due to how I distribute my theme as just a JS file you include in FSM; for your code to work I have to ask users to add a hidden LS3 panel, and I have no way of checking if they've actually done that. Even worse, if they haven't added the panel, I'm still telling them I'm searching for lyrics even though no searching is occurring! It's super easy to check if LS3 is installed, but I don't believe there's any way to determine if a LS3 panel is actually in the theme.

Maybe that isn't the worst thing in the world, but it certainly offends my sensibilities :)

Re: foo_uie_lyrics3

Reply #1954
@veksha,
1. Searching and downloading lyrics from the web is now really fast. This has improved lyric sync for radio streams.
2. The continuous search has occurred only once at a time. It seems that this happened when re-searching for lyrics. However, fb2k exited without hanging. I will send you dump files taken during the search and cancellation process.
p/s
foo_uie_lyrics3 together with foo_multisource - now they work stably and reliably, which is very pleasing. I hope the other guys will confirm this as well.
Thank you for that!

Re: foo_uie_lyrics3

Reply #1955
@veksha:  just noticed you have .39 available now, can you comment on changes?

@Sergey77:  were you testing on .38, or the new .39?  Your results sound very promising!


Re: foo_uie_lyrics3

Reply #1957
Cool, thanks for adding songlyrics veksha!  Will be testing .39 today  :)

Re: foo_uie_lyrics3

Reply #1958
I'm afraid that .39 has been quite unstable in my testing.  When starting Foobar 1.6.5 and then starting a stream from a playlist using external tags, I had FB crash three times.  For some reason, when starting from a non-external tags URL playlist, it would begin to work normally, and when changing to the external tags playlist in the same session, NOT crash.  Then a fresh restart with the tagged list would work OK for a while, but on a new FB restart, crash again.

When the search was working, lyrics were found quickly and cycling worked.  The new Songlyrics performed brilliantly.  I did notice several cases where the multisource Musixmatch would not find a particular song, when then WAS found with the separate MusixMatch source plugin .92 (foo_uie_lyrics3_musixmatch) which I had below the Multis in my search order.

Attached are some crash reports/dumps, and two examples of Musixmatch lyrics found by the separate .92 plugin but not by the Multi.

Re: foo_uie_lyrics3

Reply #1959
I did notice several cases where the multisource Musixmatch would not find a particular song, when then WAS found with the separate MusixMatch source plugin .92 (foo_uie_lyrics3_musixmatch) which I had below the Multis in my search order.
I have musixmatch .92 plugin too and it is a solid work. but i noticed that sometimes it has no results when mine plugin have them.
you reported that you had the other way around. so i think it's just musixmatch throttling a particular token because it had too many requests. I checked your cases and they are all work fine with musixmatch from multisoure. try again. maybe change your token if you still have no results.

PS: i don't know what is "external tags URL playlist". i will try to learn about this topic and then try to reproduce your crashes on my side, @sveakul

Re: foo_uie_lyrics3

Reply #1960
Hi veksha.  The "external tags URL playlist" I mentioned is a playlist made up of normal URLs but they have been tagged with the foo_external_tags plugin so they can be organized by station name, etc..  Sergey77 also uses it.

I'm back on multisource version .35 now and it has no problems at all with the playlist and is crash-free.

OK on what you said about the musixmatch results, yes that explains things there.

I hope you can find a fix for .39 as the added songlyrics source was kickin' it  :)


Re: foo_uie_lyrics3

Reply #1961
I'm back on multisource version .35 now and it has no problems at all with the playlist and is crash-free.
I hope you can find a fix for .39 as the added songlyrics source was kickin' it  :)
@sveakul , please, try v0.40
Spoiler (click to show/hide)
also "no lyrics yet" text from songlyrics.com are now discarded.

Re: foo_uie_lyrics3

Reply #1962
2. The continuous search has occurred only once at a time. It seems that this happened when re-searching for lyrics. However, fb2k exited without hanging. I will send you dump files taken during the search and cancellation process.
I need more info about this situation. I think what you did there is you started search process for many songs at once by just pressing "next song" button very fast 10 times or more. So foo_multisource must process all of the requests one by one. that is why it is searching so slow (multisource is not designed to be multithreaded:)). As far as I know LSP3 will not notify source-plugins about events like these (next/prev track) so there is no way for me to know when to cancel search of previous track. Another thing we should consider is situation when user can simultaneously search for lyric with (batch) "download lyrics..." action and by another means like auto-searching or manual searching. so it is difficult to differentiate between them and cancel search process that is no longer needed (for previous songs that you are skipping). LSP3 source-plugin API is very limited and outdated.
At least You have no crashes, right?

Re: foo_uie_lyrics3

Reply #1963
@sveakul , please, try v0.40
Spoiler (click to show/hide)
also "no lyrics yet" text from songlyrics.com are now discarded.
Veksha I've done some brief testing with .40 and am happy (actually, excited) to say that so far, so good!!  NO CRASHES.  And was able to "Next lyrics" through several sources including songlyrics.  The only difference is the searching happens slower, but that's not a bad thing, taking a bit more time for stability is ALWAYS worth it.  I don't have more time today but will be using it again tomorrow and let you know how things go after a longer shakedown.  THANKS for not giving up on this!!

Re: foo_uie_lyrics3

Reply #1964
veksha, I tested v0.38 and there were no crashes. I will test work with External tags for the new version v0.40 (what sveakul mentioned).

 

Re: foo_uie_lyrics3

Reply #1965
veksha, I tested v0.38 and there were no crashes. I will test work with External tags for the new version v0.40 (what sveakul mentioned).
I think external-tags plugin has no impact on LSP3+multisource stability at all. That crashes were just coincidence. :)
I still have no luck reproducing continuous/infinite search on my side.

Re: foo_uie_lyrics3

Reply #1966
I still have no luck reproducing continuous/infinite search on my side.
@Sergey77
i'm disabling multi-threaded behavior of multisource.dll because my purebasic .dll code was not designed for this from the get-go.
that is definitely a cause of this slow simultaneous searches. i will eventually rewrite all code to pure c++ and the problem will go away. until then just keep in mind that foo_multisource will process search requests one-by-one in a queue and not in parallel.

Re: foo_uie_lyrics3

Reply #1967
The LS3 panel works even when it it hidden.
:D I'm asking about this precisely because another member showed me your code and I want to add it into Georgia. Due to how I distribute my theme as just a JS file you include in FSM; for your code to work I have to ask users to add a hidden LS3 panel, and I have no way of checking if they've actually done that. Even worse, if they haven't added the panel, I'm still telling them I'm searching for lyrics even though no searching is occurring! It's super easy to check if LS3 is installed, but I don't believe there's any way to determine if a LS3 panel is actually in the theme.

Maybe that isn't the worst thing in the world, but it certainly offends my sensibilities :)

Why not distribute along with the js file a default.fth  theme for DUI and default.fcl for CUI ?

Re: foo_uie_lyrics3

Reply #1968
i will eventually rewrite all code to pure c++ and the problem will go away.
@veksha
It will probably be even better. But what you have developed already works just perfect, there are no failures.
Search hangs are so rare that there is no problem.

Re: foo_uie_lyrics3

Reply #1969
@MordredKLB,
The LS3 code you added to Georgia seems to be working well.  I couldn't add a panel for LS3 because I only have one Foobar panel and it's dedicated to Georgia.  I use Flowin pop-up panels for everything else.  So I just created a new Flowin panel for LS3, shrank it to the smallest possible size and set the transparency to 95%.  I tied its activation to Georgia's Lyrics button so it's only active when I need it.  Thank you for this very useful feature and thanks to zeremy for creating the original code.


Re: foo_uie_lyrics3

Reply #1970
i will eventually rewrite all code to pure c++ and the problem will go away.
@veksha
It will probably be even better. But what you have developed already works just perfect, there are no failures.
Search hangs are so rare that there is no problem.
@Sergey77
I think i managed to make all search requests work in parallel without rewriting all code. so when you switch to next song LSP3 will immediately start searching. hangs of previous song will not stop it now.
as always, if you experience crashes - let me know.

foo_multisource v0.41
Spoiler (click to show/hide)

Re: foo_uie_lyrics3

Reply #1971
@veksha :  loaded the new .41 version and have been giving it the stress test--PERFECTION.  Faster than .40, no crashes, cycles easily through sources.  Thanks again for songlyrics.com, already found a song that ONLY that source had.  This is all using dynamic radio streams too, rapid changes didn't phase it at all.

man I think it's Miller Time for you, and well-deserved!  Thanks for all your hard work that has resurrected Foobar's lyric-finding abilities.  If we didn't already have a perfectly working Metal Archives plugin, that would be the next source I'd beg for, but hey I'm done here!!

Re: foo_uie_lyrics3

Reply #1972
@MordredKLB,
The LS3 code you added to Georgia seems to be working well.  I couldn't add a panel for LS3 because I only have one Foobar panel and it's dedicated to Georgia.  I use Flowin pop-up panels for everything else.  So I just created a new Flowin panel for LS3, shrank it to the smallest possible size and set the transparency to 95%.  I tied its activation to Georgia's Lyrics button so it's only active when I need it.  Thank you for this very useful feature and thanks to zeremy for creating the original code.
Nice. I'm unfamiliar with flowin panels, but if you're using CUI you can very easily add a vertical/horizontal splitter, throw in LS3 panel and set it to always be hidden:



Will be updating documentation at some point with this as the recommended method.

Re: foo_uie_lyrics3

Reply #1973
Why not distribute along with the js file a default.fth  theme for DUI and default.fcl for CUI ?
I suppose I could, but it feels like once I start doing that then I need to provide a zip with a components folder, and then I have to maintain that, and basically I'm lazy. I'll look into it though.

Re: foo_uie_lyrics3

Reply #1974
@veksha :  loaded the new .41 version and have been giving it the stress test--PERFECTION.  Faster than .40, no crashes, cycles easily through sources.  Thanks again for songlyrics.com, already found a song that ONLY that source had.  This is all using dynamic radio streams too, rapid changes didn't phase it at all.

man I think it's Miller Time for you, and well-deserved!  Thanks for all your hard work that has resurrected Foobar's lyric-finding abilities.  If we didn't already have a perfectly working Metal Archives plugin, that would be the next source I'd beg for, but hey I'm done here!!
metal-archives plugin is must have for me as a metalhead :)
.41 is still not stable as a rock. few crashes from time to time. but 99% of the time it's all good and fast.