Skip to main content

Notice

Please be aware that much of the software linked to or mentioned on this forum is niche and therefore infrequently downloaded. Lots of anti-virus scanners and so-called malware detectors like to flag infrequently downloaded software as bad until it is either downloaded enough times, or its developer actually bothers with getting each individual release allow listed by every single AV vendor. You can do many people a great favor when encountering such a "problem" example by submitting them to your AV vendor for examination. For almost everything on this forum, it is a false positive.
Topic: foo_uie_lyrics3 (Read 637878 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.

Re: foo_uie_lyrics3

Reply #1901
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.

Re: foo_uie_lyrics3

Reply #1902
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 #1903
Thank you so much @zeremy !

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

Re: foo_uie_lyrics3

Reply #1904
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 #1905
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 #1906
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/

 
SimplePortal 1.0.0 RC1 © 2008-2021