diff options
author | Martijn Kaijser <mcm.kaijser@gmail.com> | 2012-07-08 14:09:06 +0200 |
---|---|---|
committer | Martijn Kaijser <mcm.kaijser@gmail.com> | 2012-07-08 14:09:06 +0200 |
commit | cfb94b4d1baae0b3c0cf3909f247e73666f12b35 (patch) | |
tree | a065399878d4434395354c51979ee40724278854 /addons/metadata.artists.universal | |
parent | 4c4ccf0e898d8ad1636a9fec5d22c4b1195ca520 (diff) |
add artists/album universal scrapers for music and last.fm for musicvideos
Diffstat (limited to 'addons/metadata.artists.universal')
-rw-r--r-- | addons/metadata.artists.universal/addon.xml | 24 | ||||
-rw-r--r-- | addons/metadata.artists.universal/artistuniversal.xml | 146 | ||||
-rw-r--r-- | addons/metadata.artists.universal/changelog.txt | 37 | ||||
-rw-r--r-- | addons/metadata.artists.universal/icon.png | bin | 0 -> 59634 bytes | |||
-rw-r--r-- | addons/metadata.artists.universal/resources/language/English/strings.xml | 24 | ||||
-rw-r--r-- | addons/metadata.artists.universal/resources/settings.xml | 37 |
6 files changed, 268 insertions, 0 deletions
diff --git a/addons/metadata.artists.universal/addon.xml b/addons/metadata.artists.universal/addon.xml new file mode 100644 index 0000000000..2d94544ae6 --- /dev/null +++ b/addons/metadata.artists.universal/addon.xml @@ -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> diff --git a/addons/metadata.artists.universal/artistuniversal.xml b/addons/metadata.artists.universal/artistuniversal.xml new file mode 100644 index 0000000000..ec474e1e70 --- /dev/null +++ b/addons/metadata.artists.universal/artistuniversal.xml @@ -0,0 +1,146 @@ +<?xml version="1.0" encoding="UTF-8"?> +<scraper framework="1.1" date="2012-05-28"> + <NfoUrl dest="3"> + <RegExp input="$$1" output="<url>http://www.musicbrainz.org/ws/2/artist/\1?inc=url-rels</url>" dest="3"> + <expression>http://musicbrainz.org/artist/(.+)</expression> + </RegExp> + </NfoUrl> + <CreateArtistSearchUrl dest="3"> + <RegExp input="$$1" output="<url>http://search.musicbrainz.org/ws/2/artist/?fmt=xml&query=artist:"$$4"&limit=100</url>" dest="3"> + <RegExp input="$$1" output="\1" dest="4"> + <expression noclean="1">(.+)</expression> + </RegExp> + <RegExp input="$$1" 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> + </CreateArtistSearchUrl> + <GetArtistSearchResults dest="8"> + <RegExp input="$$5" output="<results>\1</results>" dest="8"> + <RegExp input="$$1" output="<entity><title>\2</title><genre>\7</genre><url cache="mb-\1-artist.xml">http://www.musicbrainz.org/ws/2/artist/\1?inc=url-rels</url></entity>" dest="9"> + <expression repeat="yes" noclean="1">artist ext:score="[^"]*"(?:\stype="[^"]*")* id="([^"]*)"><name>([^<]*)</name>(<sort-name>[^<]*</sort-name>)?(<gender>[^<]*</gender>)?(<country>[^<]*</country>)?(<disambiguation>([^<]*))?</expression> + </RegExp> + <RegExp input="$$9" output="\1" dest="5"> + <expression noclean="1">(.+)</expression> + </RegExp> + <expression noclean="1"/> + </RegExp> + </GetArtistSearchResults> + <GetArtistDetails dest="3" clearbuffers="no"> + <RegExp input="$$5" output="<details>\1</details>" dest="3"> + <!--MBID - Artist--> + <RegExp input="$$1" output="\1" dest="8"> + <expression noclean="1"><artist(?:\stype="[^"]*")* id="([^"]*)"><name>([^<]*)</expression> + </RegExp> + <!--AMGID - Artist--> + <RegExp input="$$1" output="\2" dest="9"> + <expression noclean="1">><relation type="allmusic"><target>http://(www.)?allmusic.com/artist/([^<]*)</expression> + </RegExp> + <RegExp input="$$8" conditional="fanarttvthumbs" output="<chain function="GetFanartTvArtistThumbsByMBID">\1</chain>" dest="5+"> + <expression/> + </RegExp> + <RegExp input="$$8" conditional="htbthumbs" output="<chain function="GetHTBThumbsByMBID">\1</chain>" dest="5+"> + <expression/> + </RegExp> + <RegExp input="$$8" conditional="lastfmartistthumbs" output="<chain function="GetLastFMArtistThumbsByMBID">\1</chain>" dest="5+"> + <expression/> + </RegExp> + <RegExp input="$$8" conditional="fanarttvfanart" output="<chain function="GetFanartTvArtistFanartsByMBID">\1</chain>" dest="5+"> + <expression/> + </RegExp> + <RegExp input="$$8" conditional="htbfanart" output="<chain function="GetHTBFanartByMBID">\1</chain>" dest="5+"> + <expression/> + </RegExp> + <RegExp input="$$9" output="<chain function="GetAMGData">\1</chain>" dest="5+"> + <expression noclean="1">(.+)</expression> + </RegExp> + <RegExp input="$$9" output="<chain function="AMGFallback">\1</chain>" dest="5+"> + <expression noclean="1">^$</expression> + </RegExp> + <RegExp input="$INFO[discogsource]" output="<chain function="GetMBDiscographyByMBID">$$8</chain>" dest="5+"> + <expression>MusicBrainz</expression> + </RegExp> + <RegExp input="$INFO[lifespansource]" output="<chain function="GetMBLafeSpanByMBID">$$8</chain>" dest="5+"> + <expression>MusicBrainz</expression> + </RegExp> + <RegExp input="$INFO[biogsource]" output="<chain function="GetLastFMBiographyByMBID">$$8</chain>" dest="5+"> + <expression>last.fm</expression> + </RegExp> + <RegExp input="$INFO[discogsource]" output="<chain function="GetLastFMDiscographyByMBID">$$8</chain>" dest="5+"> + <expression>last.fm</expression> + </RegExp> + <RegExp input="$INFO[genressource]" output="<chain function="GetLastFMArtistGenresByMBID">$$8</chain>" dest="5+"> + <expression>last.fm</expression> + </RegExp> + <RegExp input="$INFO[stylessource]" output="<chain function="GetLastFMArtistStylesByMBID">$$8</chain>" dest="5+"> + <expression>last.fm</expression> + </RegExp> + <expression noclean="1"/> + </RegExp> + </GetArtistDetails> + + <GetAMGData dest="5" clearbuffers="no"> + <RegExp input="$$2" output="<details>\1</details>" dest="5"> + <RegExp input="$$1" output="\1" dest="9"> + <expression/> + </RegExp> + <RegExp input="" output="" dest="2"> + <expression /> + </RegExp> + <RegExp input="$INFO[discogsource]" output="<chain function="GetAMGDiscographyByAMGID">$$9</chain>" dest="2"> + <expression>allmusic.com</expression> + </RegExp> + <RegExp input="$INFO[lifespansource]" output="<chain function="GetAMGArtistLifeSpanByAMGID">$$9</chain>" dest="2+"> + <expression>allmusic.com</expression> + </RegExp> + <RegExp input="$INFO[biogsource]" output="<chain function="GetAMGBiographyByAMGID">$$9</chain>" dest="2+"> + <expression>allmusic.com</expression> + </RegExp> + <RegExp input="$INFO[genressource]" output="<chain function="GetAMGArtistGenresByAMGID">$$9</chain>" dest="2+"> + <expression>allmusic.com</expression> + </RegExp> + <RegExp input="$INFO[stylessource]" output="<chain function="GetAMGArtistStylesByAMGID">$$9</chain>" dest="2+"> + <expression>allmusic.com</expression> + </RegExp> + <RegExp input="$INFO[moodssource]" output="<chain function="GetAMGArtistMoodsByAMGID">$$9</chain>" dest="2+"> + <expression>allmusic.com</expression> + </RegExp> + <RegExp input="$INFO[yearsasource]" output="<chain function="GetAMGArtistYearsActiveByAMGID">$$9</chain>" dest="2+"> + <expression>allmusic.com</expression> + </RegExp> + <RegExp input="$$9" conditional="allmusicartistthumbs" output="<chain function="GetAMGArtistThumbsByAMGID">\1</chain>" dest="2+"> + <expression/> + </RegExp> + <expression noclean="1" /> + </RegExp> + </GetAMGData> + + <AMGFallback dest="5" clearbuffers="no"> + <RegExp input="$$11" output="<details>\1</details>" dest="5"> + <RegExp input="$INFO[biogfbsource]" output="<chain function="GetLastFMBiographyByMBID">$$8</chain>" dest="11+"> + <expression>last.fm</expression> + </RegExp> + <RegExp input="$INFO[discogfbsource]" output="<chain function="GetLastFMDiscographyByMBID">$$8</chain>" dest="11+"> + <expression>last.fm</expression> + </RegExp> + <RegExp input="$INFO[discogfbsource]" output="<chain function="GetMBDiscographyByMBID">$$8</chain>" dest="11+"> + <expression>MusicBrainz</expression> + </RegExp> + <RegExp input="$INFO[genresfbsource]" output="<chain function="GetLastFMArtistGenresByMBID">$$8</chain>" dest="11+"> + <expression>last.fm</expression> + </RegExp> + <RegExp input="$INFO[stylesfbsource]" output="<chain function="GetLastFMArtistStylesByMBID">$$8</chain>" dest="11+"> + <expression>last.fm</expression> + </RegExp> + <RegExp input="$INFO[lifespanfbsource]" output="<chain function="GetMBLafeSpanByMBID">$$8</chain>" dest="11+"> + <expression>MusicBrainz</expression> + </RegExp> + <expression noclean="1" /> + </RegExp> + </AMGFallback> + +</scraper> diff --git a/addons/metadata.artists.universal/changelog.txt b/addons/metadata.artists.universal/changelog.txt new file mode 100644 index 0000000000..961ee0b989 --- /dev/null +++ b/addons/metadata.artists.universal/changelog.txt @@ -0,0 +1,37 @@ +[B]2.0.6[/B] +Fixed: accommodate new Frodo style URL encoding + +[B]2.0.5[/B] +Removed: '&' sign from artist splitter + +[B]2.0.4[/B] +Improved: further improve search results for artists with almost no data + +[B]2.0.3[/B] +Improved: search results are now return artists with almost no data + +[B]2.0.2[/B] +Fixed: artists won't find with 'and' in their name + +[B]2.0.1[/B] +Fixed: potential crashes due to infinite loop + +[B]2.0.0[/B] +Added: Fallback per field +Added: scraping in case of multiple artists (feat., ft., &, and) +Added: other improvements + +[B]1.2.1[/B] +Added: Enable all source for artwork by default + +[B]1.2.0[/B] +Added: extra options for Artist Biography + +[B]1.1.1[/B] +Added: handling of new format of allmusic link + +[B]1.1.0[/B] +Added: language setting for last.fm artist biography + +[B]1.0.0[/B] +Initial version
\ No newline at end of file diff --git a/addons/metadata.artists.universal/icon.png b/addons/metadata.artists.universal/icon.png Binary files differnew file mode 100644 index 0000000000..7c3d600dfc --- /dev/null +++ b/addons/metadata.artists.universal/icon.png diff --git a/addons/metadata.artists.universal/resources/language/English/strings.xml b/addons/metadata.artists.universal/resources/language/English/strings.xml new file mode 100644 index 0000000000..ae97b7900c --- /dev/null +++ b/addons/metadata.artists.universal/resources/language/English/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<strings> + <string id="30000">Enable Artist Fanarts from HTBackdrops.com</string> + <string id="30001">Enable Artist Thumbs from allmusic.com</string> + <string id="30002">Enable Artist Thumbs from last.fm</string> + <string id="30003">Enable Artist Thumbs from HTBackdrops.com</string> + <string id="30004">Enable Artist Fanarts from fanart.tv</string> + <string id="30005">Enable Artist Thumbs from fanart.tv</string> + <string id="30006">Get Artist Biography from</string> + <string id="30007">Artwork</string> + <string id="30008">Get Artist Discography from</string> + <string id="30009">Get Artist Genres from</string> + <string id="30010">Get Artist Styles from</string> + <string id="30011">Get Artist Life-Span from</string> + <string id="30012">Get Artist Moods from</string> + <string id="30014">Get Artist Years Active from</string> + <string id="30015"> Preferred Language</string> + <string id="30016">Fallback to Artist Biography from</string> + <string id="30017">Fallback to Artist Discography from</string> + <string id="30018">Fallback to Artist Genres from</string> + <string id="30019">Fallback to Artist Styles from</string> + <string id="30020">Fallback to Artist Life-Span from</string> + <string id="30021">Fallbacks</string> +</strings> diff --git a/addons/metadata.artists.universal/resources/settings.xml b/addons/metadata.artists.universal/resources/settings.xml new file mode 100644 index 0000000000..c91d6c548a --- /dev/null +++ b/addons/metadata.artists.universal/resources/settings.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<settings> + <category label="128"> + <setting label="30006" type="labelenum" values="last.fm|None" id="biogsource" default="last.fm"/> + <setting label="30015" 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="30008" type="labelenum" values="last.fm|MusicBrainz|allmusic.com|None" id="discogsource" default="MusicBrainz"/> + <setting type="sep"/> + <setting label="30009" type="labelenum" values="last.fm|allmusic.com|None" id="genressource" default="last.fm"/> + <setting label="30010" type="labelenum" values="last.fm|allmusic.com|None" id="stylessource" default="last.fm"/> + <setting label="30011" type="labelenum" values="allmusic.com|MusicBrainz|None" id="lifespansource" default="allmusic.com"/> + <setting label="30012" type="labelenum" values="allmusic.com|None" id="moodssource" default="allmusic.com"/> + <setting label="30014" type="labelenum" values="allmusic.com|None" id="yearsasource" default="allmusic.com"/> + </category> + + <category label="30021"> + <setting label="30016" type="labelenum" values="last.fm|None" id="biogfbsource" default="None"/> + <setting label="30015" 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="30017" type="labelenum" values="last.fm|MusicBrainz|None" id="discogfbsource" default="None" visible="false"/> + <setting label="30018" type="labelenum" values="last.fm|allmusic.com|None" id="genresfbsource" default="None"/> + <setting label="30019" type="labelenum" values="last.fm|allmusic.com|None" id="stylesfbsource" default="None"/> + <setting label="30020" type="labelenum" values="MusicBrainz|allmusic.com|None" id="lifespanfbsource" default="None"/> + </category> + + <category label="30007"> + <setting type="lsep" label="Thumb Sources"/> + <setting label="30005" type="bool" id="fanarttvthumbs" default="true"/> + <setting label="30003" type="bool" id="htbthumbs" default="true"/> + <setting label="30002" type="bool" id="lastfmartistthumbs" default="true"/> + <setting label="30001" type="bool" id="allmusicartistthumbs" default="true"/> + <setting type="lsep" label="Fanart Sources"/> + <setting label="30004" type="bool" id="fanarttvfanart" default="true"/> + <setting label="30000" type="bool" id="htbfanart" default="true"/> + </category> + +</settings> |