2010-01-06, 14:49
PS: Is there a way for me to manually correct the title on screen, rather than editing the MP3?
Rob
Rob
dny238 Wrote:I found a setting to auto scroll, assuming that would cause the lyrics to roll during the duration of the song. But picking it doesn't have any apparent effect that I can see.
Also, having the capitalization problem I guess.
Another One Bites the Dust doesn't work, but Another One Bites The Dust does.
http://lyrics.wikia.com/index.php?title=...ction=edit
seems like a few keywords like 'a', 'the', 'of' could be CAPPED and tried a 2nd time to increase the success rate, or you could try CAPPING the entire title if the normal version fails to find lyrics. Have these approaches been discussed/tried already?
dny238 Wrote:Is there a way to paypal a contribution for all your hardwork?
Rob
dny238 Wrote:Are the 'beta' releases available publicly?
Can you point me to the correct URL?
Thanks in advance,
Rob
Amet Wrote:there is no beta releases. ronie and I test them. when its ready it will be posted here.
def show_lyrics( self, rawLyrics, save=False ):
try:
xbmcgui.lock()
lyrics = self.unescape(rawLyrics).strip()
if (lyrics == "{{Instrumental}}"):
lyrics = "Instrumental"
elif (len(lyrics) < 100 and (lyrics.find("{{Instrumental}}") < 0)):
lyrics = "No lyrics have been found for ' %s '\n%s" % (self.song, lyrics)
save = False
self.getControl( 100 ).setText( lyrics )
splitLyrics = lyrics.splitlines()
for x in splitLyrics:
self.getControl( 110 ).addItem( x )
self.getControl( 110 ).selectItem( 0 )
if ( __settings__.getSetting( "save_lyrics" ) == "true" and save ):
self.save_lyrics_to_file( lyrics )
self.show_control( 100 + ( int(__settings__.getSetting( "smooth_scrolling" ) == "true") * 10 ) )
next_artist = xbmc.getInfoLabel( "MusicPlayer.offset(1).Artist" )
next_song = xbmc.getInfoLabel( "MusicPlayer.offset(1).Title" )
print xbmc.getInfoLabel( "MusicPlayer.offset(1)" )
print "Next Artist: " + next_artist
print "Next Song: " + next_song
if ( next_song and next_artist ):
self.get_lyrics( next_artist, next_song, False )
else:
print "Missing Artist or Song name in ID3 tag for next track"
finally:
xbmcgui.unlock()
def get_lyrics(self, artist1, song1, show):
if show:
self.reset_controls()
self.getControl( 100 ).setText( "" )
self.getControl( 200 ).setLabel( "" )
self.menu_items = []
self.allow_exception = False
artist2 = unicode(artist1, 'utf-8') # de-accent Search String
artist = unicodedata.normalize('NFKD', unicode(artist2)).encode('ascii','ignore')
song2 = unicode(song1, 'utf-8') # de-accent Search String
song = unicodedata.normalize('NFKD', unicode(song2)).encode('ascii','ignore')
lyrics = ""
current_song = self.song
lyrics, kind = self.get_lyrics_from_file( artist, song, show )
if (artist.find( "\'" )) or (song.find( "\'", )):
quote = False
else:
quote = True
if show :
if ( lyrics != "" ):
if ( current_song == self.song ):
self.show_lyrics( lyrics )
self.getControl( 200 ).setEnabled( False )
self.getControl( 200 ).setLabel( "File" )
else:
self.getControl( 200 ).setEnabled( True )
self.getControl( 200 ).setLabel( "LyricWiki API" )
lyrics = self.LyricsScraper.get_lyrics_thread( artist, song, quote )
if ( len(lyrics) < 100):
song = song.capitalize()
print "Search failed for show: Capitalizing"
lyrics = self.LyricsScraper.get_lyrics_thread( artist, song, quote )
if ( current_song == self.song ):
self.show_lyrics( lyrics, True )
else:
if ( len(lyrics) > 100):
print "Next Lyrics Already Exist"
else:
lyrics = self.LyricsScraper.get_lyrics_thread( artist, song, quote )
if ( len(lyrics) < 100):
print "Search failed: Capitalizing the title"
song = song.capitalize()
lyrics = self.LyricsScraper.get_lyrics_thread( artist, song, quote )
if ( len(lyrics) > 100):
success = self.save_lyrics_to_file( lyrics )
print "Next Lyrics Saved"
dny238 Wrote:I'm using the new confluence skin and have a few issues
1) I can't get CU Lyrics to scroll lyrics automatically. Is there something more to it? I can scroll manually, but I'd prefer it just roll by itself.
dny238 Wrote:2) Long lines aren't wrapping properly in the popout window CU Lyrics provides on the right side for the lyrics display.
Rob
Amet Wrote:It doesnt scroll automatically, you can set it to "smooth scroll" under script settings. that will scroll line by line
Zeljko
dny238 Wrote:Got it. I was overthinking it.
Can you add a autoscroll option to the script? I imagined it working like this. (Numbers are fake to illustrate the math)
1) Song is 3 minutes long
2) View is 90 lines high starting with 30 lines visible. - 60 lines left to see.
3) 180 seconds / 60 lines = 3 seconds per line.
4) Every 3 seconds automatically scroll down one line.
It won't be perfect, but I'd bet it'd work more often than not.
Rob
Amet Wrote:sure, unless you like pink floyd
I have done something similar, having some issues with it so it was never released. I might revisit the problem when I have some time. In a week or two.
Zeljko
ZorMonkey Wrote:I fixed the bug where it'd display lyrics for the wrong song in certain cases. But, that snowballed into a lot of refactoring. Nothing major, just stuff like making the "show_lyrics" method show lyrics, and that's it. The biggest change is that I created classes for song and lyrics information, which helped fix the bug I mentioned. Still not sure I'm 100% happy with it, but its a lot easier for me to follow now. I zipped up everything and put the source online. Do with it what you will.
My next project is to help the scraper a little. I want to parse the lyrics better (to pick up italics/bold formatting), and I have some ideas to get lyrics more reliably and quicker.