Skip to content

Update albumuniversal.xml #4989

Closed
wants to merge 1 commit into from

4 participants

@elrodro83

Scraper was failing to get details for an album when a release of another type (single or compilation) with the same name exists.

For instance:

Artist: Judas Priest
Album: Nostradamus

MB Url sent from the scraper:
http://search.musicbrainz.org/ws/2/release/?fmt=xml&query=release:%22Nostradamus%22%20AND%20artist:%22Judas%20Priest%22

Result after executing the regexps:

<results sorted="yes"><entity><year>DE-2008-T#13</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-59a3bba0-56a1-4ce0-b071-31360b59bf8d-album.xml">http://musicbrainz.org/ws/2/release/59a3bba0-56a1-4ce0-b071-31360b59bf8d?inc=recordings+release-groups+artists+labels+ratings</url></entity><entity><year>US-2008-T#13</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-7cf3b475-88b0-35e5-aaf6-a0ba7107a3f5-album.xml">http://musicbrainz.org/ws/2/release/7cf3b475-88b0-35e5-aaf6-a0ba7107a3f5?inc=recordings+release-groups+artists+labels+ratings</url></entity><entity><year>XE-2008-T#13</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-ce6bc9e5-0ca3-342c-ac00-78963655a92b-album.xml">http://musicbrainz.org/ws/2/release/ce6bc9e5-0ca3-342c-ac00-78963655a92b?inc=recordings+release-groups+artists+labels+ratings</url></entity><entity><year>JP-2008-T#13</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-a319bbf8-0d5a-4209-9de1-1fe821f772a0-album.xml">http://musicbrainz.org/ws/2/release/a319bbf8-0d5a-4209-9de1-1fe821f772a0?inc=recordings+release-groups+artists+labels+ratings</url></entity><entity><year>XW-2008-T#1</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-59a3bba0-56a1-4ce0-b071-31360b59bf8d-album.xml">http://musicbrainz.org/ws/2/release/59a3bba0-56a1-4ce0-b071-31360b59bf8d?inc=recordings+release-groups+artists+labels+ratings</url></entity><entity><year>DE-2008-T#13</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-23aada98-3ffc-4247-8fb6-528eeaee3077-album.xml">http://musicbrainz.org/ws/2/release/23aada98-3ffc-4247-8fb6-528eeaee3077?inc=recordings+release-groups+artists+labels+ratings</url></entity><entity><year>US-2008-T#13</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-7cf3b475-88b0-35e5-aaf6-a0ba7107a3f5-album.xml">http://musicbrainz.org/ws/2/release/7cf3b475-88b0-35e5-aaf6-a0ba7107a3f5?inc=recordings+release-groups+artists+labels+ratings</url></entity><entity><year>XE-2008-T#13</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-ce6bc9e5-0ca3-342c-ac00-78963655a92b-album.xml">http://musicbrainz.org/ws/2/release/ce6bc9e5-0ca3-342c-ac00-78963655a92b?inc=recordings+release-groups+artists+labels+ratings</url></entity><entity><year>JP-2008-T#13</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-a319bbf8-0d5a-4209-9de1-1fe821f772a0-album.xml">http://musicbrainz.org/ws/2/release/a319bbf8-0d5a-4209-9de1-1fe821f772a0?inc=recordings+release-groups+artists+labels+ratings</url></entity></results>

After comparing the MB output to the trasformed output, i see the first entry is mixing the id from the single with the country, year and track count of the second. This is because the part of the regexp puts the "non-album" ((.?)) and the regexp continues evaluating but with the next "Album" release after having read the id of the single.

I checked this happening (and fixed by this change) in the following albums:

Duran Duran - Notorious (Single with the same name as the album)
Gary Moore - Back on The Streets (Compilation with the same name as the album)

@elrodro83 elrodro83 Update albumuniversal.xml
Scraper was failing to get details for an album when a release of another type (single or compilation) with the same name exists.

For instance:

Artist: Judas Priest
Album: Nostradamus

MB Url sent from the scraper:
http://search.musicbrainz.org/ws/2/release/?fmt=xml&query=release:%22Nostradamus%22%20AND%20artist:%22Judas%20Priest%22

Result after executing the regexps:
<results sorted="yes"><entity><year>DE-2008-T#13</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-59a3bba0-56a1-4ce0-b071-31360b59bf8d-album.xml">http://musicbrainz.org/ws/2/release/59a3bba0-56a1-4ce0-b071-31360b59bf8d?inc=recordings+release-groups+artists+labels+ratings</url></entity><entity><year>US-2008-T#13</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-7cf3b475-88b0-35e5-aaf6-a0ba7107a3f5-album.xml">http://musicbrainz.org/ws/2/release/7cf3b475-88b0-35e5-aaf6-a0ba7107a3f5?inc=recordings+release-groups+artists+labels+ratings</url></entity><entity><year>XE-2008-T#13</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-ce6bc9e5-0ca3-342c-ac00-78963655a92b-album.xml">http://musicbrainz.org/ws/2/release/ce6bc9e5-0ca3-342c-ac00-78963655a92b?inc=recordings+release-groups+artists+labels+ratings</url></entity><entity><year>JP-2008-T#13</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-a319bbf8-0d5a-4209-9de1-1fe821f772a0-album.xml">http://musicbrainz.org/ws/2/release/a319bbf8-0d5a-4209-9de1-1fe821f772a0?inc=recordings+release-groups+artists+labels+ratings</url></entity><entity><year>XW-2008-T#1</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-59a3bba0-56a1-4ce0-b071-31360b59bf8d-album.xml">http://musicbrainz.org/ws/2/release/59a3bba0-56a1-4ce0-b071-31360b59bf8d?inc=recordings+release-groups+artists+labels+ratings</url></entity><entity><year>DE-2008-T#13</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-23aada98-3ffc-4247-8fb6-528eeaee3077-album.xml">http://musicbrainz.org/ws/2/release/23aada98-3ffc-4247-8fb6-528eeaee3077?inc=recordings+release-groups+artists+labels+ratings</url></entity><entity><year>US-2008-T#13</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-7cf3b475-88b0-35e5-aaf6-a0ba7107a3f5-album.xml">http://musicbrainz.org/ws/2/release/7cf3b475-88b0-35e5-aaf6-a0ba7107a3f5?inc=recordings+release-groups+artists+labels+ratings</url></entity><entity><year>XE-2008-T#13</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-ce6bc9e5-0ca3-342c-ac00-78963655a92b-album.xml">http://musicbrainz.org/ws/2/release/ce6bc9e5-0ca3-342c-ac00-78963655a92b?inc=recordings+release-groups+artists+labels+ratings</url></entity><entity><year>JP-2008-T#13</year><artist>Judas Priest</artist><title>Nostradamus</title><url cache="mb-a319bbf8-0d5a-4209-9de1-1fe821f772a0-album.xml">http://musicbrainz.org/ws/2/release/a319bbf8-0d5a-4209-9de1-1fe821f772a0?inc=recordings+release-groups+artists+labels+ratings</url></entity></results>

After comparing the MB output to the trasformed output, i see the first entry is mixing the id from the single with the country, year and track count of the second. This is because the part of the regexp puts the "non-album" (<release-group\sid="[^"]*\"\stype="Album") junk of this single as part of the aliases group (?:<alias-list>(.*?)</alias-list>)* and the regexp continues evaluating but with the next "Album" release after having read the id of the single.

I checked this happening (and fixed by this change) in the following albums:

Duran Duran - Notorious (Single with the same name as the album)
Gary Moore - Back on The Streets (Compilation with the same name as the album)
a7b34e0
@zag2me
Team Kodi member
zag2me commented Jul 7, 2014

@olympia How does this change look?

@elrodro83 I think the scrapers need to be submitted via the add-on mailing list.

@elrodro83

@zag2me Just sent an email o the add-on mailing list.

@elrodro83 elrodro83 closed this Jul 8, 2014
@elrodro83

Made the changes in a wrong branch. Closed this and will create the correct one.

@da-anda
Team Kodi member
da-anda commented Jul 8, 2014

you don't have to close this PR and create a new one. All you have to do is to force push your new local branch to this GIT branch and the PR will auto-update.
edit: I should have read the history first. Well, in case the PR is misplaced here, then you may ofc close it ;)

@MartijnKaijser
Team Kodi member

we don't accept PRs for our scrapers here as this is not the main development branch for those. The version included here can be outdated.
Please send a PR for review according to
http://wiki.xbmc.org/index.php?title=Submitting_Add-ons#The_mailing_list
or discuss here
http://forum.xbmc.org/showthread.php?tid=133547

(ow sorry, didn't read you already did that :) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.