diff options
Diffstat (limited to 'nephilim/plugins/Lyrics.py')
-rw-r--r-- | nephilim/plugins/Lyrics.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nephilim/plugins/Lyrics.py b/nephilim/plugins/Lyrics.py index 1efce0a..99eff72 100644 --- a/nephilim/plugins/Lyrics.py +++ b/nephilim/plugins/Lyrics.py @@ -109,7 +109,7 @@ class Lyrics(Plugin): o = None # private - DEFAULTS = {'fetchers' : QtCore.QStringList(['Lyricwiki', 'Animelyrics']), 'lyricdir' : '$musicdir/$songdir', + DEFAULTS = {'fetchers' : ['Lyricwiki', 'Animelyrics'], 'lyricdir' : '$musicdir/$songdir', 'lyricname' : '.lyrics_nephilim_$artist_$album_$title', 'store' : True} "implemented fetchers" available_fetchers = None #XXX SettingsWidget currently uses it @@ -180,7 +180,10 @@ class Lyrics(Plugin): if token == QtCore.QXmlStreamReader.StartElement: if xml.name() == 'url': url = QtCore.QUrl() # the url is already percent-encoded - url.setEncodedUrl(xml.readElementText().toLatin1()) + try: + url.setEncodedUrl(xml.readElementText()) + except TypeError: # no text + url = None elif xml.name() == 'lyrics' and xml.readElementText() == 'Not found': xml.clear() return self.finish() @@ -317,7 +320,7 @@ class Lyrics(Plugin): self.settings.setValue('lyricname', QVariant(self.lyricname.text())) self.settings.setValue('store', QVariant(self.store.isChecked())) - fetchers = QtCore.QStringList() + fetchers = [] for i in range(self.fetcherlist.count()): it = self.fetcherlist.item(i) if it.checkState() == QtCore.Qt.Checked: |