Kodi Community Forum
Release CU LRC Lyrics - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Lyrics Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=146)
+---- Thread: Release CU LRC Lyrics (/showthread.php?tid=147340)



RE: CU LRC Lyrics - manfeed - 2016-08-09

Hi Ronie, when displaying a non-lrc lyrics obviously I have to move lines with arrow keys, but since now I don't see the next line coming I have a problem with empty lines... how could I make do so that empty lines get skipped? My goal is to make sure that with every keystroke you always get a line of true lyrics...

Thanks in advance for your help!


RE: CU LRC Lyrics - ronie - 2016-08-09

i don't think there's a way to skip empty lines.

you probably can detect if a line is empty by using IsEmpty() / String.IsEmpty() (depending on your kodi version).
not sure if that would be useful to you...


RE: CU LRC Lyrics - elra - 2016-08-18

Hello, if I want to change some keymap settings for when the Lyrics screen is up while playing music, what is the subsection in keyboard.xml? (for instance <Visualisation> when music is playing without the lyrics screen), thanks!

I also tried following the instructions of former posts, trying to get <z>XBMC.RunScript(script.cu.lrclyrics)</z> or variations to work in Visualisation (as that's the only subsection it works from right? I tried MusicOSD too) but I can't get it to work, can anyone clarify as to how the correct method is?


RE: CU LRC Lyrics - ronie - 2016-08-18

(2016-08-18, 21:12)elra Wrote: Hello, if I want to change some keymap settings for when the Lyrics screen is up while playing music, what is the subsection in keyboard.xml? (for instance <Visualisation> when music is playing without the lyrics screen), thanks!

i don't think that's possible. afaik kodi doesn't offer a way to modify keymappings for addon windows.


RE: CU LRC Lyrics - elra - 2016-08-18

(2016-08-18, 21:36)ronie Wrote:
(2016-08-18, 21:12)elra Wrote: Hello, if I want to change some keymap settings for when the Lyrics screen is up while playing music, what is the subsection in keyboard.xml? (for instance <Visualisation> when music is playing without the lyrics screen), thanks!

i don't think that's possible. afaik kodi doesn't offer a way to modify keymappings for addon windows.

Oh i see, no problem, any idea about starting the addon with a button shortcut? Thanks!


RE: CU LRC Lyrics - ronie - 2016-08-18

RunScript(script.cu.lrclyrics)


RE: CU LRC Lyrics - elra - 2016-08-19

(2016-08-18, 22:50)ronie Wrote: RunScript(script.cu.lrclyrics)

Thanks ronie got it to work!


RE: CU LRC Lyrics - bes3 - 2016-08-23

hi,
thank for cu lrc. it works really well with an internet connected kodi box, auto magically downloading the lyrics, very very nice.

i'm trying to also use it on a non-internet connected kodi box, is there any reason cu lrc should not work, that it requires an internet connection?

i can't get local lookups to work... i've tried naming the .lrc and .txt files the exact same name as the .mp3 file and they are sitting right next to the mp3s . i've tried naming the lyrics files various other permutations, thinking it might have to match mp3 metadata instead of the filename but no luck, any ideas?

EDIT: Despite the CU LRC dialog that pops up that says: "CU LRC LYRICS: NO LYRICS FOUND!", the debug log shows that the lyric file was indeed found.

Code:
08:48:43 T:140086207969024   DEBUG: script.cu.lrclyrics: Current Song: Indigo Girls - Least Complicated
08:48:43 T:140086207969024   DEBUG: script.cu.lrclyrics: searching memory for lyrics
08:48:43 T:140086207969024   DEBUG: script.cu.lrclyrics: found lyrics in memory

I will continue playing with it...

EDIT: SOLVED. For whatever reason, it would't work for me if the lyrics files were sitting alongside the music files. Instead I created a "lyrics" subfolder and set that in the prefs, and it now works.


RE: CU LRC Lyrics - black_eagle - 2016-09-11

@ronie

About two years ago I asked about the possibility of CU LRC being able to support streaming radio. Given the way that it works (pre-loading lyrics and being triggered by kodi changing tracks) it appeared that this was not possible.

However, since then I have learnt a bit of python and have modded a version that works really well with streaming radio.
PHP Code:
# we may have exited the music visualization screen
                
self.triggered False
                
# reset current lyrics so we show them again when re-entering the visualization screen
                
self.current_lyrics Lyrics()
            
xbmc.sleep(1000)
            if 
xbmc.getCondVisibility("Window.IsVisible(12006)") and xbmc.getCondVisibility("Player.IsInternetStream"):
                
self.myPlayerChanged() 
Obviously, I have had to turn off all the synchronised scrapers as the timing info would be all wrong but as you know far more about how the addon works I just wondered if you could foresee any issues with triggering the search this way ?

I also have an idea for being able to leave the synchronised scrapers turned on (so that they work for local music files) but ignoring them when streaming radio. I am hoping that adding a test for 'Player.IsInternetStream' in the relevant parts of find_lyrics and skipping if true will be enough.

Thanks btw for all your add-ons. I have learnt quite a lot by reading your code Smile


RE: CU LRC Lyrics - ronie - 2016-09-11

if i understand your changes correctly, you're now calling self.myPlayerChanged() every second?

what if you made the call a bit earlier, like this:
PHP Code:
...
                if 
not self.triggered:
                    
self.triggered True
                    
# notify user the script is running
                    
if ADDON.getSetting"silent" ) == 'false':
                        
xbmc.executebuiltin((u'Notification(%s,%s,%i)' % (ADDONNAME LANGUAGE(32004), 2000)).encode('utf-8''ignore'))
                    
# start fetching lyrics
                    
self.myPlayerChanged()
                
elif WIN.getProperty('culrc.force') == 'TRUE':
                    
# we're already running, user clicked button on osd
                    
WIN.setProperty('culrc.force','FALSE')
                    
self.current_lyrics Lyrics()
                
elif xbmc.getCondVisibility("Player.IsInternetStream"):
                    
self.myPlayerChanged() 

wouldn't that work just as well?


RE: CU LRC Lyrics - black_eagle - 2016-09-11

Thanks ronie. I'll give that a try.


RE: CU LRC Lyrics - manfeed - 2016-09-12

(2016-08-01, 22:59)ronie Wrote: i've added the following property:
Window(Home).Property(culrc.islrc) - returns 'true' when the lyrics are lrc based, empty if not.

if you want to test it, you can get culrc from the github repo: https://github.com/ronie/script.cu.lrclyrics

Hi Ronie, could you make available this update through the official repository? It works quite well!

Thanks!


RE: CU LRC Lyrics - ronie - 2016-09-12

sure, pushed an update to the krypton repo.
it includes the above fix for internet streams as well.

let me know if you come across any issues.


RE: CU LRC Lyrics - manfeed - 2016-09-12

(2016-09-12, 22:12)ronie Wrote: sure, pushed an update to the krypton repo.
it includes the above fix for internet streams as well.

let me know if you come across any issues.

Please, could it be available for the jarvis repo as well? I'm working in a mod that still run on jarvis... I have tried your last versiĆ³n from github for krypton and also works flawlessly in jarvis.

Thanks


RE: CU LRC Lyrics - mikeSiLVO - 2016-09-13

I have a question regarding auto scrolling lyrics... I use a 3 item list and some of the time it is focused on the center and some of the time it is focused on the 1st row instead of the 2nd. It seems to happen randomly on script start or if a song has no synced lyrics and the script window closes and the next song that does have one shows and it focuses the first again.

Here is the a link to the code. Just wondering if I messed something up and it can be fixed in the xml or if it is something script side... Huh

Thanks.