(no commit message)
[paste/456.git] / 0-patch.diff
index c0cc8db1e1b8a8988bf6c5f5adacd81f473921c7..28db46a5e7a177a0425be73772df2210d4f50003 100644 (file)
@@ -1,5 +1,5 @@
 diff --git a/plugins/lyrics/lyrics.py b/plugins/lyrics/lyrics.py
-index 13124b3..45b054a 100644
+index 13124b3..6c93944 100644
 --- a/plugins/lyrics/lyrics.py
 +++ b/plugins/lyrics/lyrics.py
 @@ -32,6 +32,7 @@ import urllib.request
@@ -10,7 +10,7 @@ index 13124b3..45b054a 100644
  
  import LyricsParse
  from LyricsConfigureDialog import LyricsConfigureDialog
-@@ -142,10 +143,36 @@ class LyricGrabber(object):
+@@ -142,10 +143,41 @@ class LyricGrabber(object):
  
        def verify_lyric(self):
                return os.path.exists(self.cache_path)
@@ -20,7 +20,7 @@ index 13124b3..45b054a 100644
 +              """
 +              Extract lyrics from the file meta data (tags)
 +              Currently supported formats:
-+              - ogg/vorbis files with "LYRICS" tag
++              - ogg/vorbis files with "LYRICS" and "SYNCLYRICS" tag
 +              """
 +              location = self.entry.get_playback_uri()
 +              print("discovering %s" % location)
@@ -32,8 +32,13 @@ index 13124b3..45b054a 100644
 +
 +              for i in range(tags.get_tag_size("extended-comment")):
 +                      (exists, value) = tags.get_string_index("extended-comment", i)
++                      #ogg/vorbis unsynchronized lyrics
 +                      if exists and value.startswith("LYRICS"):
 +                              text = value.replace("LYRICS=", "")
++                              return text
++                      #ogg/vorbis synchronized lyrics
++                      elif exists and value.startswith("SYNCLYRICS"):
++                              text = value.replace("SYNCLYRICS=", "")
 +                              return text
          
        def search_lyrics(self, callback, cache_only=False):