X-Git-Url: https://git.cweiske.de/paste/456.git/blobdiff_plain/4ffe2835ff0bb834b50210f21a72b4c230941e95..1f1711531cf81bcd11ef873b605bc28eebdd6187:/0-patch.diff diff --git a/0-patch.diff b/0-patch.diff index a03ea81..28db46a 100644 --- a/0-patch.diff +++ b/0-patch.diff @@ -1,5 +1,5 @@ diff --git a/plugins/lyrics/lyrics.py b/plugins/lyrics/lyrics.py -index 13124b3..7333f2f 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..7333f2f 100644 import LyricsParse from LyricsConfigureDialog import LyricsConfigureDialog -@@ -142,10 +143,39 @@ 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..7333f2f 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) @@ -30,13 +30,15 @@ index 13124b3..7333f2f 100644 + if tags is None: + return + -+ def fetags (list, tag): -+ print("tag: %s" % tag) -+ tags.foreach(fetags) + 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):