diff options
Diffstat (limited to 'nephilim/plugins/AlbumCover.py')
-rw-r--r-- | nephilim/plugins/AlbumCover.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nephilim/plugins/AlbumCover.py b/nephilim/plugins/AlbumCover.py index 9bf0769..7ccdfa2 100644 --- a/nephilim/plugins/AlbumCover.py +++ b/nephilim/plugins/AlbumCover.py @@ -104,7 +104,7 @@ class AlbumCover(Plugin): # private DEFAULTS = {'coverdir' : '$musicdir/$songdir', 'covername' : '.cover_nephilim_$artist_$album', - 'fetchers': QtCore.QStringList(['local', 'Last.fm']), 'store' : True} + 'fetchers': ['local', 'Last.fm'], 'store' : True} "implemented fetchers" available_fetchers = None "enabled fetchers, those with higher priority first" @@ -206,7 +206,7 @@ class AlbumCover(Plugin): self.settings.setValue('covername', QVariant(self.covername.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: @@ -237,7 +237,10 @@ class AlbumCover(Plugin): if token == QtCore.QXmlStreamReader.StartElement: if xml.name() == 'image' and xml.attributes().value('size') == 'extralarge': 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 if xml.hasError(): self.logger.error('Error parsing seach results: %s'%xml.errorString()) |