• 1
  • 22
  • 23
  • 24
  • 25(current)
  • 26
[RELEASE] CU Lyrics (Script) Addon
(2012-08-22, 17:08)amet Wrote: It is possible, I am busy ATM so if it waits for me it might wait a while Smile

Ok no problem then i'll have to wait Wink
Just out of curiosity:

- When we see 'Unfortunately, we are not licenced to display the full lyrics..' message - have we already tried the other lyrics sources and all failed?

It would be better™ if we don't use the site that does this and accept the output as 'OK'?

Hi guys,

One key problem I have with this script is how to turn it on at the right moment. (I'm trying to keep my UI very consistent)

I know that i can bind a button: RunScript(script.cu.lyrics)

What I want to do is:

1/ Go to playlist (or track selection list, or now-playing view)
2/ Hit info button (XBMC shows artist info, the track name, 00:34/6:50 etc)
3/ Hit info button AGAIN and then it shows lyrics

Now I know that keyboard.xml has the possibility of having buttons only work in context, and I tried this, however I failed.

Code:
<dialogsonginfo>
   <keyboard>
       <d mod="ctrl">RunScript(script.cu.lyrics)</d>
   <keyboard>
</dialogsonginfo>

- Control-D is what my remote sends if I hit the 'info' button
- XBMC.log tells me if I hit Info, it opens DialogSongInfo.xml

Am I missing something?
System: Kodi on NVidia Shield 2015
Video: Panasonic AE3000 Projector / Samsung 46" LCD
Audio: Quad 2912 on Nord DM500Up with Marantz 7010 receiver.
I assigned a shortcut keyboard key to the CU Lyrics script.
I tried to use it while watching a music video on YouTube, The script failed and I got the following error in the log file:

Quote: self.song_info = xbmc.Player().getMusicInfoTag().getTitle()
Exception: XBMC is not playing any music file
Is this something that can be fixed in future versions of the addon?
(2012-11-21, 19:26)ilomambo Wrote: I assigned a shortcut keyboard key to the CU Lyrics script.
I tried to use it while watching a music video on YouTube, The script failed and I got the following error in the log file:

Quote: self.song_info = xbmc.Player().getMusicInfoTag().getTitle()
Exception: XBMC is not playing any music file
Is this something that can be fixed in future versions of the addon?

there's nothing broking, so nothing to fix :-)
cu lyrics is meant to be used with audio files, not videos.

getting it to work with youtube videos would be difficult
as we somehow would need to extract the artist name and song title
from the video name that youtube provides.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
(2012-11-21, 19:50)ronie Wrote: getting it to work with youtube videos would be difficult
as we somehow would need to extract the artist name and song title
from the video name that youtube provides.

It does not sound such a big challenge. I browsed the youtube music videos and most of the titles fall into one these categories:

<SongName>
<SongName><Delimiters><Artist>[<Delimiters>[<stuff>]]
<Artist><Delimiters><SongName>[<Delimiters>[<stuff>]]

Most of the cases fit those three. if it does not match probably the info is not there.
I know how to make the regular expression to extract the info, I just don't know phyton. Here it is in perl:

$item = '([\w'. ]*[\w'.])'; # enforces end with non-space, include apostrophe and point (Guns N'Roses, R.E.M.)
$Delimiters = '([- #\t+@_]+)'; # includes space
$stuff = '(.*)'; # Anything
$youtubetitle =~ /$item($Delimiters$item($Delimiters$stuff?)?)?/;
if( !FindLyrics($1,$4) && !FindLirycs($4,$1) {
# Lyrics not found
return
}
# Lyrics found
Image
(2012-11-22, 12:42)amet Wrote: Image

Pass some please Smile
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
I don't know if it is fine to report a bug here. But I was listening to a radio station, through TuneIn and tried to launch the CU Lyrics script and got this error (cleaned up)

Code:
ERROR: Error Type: <type 'exceptions.NameError'>
ERROR: Error Contents: global name 're' is not defined
ERROR: Traceback (most recent call last):
   File "...\script.cu.lyrics\default.py", line 21, in <module>
               ui = gui.GUI( "script-XBMC_Lyrics-main.xml" , __cwd__, "Default" )
   File "...\script.cu.lyrics\resources\lib\gui.py", line 17, in __init__
              self.current_song = Song.current()
    File "...\script.cu.lyrics\resources\lib\utilities.py", line 67, in current
               song.title = re.sub(r'\([^\)]*\)$', '', song.title)
    NameError: global name 're' is not defined

I looked into the source (though, as I said I don't know python) and it seemd to me that the regular expression lib was not imported (I saw that it was imported in the scrappers' code but not in utilities.py
I added
Code:
import re
to utilities.py an it works now for me, though I don't know if the fix is complete.
Hi, me again Blush

What are the keyboard shortcuts to go to the next/previous page of the displayed lyrics?

In case they are not defined in the addon:

1. What's the name of the CU Lyrics window?

2. How to call to the next/previous page routines?
(2012-11-23, 09:52)ilomambo Wrote: I added
Code:
import re
to utilities.py an it works now for me, though I don't know if the fix is complete.
thanx!
someone should fix that ;-)

(2012-11-23, 10:33)ilomambo Wrote: What are the keyboard shortcuts to go to the next/previous page of the displayed lyrics?

script windows have no name and listen to the same previous/next commands
as every other window in xbmc.

other than that, there should be either a scrollbar on the right
or a up/down page control at the button you can use to scroll thru the lyrics.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
(2012-11-23, 11:55)ronie Wrote: other than that, there should be either a scrollbar on the right
or a up/down page control at the button you can use to scroll thru the lyrics.

I noticed the up/down arrows on the bottom, but I work a lot with the keyboard so I want the shortcuts.
Since the parent window is Visualization, I think there are no page down/up shortcuts defined; at least I tried arrow down/up and it does not help.

Edit: Found that the PgDn and PgUp buttons do page down/up. Go figure! :-)

Edit II: Actually PgUp PgDn move to the top and bottom of the lyrics. PgUp goes to the bottom, PgDn goes to the top. The left and right arrows move between the spin controls on the bottom, then you have to press enter to execute the page up/down. It is, to say the least, not very intuitive. Maybe this is what the python language creator meant by "feel free to use Monthy python's humor". Actually using up arrow to go up one page and down arrow to go down one page would be very boring and predictable.
Still me, with a new issue.

While exploring the whole page up/down issue I discovered that CU Lyrics is calling the Dialog with the lyrics skin defined in the confluence 720p directory.
CU Lyrics has a file, with the same name, in its own skin directory 720p (script-XBMC_Lyrics-main.xml) which is seemingly not used at all.

I wonder if this is supposed to be this way. Just for fun I modified the file name in the addon to "my-script-XBMC_Lyrics-main.xml" and modified accordingly the GUI instantiation in "default.py". It now displays the CU Lyrics skin, which is much nicer in my opinion.
There is a reason for that , it allows skinners to skin addons in the same way as the rest if the skin.

As for the which window looks better, I suggest you keep it to yourself as that is individual opinion... Unless its missing a functionality, taste varies and shouldn't be discussed

(2012-11-23, 19:06)amet Wrote: As for the which window looks better, I suggest you keep it to yourself as that is individual opinion... Unless its missing a functionality, taste varies and shouldn't be discussed

not even if it was me who made that window? ;-)
please?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
  • 1
  • 22
  • 23
  • 24
  • 25(current)
  • 26

Logout Mark Read Team Forum Stats Members Help
[RELEASE] CU Lyrics (Script) Addon1