Skip to content

Commit 3a3d964

Browse files
committed
albumartist_website: handle URLs that have ended
1 parent f0e73d3 commit 3a3d964

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

plugins/albumartist_website/albumartist_website.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
PLUGIN_AUTHOR = 'Sophist, Sambhav Kothari, Philipp Wolfer'
55
PLUGIN_DESCRIPTION = '''Add's the album artist(s) Official Homepage(s)
66
(if they are defined in the MusicBrainz database).'''
7-
PLUGIN_VERSION = '1.1'
7+
PLUGIN_VERSION = '1.1.1'
88
PLUGIN_API_VERSIONS = ["2.0", "2.1", "2.2"]
99
PLUGIN_LICENSE = "GPL-2.0"
1010
PLUGIN_LICENSE_URL = "https://www.gnu.org/licenses/gpl-2.0.html"
@@ -128,8 +128,11 @@ def artist_process_metadata(self, artistId, response):
128128
log.debug("%s: %r: Examining: %r", PLUGIN_NAME, artistId, relation)
129129
if 'type' in relation.attribs and relation.type == 'official homepage':
130130
if 'target' in relation.children and len(relation.target) > 0:
131-
log.debug("%s: Adding artist url: %s", PLUGIN_NAME, relation.target[0].text)
132-
urls.append(relation.target[0].text)
131+
if not 'ended' in relation.children or relation.ended[0].text != 'true':
132+
log.debug("%s: Adding artist url: %s", PLUGIN_NAME, relation.target[0].text)
133+
urls.append(relation.target[0].text)
134+
else:
135+
log.debug("%s: Artist url has ended: %s", PLUGIN_NAME, relation.target[0].text)
133136
else:
134137
log.debug("%s: No url in relation: %r", PLUGIN_NAME, relation)
135138

0 commit comments

Comments
 (0)