diff options
author | theuni <theuni-nospam-@xbmc.org> | 2012-01-19 03:36:42 -0500 |
---|---|---|
committer | theuni <theuni-nospam-@xbmc.org> | 2012-01-19 03:37:04 -0500 |
commit | ede5484cd38fadd92632d3e43e162683ba807ee2 (patch) | |
tree | 3ddd7a7201d2dc5a2f19ca5b441f78f414ec088f /addons/metadata.themoviedb.org | |
parent | f9573f887b4460378d9b879de43a3e938dd1dc13 (diff) |
sync: tmdb with addons repo
Diffstat (limited to 'addons/metadata.themoviedb.org')
-rw-r--r-- | addons/metadata.themoviedb.org/addon.xml | 8 | ||||
-rw-r--r-- | addons/metadata.themoviedb.org/changelog.txt | 4 | ||||
-rw-r--r-- | addons/metadata.themoviedb.org/resources/settings.xml | 2 | ||||
-rw-r--r-- | addons/metadata.themoviedb.org/tmdb.xml | 135 |
4 files changed, 97 insertions, 52 deletions
diff --git a/addons/metadata.themoviedb.org/addon.xml b/addons/metadata.themoviedb.org/addon.xml index 3ec0386bcf..575cce8334 100644 --- a/addons/metadata.themoviedb.org/addon.xml +++ b/addons/metadata.themoviedb.org/addon.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <addon id="metadata.themoviedb.org" name="The MovieDB" - version="2.0.2" + version="3.0.0" provider-name="Team XBMC"> <requires> <import addon="xbmc.metadata" version="1.0"/> - <import addon="metadata.common.themoviedb.org" version="2.0.0"/> - <import addon="metadata.common.hdtrailers.net" version="1.0.6"/> - <import addon="metadata.common.imdb.com" version="2.1.3"/> + <import addon="metadata.common.themoviedb.org" version="2.1.0"/> + <import addon="metadata.common.hdtrailers.net" version="1.0.7"/> + <import addon="metadata.common.imdb.com" version="2.1.5"/> <import addon="plugin.video.youtube" version="2.1.0" optional="true"/> </requires> <extension point="xbmc.metadata.scraper.movies" diff --git a/addons/metadata.themoviedb.org/changelog.txt b/addons/metadata.themoviedb.org/changelog.txt index ad77ba317d..e7e0109492 100644 --- a/addons/metadata.themoviedb.org/changelog.txt +++ b/addons/metadata.themoviedb.org/changelog.txt @@ -1,5 +1,5 @@ -[B]2.0.2[/B] -- changed: made the youtube addon (trailers) an optional dependency +[B]3.0.0[/B] +- major rewrite: utilize TMDb API v3, scraping set information, prioritize posters on the selected language [B]2.0.1[/B] - fixed: imdb url nfo not resolving tmdb id diff --git a/addons/metadata.themoviedb.org/resources/settings.xml b/addons/metadata.themoviedb.org/resources/settings.xml index 31ba8421ef..d711325a3c 100644 --- a/addons/metadata.themoviedb.org/resources/settings.xml +++ b/addons/metadata.themoviedb.org/resources/settings.xml @@ -5,5 +5,5 @@ <setting label="30004" type="bool" id="trailer" default="true"/> <setting label="30001" type="labelenum" values="No|480p|720p|1080p" id="TrailerQ" default="No"/> <setting label="30002" type="labelenum" values="da|fi|nl|de|it|es|fr|pl|hu|el|tr|ru|he|ja|pt|zh|cs|sl|hr|ko|en|sv|no" id="language" default="en"/> - <setting label="30003" type="bool" id="imdbrating" default="false"/> + <setting label="30003" type="labelenum" values="TMDb|IMDb" id="RatingS" default="TMDb"/> </settings> diff --git a/addons/metadata.themoviedb.org/tmdb.xml b/addons/metadata.themoviedb.org/tmdb.xml index 72b7cf34ea..8efd0894a5 100644 --- a/addons/metadata.themoviedb.org/tmdb.xml +++ b/addons/metadata.themoviedb.org/tmdb.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> -<scraper framework="1.1" date="2010-10-11"> +<scraper framework="1.1" date="2012-01-16"> <CreateSearchUrl dest="3"> - <RegExp input="$$1" output="<url>http://api.themoviedb.org/2.1/Movie.search/$INFO[language]/json/57983e31fb435df4df77afb854740ea9/\1$$4</url>" dest="3"> + <RegExp input="$$1" output="<url>http://api.themoviedb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&query=\1$$4&language=$INFO[language]</url>" dest="3"> <RegExp input="$$2" output="+\1" dest="4"> <expression clear="yes">(.+)</expression> </RegExp> @@ -9,31 +9,28 @@ </RegExp> </CreateSearchUrl> <NfoUrl dest="3"> - <RegExp input="$$1" output="<details><url>http://api.themoviedb.org/2.1/Movie.getInfo/$INFO[language]/json/57983e31fb435df4df77afb854740ea9/\2</url><id>\2</id></details>" dest="3"> + <RegExp input="$$1" output="<details><url>http://api.themoviedb.org/3/movie/\2?api_key=57983e31fb435df4df77afb854740ea9&$INFO[language]</url><id>\2</id></details>" dest="3"> <expression clear="yes" noclean="1">(themoviedb.org/movie/)([0-9]*)</expression> </RegExp> - <RegExp input="$$1" output="<details><url function="GetTMDBId">http://api.themoviedb.org/2.1/Movie.imdbLookup/$INFO[language]/json/57983e31fb435df4df77afb854740ea9/tt\1</url></details>" dest="3+"> + <RegExp input="$$1" output="<details><url>http://api.themoviedb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&$INFO[language]</url><id>\1</id></details>" dest="3"> <expression>imdb....?/title/tt([0-9]*)</expression> </RegExp> - <RegExp input="$$1" output="<details><url function="GetTMDBId">http://api.themoviedb.org/2.1/Movie.imdbLookup/$INFO[language]/json/57983e31fb435df4df77afb854740ea9/tt\1</url></details>" dest="3+"> + <RegExp input="$$1" output="<details><url>http://api.themoviedb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&$INFO[language]</url><id>\1</id></details>" dest="3"> <expression>imdb....?/Title\?([0-9]*)</expression> </RegExp> </NfoUrl> <GetTMDBId dest="3"> - <RegExp input="$$1" output="<details><url cache="tmdb-$INFO[language]-\1.json">http://api.themoviedb.org/2.1/Movie.getInfo/$INFO[language]/json/57983e31fb435df4df77afb854740ea9/\1</url><id>\1</id></details>" dest="3+"> + <RegExp input="$$1" output="<details><url cache="tmdb-$INFO[language]-\1.json">http://api.themoviedb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&language=$INFO[language]</url><id>\1</id></details>" dest="3+"> <expression>"movie","id":([0-9]*),</expression> </RegExp> </GetTMDBId> <GetSearchResults dest="8"> <RegExp input="$$3" output="<results>\1</results>" dest="8"> - <RegExp input="$$1" output="<entity><title>\1</title><id>\2</id><year>\3</year><url cache="tmdb-$INFO[language]-\2.json">http://api.themoviedb.org/2.1/Movie.getInfo/$INFO[language]/json/57983e31fb435df4df77afb854740ea9/\2</url></entity>" dest="3"> - <expression repeat="yes">"name":"([^"]*).*?"id":([^,]*).*?"released":"([0-9]*)</expression> + <RegExp input="$$1" output="<entity><title>\4</title><id>\1</id><year>\3</year><url cache="tmdb-$INFO[language]-\1.json">http://api.themoviedb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&language=$INFO[language]</url></entity>" dest="3"> + <expression repeat="yes">"id":([0-9]*),"original_title":"([^"]*)","release_date":"([0-9]+)-.*?"title":"([^"]*)</expression> </RegExp> - <RegExp input="$$1" output="<entity><title>\1</title><id>\2</id><year>\3</year><url cache="tmdb-$INFO[language]-\2.json">http://api.themoviedb.org/2.1/Movie.getInfo/$INFO[language]/json/57983e31fb435df4df77afb854740ea9/\2</url></entity>" dest="3+"> - <expression repeat="yes">"original_name":"([^"]*).*?"id":([^,]*).*?"released":"([0-9]*)</expression> - </RegExp> - <RegExp input="$$1" output="<entity><title>\1</title><id>\2</id><year>\3</year><url cache="tmdb-$INFO[language]-\2.json">http://api.themoviedb.org/2.1/Movie.getInfo/$INFO[language]/json/57983e31fb435df4df77afb854740ea9/\2</url></entity>" dest="3+"> - <expression repeat="yes">"alternative_name":"([^"]*).*?"id":([^,]*).*?"released":"([0-9]*)</expression> + <RegExp input="$$1" output="<entity><title>\2</title><id>\1</id><year>\3</year><url cache="tmdb-$INFO[language]-\1.json">http://api.themoviedb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&language=$INFO[language]</url></entity>" dest="3+"> + <expression repeat="yes">"id":([0-9]*),"original_title":"([^"]*)","release_date":"([0-9]+)-</expression> </RegExp> <expression noclean="1" /> </RegExp> @@ -41,54 +38,81 @@ <GetDetails dest="3"> <RegExp input="$$5" output="<details>\1</details>" dest="3"> <RegExp input="$$1" output="<id>\1</id>" dest="5"> - <expression noclean="1">"movie","id":([0-9]*),</expression> + <expression noclean="1">"id":([0-9]*),"imdb</expression> </RegExp> <RegExp input="$$1" output="<id>\1</id>" dest="5+"> - <expression clear="yes" noclean="1">"movie","id":[0-9]*,"imdb_id":"([^"]*)</expression> + <expression clear="yes" noclean="1">"id":[0-9]*,"imdb_id":"([^"]*)</expression> + </RegExp> + <RegExp input="$$1" output="\1" dest="9"> + <expression fixchars="1">"original_title":"([^"]*)</expression> + </RegExp> + <RegExp input="$$1" output="\1" dest="10"> + <expression fixchars="1">"title":"([^"]*)</expression> + </RegExp> + <RegExp input="$$10" output="<url function="ParseFallbackTMDBTitle" cache="tmdb-en-$$2.json">http://api.themoviedb.org/3/movie/$$2?api_key=57983e31fb435df4df77afb854740ea9&language=en</url>" dest="5+"> + <expression>^$</expression> </RegExp> - <RegExp conditional="keeporiginaltitle" input="$$1" output="<title>\1</title>" dest="5+"> - <expression fixchars="1">"original_name":"([^"]*)</expression> + <RegExp input="$$10" output="<title>\1</title>" dest="5+"> + <expression>(.+)</expression> </RegExp> - <RegExp input="$$1" output="<title>\1</title>" dest="5+"> - <expression fixchars="1">"name":"([^"]*)</expression> + <RegExp conditional="keeporiginaltitle" input="$$9" output="<title>\1</title>" dest="5+"> + <expression/> </RegExp> - <RegExp input="$$1" output="<originaltitle>\1</originaltitle>" dest="5+"> - <expression fixchars="1">"original_name":"([^"]*)</expression> + <RegExp input="$$9" output="<originaltitle>\1</originaltitle>" dest="5+"> + <expression/> </RegExp> <RegExp input="$$1" output="<year>\1</year>" dest="5+"> - <expression noclean="1">"released":"([0-9]+)-</expression> + <expression noclean="1">"release_date":"([0-9]+)-</expression> </RegExp> - <RegExp input="$$1" output="<runtime>\1</runtime>" dest="5+"> - <expression noclean="1">"runtime":([0-9]+)</expression> + <RegExp input="$$1" output="\1" dest="10"> + <expression clear="yes" noclean="1">"runtime":([0-9]+)</expression> </RegExp> - <RegExp input="$$1" output="<tagline>\1</tagline>" dest="5+"> - <expression fixchars="1">"tagline":"([^"]*)</expression> + <RegExp input="$$10" output="<url function="ParseFallbackTMDBRuntime" cache="tmdb-en-$$2.json">http://api.themoviedb.org/3/movie/$$2?api_key=57983e31fb435df4df77afb854740ea9&language=en</url>" dest="5+"> + <expression>^$</expression> </RegExp> - <RegExp input="$$1" output="\1" dest="6"> - <expression>"certification":"([^"]*)</expression> + <RegExp input="$$10" output="<runtime>\1</runtime>" dest="5+"> + <expression>(.+)</expression> </RegExp> - <RegExp input="$$6" output="<mpaa>Rated \1</mpaa>" dest="5+"> + <RegExp input="$$1" output="\1" dest="10"> + <expression clear="yes" fixchars="1">"tagline":"([^"]*)</expression> + </RegExp> + <RegExp input="$$10" output="<url function="ParseFallbackTMDBTagline" cache="tmdb-en-$$2.json">http://api.themoviedb.org/3/movie/$$2?api_key=57983e31fb435df4df77afb854740ea9&language=en</url>" dest="5+"> + <expression>^$</expression> + </RegExp> + <RegExp input="$$10" output="<tagline>\1</tagline>" dest="5+"> <expression>(.+)</expression> </RegExp> <RegExp input="$$1" output="\1" dest="7"> - <expression clear="yes" noclean="1">"studios":\[([^\]]*)</expression> + <expression clear="yes" noclean="1">"production_companies":\[([^\]]*)</expression> </RegExp> <RegExp input="$$7" output="<studio>\1</studio>" dest="5+"> <expression trim="1" fixchars="1">"name":"([^"]*)</expression> </RegExp> <RegExp input="$$1" output="\1" dest="7"> - <expression clear="yes" noclean="1">"countries":\[([^\]]*)</expression> + <expression clear="yes" noclean="1">"production_countries":\[([^\]]*)</expression> </RegExp> <RegExp input="$$7" output="<country>\1</country>" dest="5+"> <expression trim="1" fixchars="1">"name":"([^"]*)</expression> </RegExp> - <RegExp input="$$1" output="<director>\1</director>" dest="5+"> - <expression repeat="yes" fixchars="1">"name":"([^"]*)","job":"Director"</expression> + <RegExp input="$INFO[RatingS]" output="<chain function="GetIMDBRatingById">$$6</chain>" dest="5+"> + <RegExp input="$$1" output="\1" dest="6"> + <expression noclean="1">"id":[0-9]*,"imdb_id":"([^"]*)</expression> + </RegExp> + <expression>IMDb</expression> + </RegExp> + <RegExp input="$INFO[RatingS]" output="<chain function="GetTMDBRatingByIdChain">$$2</chain>" dest="5+"> + <expression>TMDb</expression> + </RegExp> + <RegExp input="$$2" output="<chain function="GetTMDBDirectorsByIdChain">$$2</chain>" dest="5+"> + <expression /> + </RegExp> + <RegExp input="$$2" output="<chain function="GetTMDBWitersByIdChain">$$2</chain>" dest="5+"> + <expression /> </RegExp> - <RegExp input="$$1" output="<credits>\1</credits>" dest="5+"> - <expression repeat="yes" fixchars="1">"name":"([^"]*)","job":"[^"]*","department":"Writing"</expression> + <RegExp input="$$2" output="<chain function="GetTMDBCertificationsByIdChain">$$2</chain>" dest="5+"> + <expression /> </RegExp> - <RegExp conditional="!imdbrating" input="$$2" output="<chain function="GetTMDBRatingByIdChain">$$2</chain>" dest="5+"> + <RegExp input="$$2" output="<chain function="GetTMDBSetByIdChain">$$2</chain>" dest="5+"> <expression /> </RegExp> <RegExp input="$$2" output="<chain function="GetTMDBPlotByIdChain">$$2</chain>" dest="5+"> @@ -100,9 +124,6 @@ <RegExp input="$$2" output="<chain function="GetTMDBGenresByIdChain">$$2</chain>" dest="5+"> <expression /> </RegExp> - <RegExp conditional="imdbrating" input="$$1" output="<chain function="GetIMDBRatingById">\1</chain>" dest="5+"> - <expression noclean="1">"movie","id":[0-9]*,"imdb_id":"([^"]*)</expression> - </RegExp> <RegExp input="$$2" output="<chain function="GetTMDBThumbsByIdChain">$$2</chain>" dest="5+"> <expression /> </RegExp> @@ -112,25 +133,49 @@ <RegExp conditional="trailer" input="$$2" output="<chain function="GetTMDBTrailerByIdChain">$$2</chain>" dest="5+"> <expression /> </RegExp> - <RegExp conditional="!trailer" input="$INFO[TrailerQ]" output="<chain function="GetHDTrailersnet480p">$$6</chain>" dest="5+"> + <RegExp input="$INFO[TrailerQ]" output="<chain function="GetHDTrailersnet480p">$$6</chain>" dest="5+"> <RegExp input="$$1" output="\1" dest="6"> - <expression noclean="1">"original_name":"([^"]*)</expression> + <expression clear="yes" noclean="1">"original_title":"([^"]*)</expression> </RegExp> <expression>480p</expression> </RegExp> - <RegExp conditional="!trailer" input="$INFO[TrailerQ]" output="<chain function="GetHDTrailersnet720p">$$6</chain>" dest="5+"> + <RegExp input="$INFO[TrailerQ]" output="<chain function="GetHDTrailersnet720p">$$6</chain>" dest="5+"> <RegExp input="$$1" output="\1" dest="6"> - <expression noclean="1">"original_name":"([^"]*)</expression> + <expression clear="yes" noclean="1">"original_title":"([^"]*)</expression> </RegExp> <expression>720p</expression> </RegExp> - <RegExp conditional="!trailer" input="$INFO[TrailerQ]" output="<chain function="GetHDTrailersnet1080p">$$6</chain>" dest="5+"> + <RegExp input="$INFO[TrailerQ]" output="<chain function="GetHDTrailersnet1080p">$$6</chain>" dest="5+"> <RegExp input="$$1" output="\1" dest="6"> - <expression noclean="1">"original_name":"([^"]*)</expression> + <expression clear="yes" noclean="1">"original_title":"([^"]*)</expression> </RegExp> <expression>1080p</expression> </RegExp> <expression noclean="1" /> </RegExp> </GetDetails> + <ParseFallbackTMDBTitle dest="5"> + <RegExp input="$$2" output="<details>\1</details>" dest="5"> + <RegExp input="$$1" output="<title>\1</title>" dest="2"> + <expression fixchars="1">"title":"([^"]*)</expression> + </RegExp> + <expression noclean="1" /> + </RegExp> + </ParseFallbackTMDBTitle> + <ParseFallbackTMDBRuntime dest="5"> + <RegExp input="$$2" output="<details>\1</details>" dest="5"> + <RegExp input="$$1" output="<runtime>\1</runtime>" dest="2"> + <expression noclean="1">"runtime":([0-9]+)</expression> + </RegExp> + <expression noclean="1" /> + </RegExp> + </ParseFallbackTMDBRuntime> + <ParseFallbackTMDBTagline dest="5"> + <RegExp input="$$2" output="<details>\1</details>" dest="5"> + <RegExp input="$$1" output="<tagline>\1</tagline>" dest="2"> + <expression fixchars="1">"tagline":"([^"]*)</expression> + </RegExp> + <expression noclean="1" /> + </RegExp> + </ParseFallbackTMDBTagline> </scraper> |