forked from xbmc/xbmc-rbp
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add artists/album universal scrapers for music and last.fm for musicv…
…ideos
- Loading branch information
1 parent
4c4ccf0
commit cfb94b4
Showing
17 changed files
with
632 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<addon id="metadata.album.universal" | ||
name="Universal Album Scraper" | ||
version="1.2.2" | ||
provider-name="Olympia, Team XBMC"> | ||
<requires> | ||
<import addon="xbmc.metadata" version="1.0"/> | ||
<import addon="metadata.common.last.fm" version="1.3.2"/> | ||
<import addon="metadata.common.allmusic.com" version="2.3.1"/> | ||
<import addon="metadata.common.musicbrainz.org" version="1.2.3"/> | ||
<import addon="metadata.common.fanart.tv" version="1.0.1"/> | ||
<import addon="metadata.common.amazon.de" version="1.0.0"/> | ||
</requires> | ||
<extension point="xbmc.metadata.scraper.albums" | ||
language="en" | ||
library="albumuniversal.xml"/> | ||
<extension point="xbmc.addon.metadata"> | ||
<summary lang="en">Universal Scraper for Albums</summary> | ||
<description lang="en">This scraper collects information from the following supported sites: MusicBrainz, last.fm, allmusic.com and amazon.de, while grabs artwork from: fanart.tv, last.fm and allmusic.com. It can be set field by field that from which site you want that specific information. | ||
|
||
The initial search is always done on MusicBrainz. In case allmusic and/or amazon.de links are not added on the MusicBrainz site, fields from allmusic.com and/or amazon.de cannot be fetched (very easy to add those missing links though).</description> | ||
<platform>all</platform> | ||
</extension> | ||
</addon> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<scraper framework="1.1" date="2012-06-09"> | ||
<NfoUrl dest="3"> | ||
<RegExp input="$$1" output="<url>http://musicbrainz.org/ws/2/release/\1?inc=recordings+release-groups+artists+labels+ratings</url>" dest="3"> | ||
<expression>release/(.+)</expression> | ||
</RegExp> | ||
</NfoUrl> | ||
<CreateAlbumSearchUrl dest="3"> | ||
<RegExp input="$$1" output="<url>http://search.musicbrainz.org/ws/2/release/?fmt=xml&query=release:"\1"%20AND%20artist:"$$2"</url>" dest="3"> | ||
<RegExp input="$$2" output="\1" dest="4"> | ||
<expression noclean="1">(.+)</expression> | ||
</RegExp> | ||
<RegExp input="$$2" output="\1" dest="6"> | ||
<expression noclean="1">(.+)(?:Ft%2e|Feat%2e|Ft.|Feat.|%20and%20)</expression> | ||
</RegExp> | ||
<RegExp input="$$6" output="\1" dest="4"> | ||
<expression>(.+)</expression> | ||
</RegExp> | ||
<expression/> | ||
</RegExp> | ||
</CreateAlbumSearchUrl> | ||
<GetAlbumSearchResults dest="8"> | ||
<RegExp input="$$5" output="<results>\1</results>" dest="8"> | ||
<RegExp input="$$1" output="<entity><year>\5-\4-T#\6</year><artist>\3</artist><title>\2</title><url cache="mb-\1-album.xml">http://musicbrainz.org/ws/2/release/\1?inc=recordings+release-groups+artists+labels+ratings</url></entity>" dest="5"> | ||
<expression repeat="yes">id="([^"]*)"><title>([^<]*)</title><status>Official</status><text-representation><language>[^<]*</language><script>[^<]*</script></text-representation><artist-credit><name-credit(?:>)*(?:\sjoinphrase="[^"]*">)*(?:<name>[^<]*</name)*(?:>)*<artist\sid="[^"]*"><name>([^<]*)</name>(?:<sort-name>[^<]*</sort-name>)*(?:<disambiguation>[^<]*</disambiguation>)*(?:<alias-list>.*?</alias-list>)*</artist></name-credit>(?:<name-credit(?:>)*(?:\sjoinphrase="[^"]*">)*(?:<name>[^<]*</name)*(?:>)*<artist\sid="[^"]*"><name>[^<]*</name>(?:<sort-name>[^<]*</sort-name>)*(?:<disambiguation>[^<]*</disambiguation>)*(?:<alias-list>.*?</alias-list>)*</artist></name-credit>)*</artist-credit><release-group\stype="Album"\sid="[^"]*">(?:<primary-type>[^<]*</primary-type>)*(?:<secondary-type-list><secondary-type>[^<]*</secondary-type></secondary-type-list>)*</release-group><date>(\d{4})[^<]*</date>(?:<country>)*([^<]*)?.*?<track-list\scount="(\d+)</expression> | ||
</RegExp> | ||
<RegExp input="$$1" output="<entity><year>\5-\4-T#\6</year><artist>\3</artist><title>\2</title><url cache="mb-\1-album.xml">http://musicbrainz.org/ws/2/release/\1?inc=recordings+release-groups+artists+labels+ratings</url></entity>" dest="5+"> | ||
<expression repeat="yes">id="([^"]*)"><title>([^<]*)</title><status>Official</status><text-representation><language>[^<]*</language><script>[^<]*</script></text-representation><artist-credit><name-credit(?:>)*(?:\sjoinphrase="[^"]*">)*(?:<name>[^<]*</name)*(?:>)*<artist\sid="[^"]*"><name>([^<]*)</name>(?:<sort-name>[^<]*</sort-name>)*(?:<disambiguation>[^<]*</disambiguation>)*(?:<alias-list>.*?</alias-list>)*</artist></name-credit>(?:<name-credit(?:>)*(?:\sjoinphrase="[^"]*">)*(?:<name>[^<]*</name)*(?:>)*<artist\sid="[^"]*"><name>[^<]*</name>(?:<sort-name>[^<]*</sort-name>)*(?:<disambiguation>[^<]*</disambiguation>)*(?:<alias-list>.*?</alias-list>)*</artist></name-credit>)*</artist-credit><release-group(?:\stype="[^"]*")*\sid="[^"]*">(?:<primary-type>[^<]*</primary-type>)*(?:<secondary-type-list><secondary-type>[^<]*</secondary-type></secondary-type-list>)*</release-group><date>(\d{4})[^<]*</date>(?:<country>)*([^<]*)?.*?<track-list\scount="(\d+)</expression> | ||
</RegExp> | ||
<expression noclean="1" /> | ||
</RegExp> | ||
</GetAlbumSearchResults> | ||
<GetAlbumDetails dest="3"> | ||
<RegExp input="$$5" output="<details>\1</details>" dest="3"> | ||
<!--MBID - release--> | ||
<RegExp input="$$1" output="\1" dest="3"> | ||
<expression>id="([^"]*)</expression> | ||
</RegExp> | ||
<!--MBID - release group--> | ||
<RegExp input="$$1" output="\1" dest="4"> | ||
<expression><release-group type="[^"]*" id="([^"]*)"</expression> | ||
</RegExp> | ||
<!--Album title--> | ||
<RegExp input="$$1" output="\1" dest="7"> | ||
<expression trim="1"><release id="[^"]*"><title>([^<]*)<</expression> | ||
</RegExp> | ||
<!--Artist name--> | ||
<RegExp input="$$1" output="\1" dest="8"> | ||
<expression trim="1"><release id="[^"]*"><title>[^<]*<.*?<artist id="[^"]*"><name>([^<]*)<</expression> | ||
</RegExp> | ||
<RegExp input="$$3" output="<chain function="GetMBAlbumTitleByMBID">\1</chain>" dest="5"> | ||
<expression noclean="1">(.+)</expression> | ||
</RegExp> | ||
<RegExp input="$$3" output="<chain function="GetMBAlbumArtistByMBID">\1</chain>" dest="5+"> | ||
<expression noclean="1">(.+)</expression> | ||
</RegExp> | ||
<RegExp input="$$3" output="<chain function="GetMBAlbumLabelByMBID">\1</chain>" dest="5+"> | ||
<expression noclean="1">(.+)</expression> | ||
</RegExp> | ||
<RegExp input="$$3" output="<chain function="GetMBAlbumDateByMBID">\1</chain>" dest="5+"> | ||
<expression noclean="1">(.+)</expression> | ||
</RegExp> | ||
<RegExp input="$$3" output="<chain function="GetMBAlbumTracksByMBID">\1</chain>" dest="5+"> | ||
<expression noclean="1">(.+)</expression> | ||
</RegExp> | ||
<RegExp input="$INFO[albumreviewsource]" output="<url function="GetAMGAlbumReview" cache="mb-$$4-rg.xml">http://musicbrainz.org/ws/2/release-group/$$4?inc=url-rels</url>" dest="5+"> | ||
<expression>allmusic.com</expression> | ||
</RegExp> | ||
<RegExp input="$INFO[albumreviewsource]" output="<chain function="GetLastFMAlbumReviewByAlbumAndArtist">$$7::$$8::$$7::$$8</chain>" dest="5+"> | ||
<expression>last.fm</expression> | ||
</RegExp> | ||
<RegExp input="$INFO[albumreviewsource]" output="<url function="GetAmazonDEAlbumReview">http://musicbrainz.org/ws/2/release-group/$$4?inc=url-rels</url>" dest="5+"> | ||
<expression>amazon.de</expression> | ||
</RegExp> | ||
<RegExp input="$INFO[albumratingsource]" output="<chain function="GetMBAlbumRatingByMBID">$$3</chain>" dest="5+"> | ||
<expression>MusicBrainz</expression> | ||
</RegExp> | ||
<RegExp input="$INFO[albumratingsource]" output="<url function="GetAMGAlbumRating" cache="mb-$$4-rg.xml">http://musicbrainz.org/ws/2/release-group/$$4?inc=url-rels</url>" dest="5+"> | ||
<expression>allmusic.com</expression> | ||
</RegExp> | ||
<RegExp input="$INFO[albumstylessource]" output="<url function="GetAMGAlbumStyles" cache="mb-$$4-rg.xml">http://musicbrainz.org/ws/2/release-group/$$4?inc=url-rels</url>" dest="5+"> | ||
<expression>allmusic.com</expression> | ||
</RegExp> | ||
<RegExp input="$INFO[albummoodssource]" output="<url function="GetAMGAlbumMoods" cache="mb-$$4-rg.xml">http://musicbrainz.org/ws/2/release-group/$$4?inc=url-rels</url>" dest="5+"> | ||
<expression>allmusic.com</expression> | ||
</RegExp> | ||
<RegExp input="$INFO[albumthemessource]" output="<url function="GetAMGAlbumThemes" cache="mb-$$4-rg.xml">http://musicbrainz.org/ws/2/release-group/$$4?inc=url-rels</url>" dest="5+"> | ||
<expression>allmusic.com</expression> | ||
</RegExp> | ||
<RegExp conditional="fanarttvalbumthumbs" input="$$1" output="<chain function="GetFanartTvAlbumThumbsByMBID">$$4</chain>" dest="5+"> | ||
<expression noclean="1" /> | ||
</RegExp> | ||
<RegExp conditional="allmusicalbumthumbs" input="$$1" output="<url function="GetAMGAlbumThumbs" cache="mb-$$4-rg.xml">http://musicbrainz.org/ws/2/release-group/$$4?inc=url-rels</url>" dest="5+"> | ||
<expression noclean="1" /> | ||
</RegExp> | ||
<RegExp conditional="lastfmalbumthumbs" input="$$1" output="<chain function="GetLastFMAlbumThumbs">$$7::$$8::$$7::$$8</chain>" dest="5+"> | ||
<expression noclean="1" /> | ||
</RegExp> | ||
<expression noclean="1" /> | ||
</RegExp> | ||
</GetAlbumDetails> | ||
|
||
<GetAMGAlbumReview dest="5"> | ||
<RegExp input="$$2" output="<details>\1</details>" dest="5"> | ||
<RegExp input="$$1" output="<chain function="GetAMGAlbumReviewByAMGID">\1</chain>" dest="2"> | ||
<expression noclean="1">allmusic.com/album/([^<]*)</expression> | ||
</RegExp> | ||
<expression noclean="1" /> | ||
</RegExp> | ||
</GetAMGAlbumReview> | ||
|
||
<GetAMGAlbumRating dest="5"> | ||
<RegExp input="$$2" output="<details>\1</details>" dest="5"> | ||
<RegExp input="$$1" output="<chain function="GetAMGAlbumRatingByAMGID">\1</chain>" dest="2"> | ||
<expression noclean="1">allmusic.com/album/([^<]*)</expression> | ||
</RegExp> | ||
<expression noclean="1" /> | ||
</RegExp> | ||
</GetAMGAlbumRating> | ||
|
||
<GetAMGAlbumStyles dest="5"> | ||
<RegExp input="$$2" output="<details>\1</details>" dest="5"> | ||
<RegExp input="$$1" output="<chain function="GetAMGAlbumStylesByAMGID">\1</chain>" dest="2"> | ||
<expression noclean="1">allmusic.com/album/([^<]*)</expression> | ||
</RegExp> | ||
<expression noclean="1" /> | ||
</RegExp> | ||
</GetAMGAlbumStyles> | ||
|
||
<GetAMGAlbumMoods dest="5"> | ||
<RegExp input="$$2" output="<details>\1</details>" dest="5"> | ||
<RegExp input="$$1" output="<chain function="GetAMGAlbumMoodsByAMGID">\1</chain>" dest="2"> | ||
<expression noclean="1">allmusic.com/album/([^<]*)</expression> | ||
</RegExp> | ||
<expression noclean="1" /> | ||
</RegExp> | ||
</GetAMGAlbumMoods> | ||
|
||
<GetAMGAlbumThemes dest="5"> | ||
<RegExp input="$$2" output="<details>\1</details>" dest="5"> | ||
<RegExp input="$$1" output="<chain function="GetAMGAlbumThemesByAMGID">\1</chain>" dest="2"> | ||
<expression noclean="1">allmusic.com/album/([^<]*)</expression> | ||
</RegExp> | ||
<expression noclean="1" /> | ||
</RegExp> | ||
</GetAMGAlbumThemes> | ||
|
||
<GetAMGAlbumThumbs dest="5"> | ||
<RegExp input="$$2" output="<details>\1</details>" dest="5"> | ||
<RegExp input="$$1" output="<chain function="GetAMGAlbumThumbsByAMGID">\1</chain>" dest="2"> | ||
<expression noclean="1">allmusic.com/album/([^<]*)</expression> | ||
</RegExp> | ||
<expression noclean="1" /> | ||
</RegExp> | ||
</GetAMGAlbumThumbs> | ||
|
||
<GetAmazonDEAlbumReview dest="5"> | ||
<RegExp input="$$2" output="<details>\1</details>" dest="5"> | ||
<RegExp input="$$1" output="<chain function="GetAmazonDEAlbumReviewByASIN">\1</chain>" dest="2"> | ||
<expression noclean="1">http://www.amazon.de/gp/product/([^<]*)</expression> | ||
</RegExp> | ||
<expression noclean="1" /> | ||
</RegExp> | ||
</GetAmazonDEAlbumReview> | ||
|
||
</scraper> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[B]1.2.2[/B] | ||
Fixed: accommodate new Frodo style URL encoding | ||
|
||
[B]1.2.1[/B] | ||
Removed: '&' sign from artist splitter | ||
|
||
[B]1.2.0[/B] | ||
Added: scraping album review from amazon.de (if link exist on MusicBrainz) | ||
|
||
[B]1.1.4[/B] | ||
Fixed: typo blocks preferring album in search result | ||
|
||
[B]1.1.3[/B] | ||
Fixed: won't find tracks without recording id | ||
|
||
[B]1.1.2[/B] | ||
Fixed: won't find tracks without duration | ||
|
||
[B]1.1.1[/B] | ||
Fixed: artists won't find with 'and' in their name | ||
|
||
[B]1.1.0[/B] | ||
Added: trying to get album info when multiple artists are credited (first artist will be used) | ||
Fixed: will not find some albums | ||
|
||
[B]1.0.3[/B] | ||
Fixed: Some Album releases were not found | ||
|
||
[B]1.0.2[/B] | ||
Fixed: Track Duration from MusicBrainz was wrong in certain cases. Credits to scudlee! | ||
|
||
[B]1.0.1[/B] | ||
Fixed: scraping moods from allmusic.com | ||
|
||
[B]1.0.0[/B] | ||
Initial version |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions
13
addons/metadata.album.universal/resources/language/English/strings.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<strings> | ||
<string id="30000">Grab Album Thumbs from fanart.tv</string> | ||
<string id="30001">Grab Album Thumbs from Last.fm</string> | ||
<string id="30002">Get Album Review from</string> | ||
<string id="30003"> Preferred Language</string> | ||
<string id="30004">Get Album Rating from</string> | ||
<string id="30005">Get Album Styles from</string> | ||
<string id="30006">Get Album Moods from</string> | ||
<string id="30007">Get Album Themes from</string> | ||
<string id="30008">Grab Album Thumbs from allmusic.com</string> | ||
<string id="30009">Artwork</string> | ||
</strings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<settings> | ||
<category label="128"> | ||
<setting type="lsep" label="General Settings"/> | ||
<setting label="30002" type="labelenum" values="last.fm|amazon.de|None" id="albumreviewsource" default="last.fm"/> | ||
<setting label="30003" type="labelenum" values="en|de|es|fr|it|jp|pl|pt|ru|sv|tr|zh" id="lastfmlanguage" default="en" visible="eq(-1,0)"/> | ||
<setting type="sep"/> | ||
<setting label="30004" type="labelenum" values="MusicBrainz|allmusic.com|None" id="albumratingsource" default="MusicBrainz"/> | ||
<setting label="30005" type="labelenum" values="allmusic.com|None" id="albumstylessource" default="allmusic.com"/> | ||
<setting label="30006" type="labelenum" values="allmusic.com|None" id="albummoodssource" default="allmusic.com"/> | ||
<setting label="30007" type="labelenum" values="allmusic.com|None" id="albumthemessource" default="allmusic.com"/> | ||
</category> | ||
|
||
<category label="30009"> | ||
<setting type="lsep" label="Artwork Settings"/> | ||
<setting label="30000" type="bool" id="fanarttvalbumthumbs" default="true"/> | ||
<setting label="30001" type="bool" id="lastfmalbumthumbs" default="true"/> | ||
<setting label="30008" type="bool" id="allmusicalbumthumbs" default="true"/> | ||
</category> | ||
</settings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<addon id="metadata.artists.universal" | ||
name="Universal Artist Scraper" | ||
version="2.0.6" | ||
provider-name="Team XBMC"> | ||
<requires> | ||
<import addon="xbmc.metadata" version="1.0"/> | ||
<import addon="metadata.common.last.fm" version="1.4.1"/> | ||
<import addon="metadata.common.allmusic.com" version="2.4.1"/> | ||
<import addon="metadata.common.musicbrainz.org" version="1.2.1"/> | ||
<import addon="metadata.common.htbackdrops.com" version="1.2.0"/> | ||
<import addon="metadata.common.fanart.tv" version="1.1.0"/> | ||
</requires> | ||
<extension point="xbmc.metadata.scraper.artists" | ||
language="en" | ||
library="artistuniversal.xml"/> | ||
<extension point="xbmc.addon.metadata"> | ||
<summary lang="en">Universal Scraper for Artists</summary> | ||
<description lang="en">This scraper collects information from the following supported sites: MusicBrainz, last.fm, and allmusic.com, while grabs artwork from: fanart.tv, htbackdrops.com, last.fm and allmusic.com. It can be set field by field that from which site you want that specific information. | ||
|
||
The initial search is always done on MusicBrainz. In case allmusic link is not added on the MusicBrainz site fields from allmusic.com cannot be fetched (very easy to add those missing links though).</description> | ||
<platform>all</platform> | ||
</extension> | ||
</addon> |
Oops, something went wrong.