my moOde Addons-Collection - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: Community (https://moodeaudio.org/forum/forumdisplay.php?fid=18) +--- Forum: Support the project (https://moodeaudio.org/forum/forumdisplay.php?fid=20) +--- Thread: my moOde Addons-Collection (/showthread.php?tid=7095) |
RE: my moOde Addons-Collection - Subsub - 12-16-2024 (12-16-2024, 04:59 PM)Stephanowicz Wrote:Fantastic- all working now. Your skill and help is greatly appreciated. Cheers(12-16-2024, 11:40 AM)Subsub Wrote: Hi Stephan, update suggestion for Song Lyrics (if you have the inclination and time obviously ). LRCGET (another great github application) scans for and embeds locally song lyrics alongside songs it identifies. Is there any way your Song Lyric addon could be updated to scan our media directories for these lrc files and output them. If none found then the addon invokes genius.com and gets the lyrics from there as before? Note : LRCGET will scan every file in your chosen directory for music files and try to download lyrics to a LRC file having the exact same name and save them to the same directory as your music files. The content of such a file eg "101-amy_winehouse-intro_-_stronger_than_me.lrc" is as follows [00:27.44] You should be Stronger Than Me [00:32.57] You been here seven years longer than me [00:37.97] Don't you know you supposed to be the man [00:42.89] Not pale in comparison to who you think I am [00:47.63] You always wanna talk it through, I don't care! [00:52.98] I always have to comfort you when I'm there [00:57.88] But that's what I need you to do, stroke my hair! [01:04.16] 'Cause I've forgotten all of young love's joy [01:09.74] Feel like a lady, and you my lady boy [01:14.63] You should be Stronger Than Me [01:19.84] But instead you're longer than frozen turkey [01:25.17] Why'd you always put me in control? [01:30.15] All I need is for my man to live up to his role [01:34.99] Always wanna talk it through, I'm ok [01:39.89] Always have to comfort you every day [01:45.24] But that's what I need you to do, are you gay? [01:51.37] 'Cause I've forgotten all of young love's joy [01:57.11] Feel like a lady, and you my lady boy [02:01.78] He said "The respect I made you earn [02:06.79] Thought you had so many lessons to learn" [02:11.62] I said "You don't know what love is, get a grip!" [02:17.57] Sounds as if you're reading from some other tired script [02:22.31] I'm not gonna meet your mother anytime [02:27.55] I just wanna grip your body over mine [02:33.24] Please, tell me why you think that's a crime [02:38.65] I've forgotten all of young love's joy [02:44.58] Feel like a lady, and you my lady boy [02:49.27] You should be Stronger Than Me [02:54.64] You should be Stronger Than Me [02:59.97] You should be Stronger Than Me [03:04.98] You should be Stronger Than Me [03:07.81] RE: my moOde Addons-Collection - Stephanowicz - 12-17-2024 Ok, I think I got it working You can use this file for testing: https://github.com/Stephanowicz/moOde-audioplayer-addons/blob/master/addons/Stephanowicz/lyrics/lyricsLocal.php The formatting is not nice - or better said: there is no formatting I wonder if one can adjust how the lirc-files look like - in Your example the songpositions are integrated, which is interesting for displaying the verses according to the current song position - but not so much for just viewing, as they also don't have any formatting like paragraphs. Would be nice if You could test it and give feedback! Cheers, Stephan PS: by testing I also found a bug I didn't notice, yet PPS: mistakenly used ".lirc" instead of ".lrc" as extension - corrected it now RE: my moOde Addons-Collection - Subsub - 12-20-2024 (12-17-2024, 05:25 PM)Stephanowicz Wrote: Ok, Hi Stephan, the change works well. The only inconsistency is that the lyrics displayed for any song with a local .lrc file displays the lyrics with the adjacent 'timecode' eg it displays "[02:33.24] Please, tell me why you think that's a crime" and not "Please, tell me why you think that's a crime". Apart from that it is consistent across the board. Thanks for your time on this. RE: my moOde Addons-Collection - Stephanowicz - 12-20-2024 (12-20-2024, 03:55 PM)Subsub Wrote: Hi Stephan, the change works well. The only inconsistency is that the lyrics displayed for any song with a local .lrc file displays the lyrics with the adjacent 'timecode' eg it displays "[02:33.24] Please, tell me why you think that's a crime" and not "Please, tell me why you think that's a crime". Apart from that it is consistent across the board. Thanks for your time on this. Hi, it took a while till I understood - I thought You asked me why I think it's a crime xDD Well, it's not a crime, just again my mistake with ".lirc" You can simply correct it in line 44: Code: if($info['extension']=="lirc"){ just replace the "lirc" with "lrc" or download the file - I just corrected it. (https://github.com/Stephanowicz/moOde-au...sLocal.php) Cheers, Stephan RE: my moOde Addons-Collection - Stephanowicz - 12-21-2024 UPDATE: The fix I made for finding the filename in the title is not truely correct - one needs to check in both directions, as the filename could be longer than the title (like with "lirc" files) and the other way - the filename is shorter as the Title (or same lenth) - which should be the normal case. So again a (hopefully last) fix : (https://github.com/Stephanowicz/moOde-audioplayer-addons/blob/master/addons/Stephanowicz/lyrics/lyricsLocal.php) Also corrected code to check "argv" correctly Cheers, Stephan PS: will try to integrate the lrc-webapi and als extend the settings page to enable lyrics for local files only RE: my moOde Addons-Collection - Nutul - 12-21-2024 (12-21-2024, 10:21 AM)Stephanowicz Wrote: UPDATE: From a pure developer's point of view, I would entirely ignore the music file metadata; and ONLY search for an exact filename match, the extension being ".lrc" or ".lirc". RE: my moOde Addons-Collection - Stephanowicz - 12-21-2024 (12-21-2024, 01:51 PM)Nutul Wrote: From a pure developer's point of view, I would entirely ignore the music file metadata; and ONLY search for an exact filename match, the extension being ".lrc" or ".lirc". Not sure if I got You right - are You talking about "Artist" and "Title" when speaking of "music file metadata" ? Well, I think this data should be more reliable than the name of the musicfile... RE: my moOde Addons-Collection - Stephanowicz - 12-21-2024 UPDATE v1.0.13 Releases · Stephanowicz/moOde-audioplayer-addons Added support for the LRCLIB Lyrics-API (https://lrclib.net/) Also it is now possible to enable the songlyrics option without meeting the requirements for the web-api queries - in case You have local .txt or .lrc lyric-files. Cheers, Stephan RE: my moOde Addons-Collection - Nutul - 12-21-2024 (12-21-2024, 06:18 PM)Stephanowicz Wrote:(12-21-2024, 01:51 PM)Nutul Wrote: From a pure developer's point of view, I would entirely ignore the music file metadata; and ONLY search for an exact filename match, the extension being ".lrc" or ".lirc". Of course the metadata info is expected to be more correct/complete of a filename composed with it. But I meant: if the lyrics are on an external file, you should look for a file with the same name as the music one, and extension ".lrc", like: Eagles - Hotel California.flac Eagles - Hotel California.lrc which is basically the same as aaa.flac + aaa.lrc, no matter what track of what album of what artist the aaa.flac file is... RE: my moOde Addons-Collection - Stephanowicz - 12-21-2024 (12-21-2024, 06:59 PM)Nutul Wrote:(12-21-2024, 06:18 PM)Stephanowicz Wrote:(12-21-2024, 01:51 PM)Nutul Wrote: From a pure developer's point of view, I would entirely ignore the music file metadata; and ONLY search for an exact filename match, the extension being ".lrc" or ".lirc". Yes, if the files (both music and lyrics) are named like that... In the case of the .lrc file that subsub provided it's "101-amy_winehouse-intro_-_stronger_than_me.lrc" - so one can not expect that the files are named "properly". But I think the php "stripos" function is sufficiant in most cases. Cheers, Stephan |