The branch, eden has been updated
       via  f703dd817cda6f053e5a8498d3d1bc44c52ac902 (commit)
      from  73b5b277575827e2bf63794c2961953c440851ec (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=f703dd817cda6f053e5a8498d3d1bc44c52ac902

commit f703dd817cda6f053e5a8498d3d1bc44c52ac902
Author: taxigps <[email protected]>
Date:   Sun Nov 18 13:49:04 2012 +0800

    [script.lrclyrics] -v1.4.6

diff --git a/script.lrclyrics/addon.xml b/script.lrclyrics/addon.xml
index ecc79ba..2de8089 100644
--- a/script.lrclyrics/addon.xml
+++ b/script.lrclyrics/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="script.lrclyrics"
        name="LRC Lyrics"
-       version="1.4.5"
+       version="1.4.6"
        provider-name="Taxigps">
   <requires>
     <import addon="xbmc.python" version="1.0"/>
diff --git a/script.lrclyrics/changelog.txt b/script.lrclyrics/changelog.txt
index 1e4f4f8..cb1d0a5 100644
--- a/script.lrclyrics/changelog.txt
+++ b/script.lrclyrics/changelog.txt
@@ -1,4 +1,8 @@
-[B]1.4.5 (2012.11.18)[/B]
+[B]1.4.6 (2012.11.18)[/B]
+fixed: can't change lyrics when skip to next song
+fixed: encoding error and lrc error by additional \n\r with SYLT lyrics
+
+[B]1.4.5 (2012.11.18)[/B]
 added: embed lyrics support for Lyrics3/Lyrics3V2/SYLT/TXXX(Lyrics) 
 added: use chardet to detect lyrics encoding 
 
diff --git a/script.lrclyrics/resources/lib/embedlrc.py 
b/script.lrclyrics/resources/lib/embedlrc.py
index 2ecf5e4..2be0e38 100644
--- a/script.lrclyrics/resources/lib/embedlrc.py
+++ b/script.lrclyrics/resources/lib/embedlrc.py
@@ -96,6 +96,8 @@ def getID3Lyrics(filename):
             lyrics = ""
             while content != "":
                 pos = endOfString(content, utf16)
+                if (enc == 'latin_1'):
+                    enc = chardet.detect(content[:pos])['encoding']
                 text = content[:pos].decode(enc)
                 if utf16:
                     pos += 1
@@ -103,7 +105,7 @@ def getID3Lyrics(filename):
                 timems = 0
                 for x in range(4):
                     timems += (256)**(3-x) * ord(time[x])
-                lyrics += "%s%s\r\n" % (ms2timestamp(timems), text)
+                lyrics += "%s%s\r\n" % (ms2timestamp(timems), 
text.replace('\n','').replace('\r','').strip())
                 content=content[pos+5:]
             return lyrics.encode( "utf-8")
         elif tag.fid == "TXXX":
diff --git a/script.lrclyrics/resources/lib/gui.py 
b/script.lrclyrics/resources/lib/gui.py
index 43a03f8..ec83620 100644
--- a/script.lrclyrics/resources/lib/gui.py
+++ b/script.lrclyrics/resources/lib/gui.py
@@ -85,6 +85,7 @@ class GUI( xbmcgui.WindowXMLDialog ):
         self.getControl( 200 ).setLabel( "" )
         self.menu_items = []
 
+        xbmc.sleep( 60 )
         lyrics =  
getEmbedLyrics(xbmc.Player().getPlayingFile().decode("utf-8"))
         if ( lyrics ):
             self.show_lyrics( lyrics )
@@ -113,7 +114,6 @@ class GUI( xbmcgui.WindowXMLDialog ):
         self.show_lyrics( lyrics, True )
 
     def get_lyrics_from_file( self, artist, song ):
-        xbmc.sleep( 60 )
         if ( self.settings[ "artist_folder" ] ):
             self.song_path = unicode( os.path.join( self.settings[ 
"lyrics_path" ], artist.replace( "\\", "_" ).replace( "/", "_" ), song.replace( 
"\\", "_" ).replace( "/", "_" ) + ".lrc" ), "utf-8" )
         else:
@@ -121,7 +121,6 @@ class GUI( xbmcgui.WindowXMLDialog ):
         return get_textfile( self.song_path )
 
     def get_lyrics_from_file2( self ):
-        xbmc.sleep( 60 )
         path = xbmc.Player().getPlayingFile()
         dirname = os.path.dirname(path)
         basename = os.path.basename(path)

-----------------------------------------------------------------------

Summary of changes:
 script.lrclyrics/addon.xml                 |    2 +-
 script.lrclyrics/changelog.txt             |    6 +++++-
 script.lrclyrics/resources/lib/embedlrc.py |    4 +++-
 script.lrclyrics/resources/lib/gui.py      |    3 +--
 4 files changed, 10 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to