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 - Caesarius - 2023-12-16

Hi,

I also have the same problems. I have the artist slideshow working now I'm still struggling with the lyrics script. I installed the 6.6.0 version but still no success.
Here is the error:
2023-12-15 22:13:03.756 T:29325 INFO <general>: CPythonInvoker(0, /opt/Kodi19L/share/kodi/addons/inputstream.ffmpegdirect/resources/lib/runner.py): script successfully run 2023-12-15 22:13:03.792 T:29325 INFO <general>: Python interpreter stopped 2023-12-15 22:13:04.847 T:29326 ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <class 'SyntaxError'> Error Contents: future feature annotations is not defined (__init__.py, line 28) Traceback (most recent call last): File "/opt/Kodi19L/.kodi/addons/script.cu.lrclyrics/default.py", line 17, in <module> gui.MAIN() File "/opt/Kodi19L/.kodi/addons/script.cu.lrclyrics/lib/gui.py", line 12, in __init__ self.get_settings() File "/opt/Kodi19L/.kodi/addons/script.cu.lrclyrics/lib/gui.py", line 69, in get_settings exec ('from lib.culrcscrapers.%s import lyricsScraper as lyricsScraper_%s' % (scraper, scraper)) File "<string>", line 1, in <module> File "/opt/Kodi19L/.kodi/addons/script.cu.lrclyrics/lib/culrcscrapers/lyricscom/lyricsScraper.py", line 6, in <module> from bs4 import BeautifulSoup File "/opt/Kodi19L/.kodi/addons/script.module.beautifulsoup4/lib/bs4/__init__.py", line 37, in <module> from .builder import ( File "/opt/Kodi19L/.kodi/addons/script.module.beautifulsoup4/lib/bs4/builder/__init__.py", line 9, in <module> from bs4.element import ( File "/opt/Kodi19L/.kodi/addons/script.module.beautifulsoup4/lib/bs4/element.py", line 12, in <module> from bs4.css import CSS File "/opt/Kodi19L/.kodi/addons/script.module.beautifulsoup4/lib/bs4/css.py", line 5, in <module> import soupsieve File "/opt/Kodi19L/.kodi/addons/script.module.soupsieve/lib/soupsieve/__init__.py", line 28 from __future__ import annotations ^ SyntaxError: future feature annotations is not defined -->End of Python script error report<-- 2023-12-15 22:13:04.950 T:29326 INFO <general>: Python interpreter stopped 2023-12-15 22:13:09.732 T:29337 INFO <general>: initializing python engine.

What is wrong please?
Thank you kindly.


CU LRC Lyrics - Saving for future use. - themusj - 2024-01-29

"--you can optionally save them to a file for future use."

I just started using this plugin (just started using the Music section of Kodi, but been using the video section for years). I really appreciate it and what it does.

Do I understand this sentence correctly that .lrc files {the lyrics) can be exported or saved? I was hoping this meant I could export the lyrics to songs in a separate folder where each album is, but I cannot find the option. 

Thank you!


RE: CU LRC Lyrics - Caesarius - 2024-01-29

Hi,

Just to let you know I've got it to work again.
Here is the info:
https://forum.qnap.com/viewtopic.php?p=856257#p856257

Hope it helps.

Cheers
Caesar


RE: CU LRC Lyrics - Saving for future use. - ronie - 2024-01-29

(2024-01-29, 00:17)themusj Wrote: "--you can optionally save them to a file for future use."

I just started using this plugin (just started using the Music section of Kodi, but been using the video section for years). I really appreciate it and what it does.

Do I understand this sentence correctly that .lrc files {the lyrics) can be exported or saved? I was hoping this meant I could export the lyrics to songs in a separate folder where each album is, but I cannot find the option. 

Thank you!

when lyrics get downloaded by the addon, it can save them to disk as well.
thee settings should do the trick:

Image


RE: CU LRC Lyrics - sagrath - 2024-02-02

Is there any way to prevent the addon from running when playing music from an addon like YouTube Music?
I ask because every time I go into music viewing mode, Kodi freezes and closes
When I deactivate the option to search for lyrics in the same folder as the music file, the crash does not occur. My lyrics are saved in the same folder as the music file. I believe that, as the addon does not find the lyrics file because the music file does not exist, this crash ends up occurring.


RE: CU LRC Lyrics - ronie - 2024-02-04

as i don't have a youtube music account, i tried to reproduce it with another music addon,
but no crashes so far.

please provide a Debug Log (follow the instructions in the first post), and i'll have another look at it.


RE: CU LRC Lyrics - manfeed - 2024-04-03

Hi ronie, years have gone by and still enjoying your awesome addon, thank you!

Just telling you some small issues that I have in case you could help. First one is that some online lyrics contain a space at the start of each line, what makes ListItem.Property(part1) to be blank and therefore when using animated lyrics the animation looks incomplete. For instance, this happens with The Architect, from Kacey Musgraves, taken from Music163:

Code:

[00:00.000] 作词 : Kacey Musgraves/Shane McAnally/Josh Osborne
[00:01.000] 作曲 : Kacey Musgraves/Shane McAnally/Josh Osborne
[00:07.436] Even something as small as an apple
[00:11.763] It's simple and somehow complex
[00:15.773] Sweet and divine
[00:17.662] The perfect design
[00:19.359] Can I speak to the architect?
[00:23.232] And there's a canyon that cuts through the desert
[00:27.220] Did it get there because of a flood?
[00:31.435] Was it devised or were you surprised
[00:35.280] When you saw how grand it was?
[00:38.883] Was it thought out at all
[00:40.735] Or just paint on a wall
[00:42.715] Is there anything that you regret?
[00:46.880] I don't understand
[00:48.394] Are there blueprints or plans
[00:50.538] Can I speak to the architect?
[00:56.387] Sometimes, I look in the mirror
[01:00.460] And wish I could make a request
[01:04.140] Could I pray it away
[01:05.986] Am I shapable clay
[01:08.386] Or is this as good as it gets?
[01:11.980] One day, you're on top of the mountain
[01:15.733] So high that you'll never come down
[01:19.739] Then the wind at your back
[01:21.478] Carries ember and ash
[01:23.787] That burns your whole house to the ground
[01:27.536] Is it thought out at all
[01:29.382] Or just paint on a wall
[01:31.381] Is there anything that you regret?
[01:35.636] I don't understand
[01:37.110] Are there blueprints or plans
[01:39.075] Can I speak to the architect?
[02:06.432] I thought that I was too broken
[02:10.687] And maybe too hard to love
[02:14.209] I was in a weird place
[02:16.187] Then I saw the right face
[02:18.229] And the stars and the planets lined up
[02:21.989] Does it happen by chance
[02:24.089] Is it all happenstance
[02:26.032] Do we have any say in this mess?
[02:30.062] Is it too late
[02:31.985] To make some more space
[02:33.697] Can I speak to the architect?
[02:37.611] This life that we make, is it random or fate
[02:41.462] Can I speak to the architect?
[02:45.662] Is there an architect?

...however, Dinner with friends, also from Kacey Musgraves and from the same source looks good...

Code:

[00:00.000] 作词 : Daniel Tashian/Ian Fitchuk/Kacey Musgraves
[00:01.000] 作曲 : Daniel Tashian/Ian Fitchuk/Kacey Musgraves
[00:17.137]Dinner with friends
[00:19.053]In cities where none of us live
[00:25.575]The face that somebody makes
[00:28.270]When you give 'em a gift
[00:33.722]Every once in a while
[00:35.801]When I wake up early without trying

I was wondering if it would be possible that the addon just skipped the blank space that some uploaders add to their lyrics after the time mark, so that ListItem.Property(part1) contains the first actual word.

Another issue has to do with Spotify, recently I discovered that I can use my premium account using a Kodi addon, which is great. CU LRC Lyrics does find the lyrics faultlessly but many times they're not in sync with the song and it's not the lyrics fault. I have noticed that when a song is supposed to start, CU LRC Lyrics begins showing the lyrics, but some seconds go by until the music starts to be heard and the 00:01 of the music player appears, I imagine that's due to the buffering, since it's a online stream. For instance...

Image

...it's the same song, The Architect, that I mentioned before, and this line, as you can see, wasn't supposed to show until 02:10.687, but it's 01:47, so it's 23 seconds ahead. CU LRC Lyrics seems to know that something is wrong, because if I call the context menu, it doesn't allow to sync manually, it only shows this (the image is from another song but it's same case):

Image

...however, if while playing the song, I exit the music visualisation screen and I open it again, hitting TAB, the same lyrics gets in sync and I'm also offered the manually sync option...

Image

I think that a possible fix could be that the lyrics only started to show when the player time actually begins to count and the music starts, but obviously you know better.

Thanks!


RE: CU LRC Lyrics - ronie - 2024-04-06

@manfeed hopefully i've managed to fix both issues.

getting rid of the space at the start of the line is easy, but your second issue was a bit harder.
when it comes to online audio sources, things get fairly difficult.
there is some code in cu lyrics which tries to support online radio stations, which are basically a continuous stream that don't provide any callback when to next song starts.
it's that code that messed things up for 'proper' online sources (like Spotify) which do notify Kodi of a song change.

anyway, would you mind testing this version:
script.cu.lrclyrics-6.6.3.zip


RE: CU LRC Lyrics - manfeed - 2024-04-06

Thanks ronie!

I have just tested with the same songs that were having issues and everything is fine now. I'll test more and if I find more issues I'll tell you, but I think this new version contains all the required fixes. Thanks again.


RE: CU LRC Lyrics - Frank_R - 2024-05-12

Hello,
First of all, thank you for the great addon.
I updated my Kodi some time ago and got a new version of CU LRC Lyrics (6.6.2).
Now I have noticed that no more lyrics can be found. The reason is the file format. I have sorted my files as follows: %N. %A - %T. In the current version of the add-on, however, I can only select %N - %A - %T, i.e. without a dot.
Could this be made possible again, please?
Thank you very much!


RE: CU LRC Lyrics - kioftes - 2024-05-12

Sorry for bumping, but I managed to achieve this with some scripting: The code checks if the player is playing and writes the window dialog id to the keymap file and reloads the keymap. It should be set up as an autostart service:
 
Code:
import xbmc
import xbmcgui
import re
import os
import time

file_path = '/storage/.kodi/userdata/keymaps/remote.xml'  # Path to your XML file

while True:
    if xbmc.Player().isPlaying():
        try:
            cWID = xbmcgui.getCurrentWindowDialogId()
        except (BaseException, Exception, NameError, RuntimeError) as exception:
            cWID = 0

        # Read the contents of the file
        with open(file_path, 'r') as file:
            content = file.read()

        # Regex to find <window#####> and </window#####>
        content = re.sub(r'<window\d+>', f'<window{cWID}>', content)
        content = re.sub(r'</window\d+>', f'</window{cWID}>', content)

        # Write the modified content back to the file
        with open(file_path, 'w') as file:
            file.write(content)

        # Reload keymap
        xbmc.executebuiltin('Action(reloadkeymaps)')
#        xbmc.executebuiltin(f'Notification(Info, Window ID is: {cWID})')
    time.sleep(1)  # Adding a sleep to prevent high CPU usage



RE: CU LRC Lyrics - kioftes - 2024-05-12

Ok, sorry, I thought I was replying directly to the message but there was no connection to the original, so my code above refers to this:
 
(2022-04-09, 21:38)ronie Wrote:
(2022-04-08, 15:48)sialivi Wrote: When the lyrics are shown my musicvisualization keymappings stop working. Any way to get around this?

when lyrics are show, the musicvisualization window isn't the active window anymore, but the cu lrc window is.
so you would need to define a section in your keymap file for this window.
sadly, this is not very straightforward, as there isn't really support for python windows when it comes to keymapping.

what should work (perhaps not 100% reliable) is add a section for window13000 to your keymap,
as python windows are dynamically assigned a window id, starting from 13000.

for example:
xml:
    <window13000>
      <keyboard>
          <f6>RunScript(script.test)</f6>
      </keyboard>
</window13000>

(I am also not able to edit my previous post.....)


RE: CU LRC Lyrics - kioftes - 2024-05-12

The script had some glitches, needed to check that we are indeed also in the visualisation window, playing audio and that the dialog comes from an add-on. Also reduced the sleep time, since fingers can be quite quick:
 
Code:
import xbmc
import xbmcgui
import re
import os
import time

file_path = '/storage/.kodi/userdata/keymaps/remote.xml'  # Path to your XML file

while True:
    if xbmc.Player().isPlayingAudio() and xbmc.getCondVisibility('Window.IsVisible(visualisation)'):
        try:
            cWID = xbmcgui.getCurrentWindowDialogId()
        except (BaseException, Exception, NameError, RuntimeError) as exception:
            cWID = 0

        # Read the contents of the file
        with open(file_path, 'r') as file:
            content = file.read()

        # Regex to find <window#####> and </window#####>
        content = re.sub(r'<window\d+>', f'<window{cWID}>', content)
        content = re.sub(r'</window\d+>', f'</window{cWID}>', content)

        # Write the modified content back to the file if id >= 13000
        if cWID >= 13000:
            with open(file_path, 'w') as file:
                file.write(content)
            # Reload keymap
            xbmc.executebuiltin('Action(reloadkeymaps)')

#        xbmc.executebuiltin(f'Notification(Info, Window ID is: {cWID})')
    time.sleep(0.3)  # Adding a sleep to prevent high CPU usage



RE: CU LRC Lyrics - ronie - 2024-05-12

(2024-05-12, 14:10)Frank_R Wrote: Hello,
First of all, thank you for the great addon.
I updated my Kodi some time ago and got a new version of CU LRC Lyrics (6.6.2).
Now I have noticed that no more lyrics can be found. The reason is the file format. I have sorted my files as follows: %N. %A - %T. In the current version of the add-on, however, I can only select %N - %A - %T, i.e. without a dot.
Could this be made possible again, please?
Thank you very much!

sure no problem, it will be added in the next release


RE: CU LRC Lyrics - Frank_R - 2024-05-12

(2024-05-12, 19:13)ronie Wrote:
(2024-05-12, 14:10)Frank_R Wrote: (..)

sure no problem, it will be added in the next release
Thank you very much!