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.common.themoviedb.org | |
parent | f9573f887b4460378d9b879de43a3e938dd1dc13 (diff) |
sync: tmdb with addons repo
Diffstat (limited to 'addons/metadata.common.themoviedb.org')
-rw-r--r-- | addons/metadata.common.themoviedb.org/addon.xml | 2 | ||||
-rw-r--r-- | addons/metadata.common.themoviedb.org/tmdb.xml | 216 |
2 files changed, 161 insertions, 57 deletions
diff --git a/addons/metadata.common.themoviedb.org/addon.xml b/addons/metadata.common.themoviedb.org/addon.xml index b82ec53e60..7cd3d85820 100644 --- a/addons/metadata.common.themoviedb.org/addon.xml +++ b/addons/metadata.common.themoviedb.org/addon.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <addon id="metadata.common.themoviedb.org" name="The MovieDB common scraper functions" - version="2.0.0" + version="2.1.0" provider-name="Team XBMC"> <requires> <import addon="xbmc.metadata" version="1.0"/> diff --git a/addons/metadata.common.themoviedb.org/tmdb.xml b/addons/metadata.common.themoviedb.org/tmdb.xml index 1e9ac725f9..ee000716d6 100644 --- a/addons/metadata.common.themoviedb.org/tmdb.xml +++ b/addons/metadata.common.themoviedb.org/tmdb.xml @@ -1,19 +1,43 @@ <scraperfunctions> - <GetTMDBPlotByIdChain dest="4"> + + <GetTMDBCertificationsByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBPlot" cache="tmdb-$INFO[language]-tt\1.json">http://api.themoviedb.org/2.1/Movie.getInfo/en/json/57983e31fb435df4df77afb854740ea9/tt\1</url>" dest="5"> - <expression>tt([0-9]+)</expression> + <RegExp input="$$1" output="<url function="ParseTMDBCertifications" cache="tmdb-cert-\1.json">http://api.themoviedb.org/3/movie/\1/releases?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5"> + <expression /> </RegExp> - <RegExp input="$$1" output="<url function="ParseTMDBPlot" cache="tmdb-$INFO[language]-\1.json">http://api.themoviedb.org/2.1/Movie.getInfo/en/json/57983e31fb435df4df77afb854740ea9/\1</url>" dest="5"> - <expression>^([0-9]+)$</expression> + <expression noclean="1" /> + </RegExp> + </GetTMDBCertificationsByIdChain> + <ParseTMDBCertifications dest="5"> + <RegExp input="$$2" output="<details>\1</details>" dest="5"> + <RegExp input="$$1" output="<mpaa>Rated \1</mpaa>" dest="2"> + <expression fixchars="1">"US","certification":"([^"]*)</expression> + </RegExp> + <expression noclean="1" /> + </RegExp> + </ParseTMDBCertifications> + + <GetTMDBPlotByIdChain clearbuffers="no" dest="4"> + <RegExp input="$$5" output="<details>\1</details>" dest="4"> + <RegExp input="$$1" output="\1" dest="8"> + <expression clear="yes" noclean="1" /> + </RegExp> + <RegExp input="$$8" output="<url function="ParseTMDBPlot" cache="tmdb-$INFO[language]-\1.json">http://api.themoviedb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&language=$INFO[language]</url>" dest="5"> + <expression /> </RegExp> <expression noclean="1" /> </RegExp> </GetTMDBPlotByIdChain> <ParseTMDBPlot dest="5"> <RegExp input="$$2" output="<details>\1</details>" dest="5"> - <RegExp input="$$1" output="<plot>\1</plot>" dest="2"> - <expression fixchars="1">"overview":"(.*?)",</expression> + <RegExp input="$$1" output="\1" dest="9"> + <expression clear="yes" fixchars="1">"overview":"(.*?)",</expression> + </RegExp> + <RegExp input="$$9" output="<url function="ParseFallbackTMDBPlot" cache="tmdb-en-$$8.json">http://api.themoviedb.org/3/movie/$$8?api_key=57983e31fb435df4df77afb854740ea9&language=en</url>" dest="2"> + <expression>^$</expression> + </RegExp> + <RegExp input="$$9" output="<plot>\1</plot>" dest="2"> + <expression>(.+)</expression> </RegExp> <RegExp input="$$1" output="<outline>\1</outline>" dest="2+"> <expression fixchars="1">"overview":"(.{180,}?)[.?!]</expression> @@ -21,35 +45,102 @@ <expression noclean="1" /> </RegExp> </ParseTMDBPlot> - <GetTMDBCastByIdChain dest="4"> + <ParseFallbackTMDBPlot dest="5"> + <RegExp input="$$2" output="<details>\1</details>" dest="5"> + <RegExp input="$$1" output="<plot>\1</plot>" dest="2"> + <expression clear="yes" fixchars="1">"overview":"(.*?)",</expression> + </RegExp> + <RegExp input="$$1" output="<outline>\1</outline>" dest="2+"> + <expression fixchars="1">"overview":"(.{180,}?)[.?!]</expression> + </RegExp> + <expression noclean="1" /> + </RegExp> + </ParseFallbackTMDBPlot> + + <GetTMDBSetByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBCast" cache="tmdb-$INFO[language]-tt\1.json">http://api.themoviedb.org/2.1/Movie.getInfo/en/json/57983e31fb435df4df77afb854740ea9/tt\1</url>" dest="5"> - <expression>tt([0-9]+)</expression> + <RegExp input="$$1" output="<url function="ParseTMDBSet" cache="tmdb-$INFO[language]-\1.json">http://api.themoviedb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&language=$INFO[language]</url>" dest="5"> + <expression /> </RegExp> - <RegExp input="$$1" output="<url function="ParseTMDBCast" cache="tmdb-$INFO[language]-\1.json">http://api.themoviedb.org/2.1/Movie.getInfo/en/json/57983e31fb435df4df77afb854740ea9/\1</url>" dest="5"> - <expression>^([0-9]+)$</expression> + <expression noclean="1" /> + </RegExp> + </GetTMDBSetByIdChain> + <ParseTMDBSet dest="5"> + <RegExp input="$$2" output="<details>\1</details>" dest="5"> + <RegExp input="$$1" output="<set>\1</set>" dest="2"> + <expression noclean="1">"belongs_to_collection":{"id":[0-9]+,"name":"([^"]*)</expression> + </RegExp> + <expression noclean="1" /> + </RegExp> + </ParseTMDBSet> + + <GetTMDBCastByIdChain dest="4"> + <RegExp input="$$5" output="<details>\1</details>" dest="4"> + <RegExp input="$$1" output="<url function="ParseTMDBCast" cache="tmdb-cast-\1.json">http://api.themoviedb.org/3/movie/\1/casts?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5"> + <expression /> </RegExp> <expression noclean="1" /> </RegExp> </GetTMDBCastByIdChain> <ParseTMDBCast dest="5"> <RegExp input="$$2" output="<details>\1</details>" dest="5"> - <RegExp input="$$1" output="<actor><name>\1</name><role>\2</role></actor>" dest="2"> - <expression repeat="yes" fixchars="1">"name":"([^"]*)","job":"Actor","department":"Actors","character":"([^"]*)</expression> + <RegExp input="$$1" output="\1" dest="7"> + <expression clear="yes" noclean="1">"cast":\[([^\]]*)</expression> + </RegExp> + <RegExp input="$$7" output="<actor><name>\1</name><role>\2</role></actor>" dest="2"> + <expression repeat="yes" fixchars="1">"name":"([^"]*)","character":"([^"]*)</expression> </RegExp> - <RegExp input="$$1" output="<actor><name>\1</name><role>\2</role><thumb>http://\3original\4</thumb></actor>" dest="2+"> - <expression repeat="yes" fixchars="1">"name":"([^"]*)","job":"Actor","department":"Actors","character":"([^"]*)","id":[0-9]+,"order":[0-9]*,"cast_id":[0-9]*,"url":"[^"]*","profile":"http://(.*?)w[0-9]+([^"]*)"</expression> + <RegExp input="$$7" output="<actor><name>\1</name><role>\2</role><thumb>http://cf2.imgobject.com/t/p/original\3</thumb></actor>" dest="2+"> + <expression repeat="yes" fixchars="1">"name":"([^"]*)","character":"([^"]*)","order":[0-9]*,"profile_path":"([^"]*)"</expression> </RegExp> <expression noclean="1" /> </RegExp> </ParseTMDBCast> - <GetTMDBGenresByIdChain dest="4"> + + <GetTMDBDirectorsByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBGenres" cache="tmdb-$INFO[language]-tt\1.json">http://api.themoviedb.org/2.1/Movie.getInfo/en/json/57983e31fb435df4df77afb854740ea9/tt\1</url>" dest="5"> - <expression>tt([0-9]+)</expression> + <RegExp input="$$1" output="<url function="ParseTMDBDirectors" cache="tmdb-cast-\1.json">http://api.themoviedb.org/3/movie/\1/casts?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5"> + <expression /> </RegExp> - <RegExp input="$$1" output="<url function="ParseTMDBGenres" cache="tmdb-$INFO[language]-\1.json">http://api.themoviedb.org/2.1/Movie.getInfo/en/json/57983e31fb435df4df77afb854740ea9/\1</url>" dest="5"> - <expression>^([0-9]+)$</expression> + <expression noclean="1" /> + </RegExp> + </GetTMDBDirectorsByIdChain> + <ParseTMDBDirectors dest="5"> + <RegExp input="$$2" output="<details>\1</details>" dest="5"> + <RegExp input="$$1" output="\1" dest="7"> + <expression clear="yes" noclean="1">"crew":\[([^\]]*)</expression> + </RegExp> + <RegExp input="$$7" output="<director>\1</director>" dest="2"> + <expression repeat="yes" fixchars="1">"name":"([^"]*)","department":"Directing","job":"Director"</expression> + </RegExp> + <expression noclean="1" /> + </RegExp> + </ParseTMDBDirectors> + + <GetTMDBWitersByIdChain dest="4"> + <RegExp input="$$5" output="<details>\1</details>" dest="4"> + <RegExp input="$$1" output="<url function="ParseTMDBWriters" cache="tmdb-cast-\1.json">http://api.themoviedb.org/3/movie/\1/casts?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5"> + <expression /> + </RegExp> + <expression noclean="1" /> + </RegExp> + </GetTMDBWitersByIdChain> + <ParseTMDBWriters dest="5"> + <RegExp input="$$2" output="<details>\1</details>" dest="5"> + <RegExp input="$$1" output="\1" dest="7"> + <expression clear="yes" noclean="1">"crew":\[([^\]]*)</expression> + </RegExp> + <RegExp input="$$7" output="<credits>\1</credits>" dest="2"> + <expression repeat="yes" fixchars="1">"name":"([^"]*)","department":"Writing",</expression> + </RegExp> + <expression noclean="1" /> + </RegExp> + </ParseTMDBWriters> + + <GetTMDBGenresByIdChain dest="4"> + <RegExp input="$$5" output="<details>\1</details>" dest="4"> + <RegExp input="$$1" output="<url function="ParseTMDBGenres" cache="tmdb-$INFO[language]-\1.json">http://api.themoviedb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&language=$INFO[language]</url>" dest="5"> + <expression /> </RegExp> <expression noclean="1" /> </RegExp> @@ -57,7 +148,7 @@ <ParseTMDBGenres dest="5"> <RegExp input="$$2" output="<details>\1</details>" dest="5"> <RegExp input="$$1" output="\1" dest="7"> - <expression noclean="1">"genres":\[([^\]]*)</expression> + <expression clear="yes" noclean="1">"genres":\[([^\]]*)</expression> </RegExp> <RegExp input="$$7" output="<genre>\1</genre>" dest="2"> <expression repeat="yes" fixchars="1">"name":"([^"]*)</expression> @@ -65,13 +156,11 @@ <expression noclean="1" /> </RegExp> </ParseTMDBGenres> + <GetTMDBRatingByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBRating" cache="tmdb-$INFO[language]-tt\1.json">http://api.themoviedb.org/2.1/Movie.getInfo/en/json/57983e31fb435df4df77afb854740ea9/tt\1</url>" dest="5"> - <expression>tt([0-9]+)</expression> - </RegExp> - <RegExp input="$$1" output="<url function="ParseTMDBRating" cache="tmdb-$INFO[language]-\1.json">http://api.themoviedb.org/2.1/Movie.getInfo/en/json/57983e31fb435df4df77afb854740ea9/\1</url>" dest="5"> - <expression>^([0-9]+)$</expression> + <RegExp input="$$1" output="<url function="ParseTMDBRating" cache="tmdb-$INFO[language]-\1.json">http://api.themoviedb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&language=$INFO[language]</url>" dest="5"> + <expression /> </RegExp> <expression noclean="1" /> </RegExp> @@ -79,17 +168,18 @@ <ParseTMDBRating dest="5"> <RegExp input="$$2" output="<details>\1</details>" dest="5"> <RegExp input="$$1" output="<rating>\1</rating>" dest="2"> - <expression noclean="1">"rating":([^,]*),"</expression> + <expression noclean="1">"vote_average":([^,]*),"</expression> </RegExp> <RegExp input="$$1" output="<votes>\1</votes>" dest="2+"> - <expression noclean="1">"votes":([0-9]+)</expression> + <expression noclean="1">"vote_count":([0-9]+)</expression> </RegExp> <expression noclean="1" /> </RegExp> </ParseTMDBRating> + <GetTMDBTrailerByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBTrailer" cache="tmdb-$INFO[language]-\1.json">http://api.themoviedb.org/2.1/Movie.getInfo/$INFO[language]/json/57983e31fb435df4df77afb854740ea9/\1</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBTrailer" cache="tmdb-trailer-$INFO[language]-\1.json">http://api.themoviedb.org/3/movie/\1/trailers?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5"> <expression>^([0-9]+)$</expression> </RegExp> <expression noclean="1" /> @@ -97,70 +187,84 @@ </GetTMDBTrailerByIdChain> <ParseTMDBTrailer dest="5"> <RegExp input="$$2" output="<details>\1</details>" dest="5"> - <RegExp input="$$1" output="<trailer>plugin://plugin.video.youtube/?action=play_video&videoid=\1</trailer>" dest="2+"> - <expression noclean="1">"trailer":".*?youtube.com/watch\?v=([^"]*)</expression> + <RegExp input="$$1" output="\1" dest="7"> + <expression clear="yes" noclean="1">"youtube":\[{([^\]]*)</expression> + </RegExp> + <RegExp input="$$7" output="<trailer>plugin://plugin.video.youtube/?action=play_video&videoid=\1</trailer>" dest="2"> + <expression noclean="1">"source":"([^"]*)</expression> </RegExp> <expression noclean="1">(.+)</expression> </RegExp> </ParseTMDBTrailer> + <GetTMDBFanartByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBFanart" cache="tmdb-images-tt\1.json">http://api.themoviedb.org/2.1/Movie.getImages/en/json/57983e31fb435df4df77afb854740ea9/tt\1</url>" dest="5"> - <expression>tt([0-9]+)</expression> - </RegExp> - <RegExp input="$$1" output="<url function="ParseTMDBFanart" cache="tmdb-images-\1.json">http://api.themoviedb.org/2.1/Movie.getImages/en/json/57983e31fb435df4df77afb854740ea9/\1</url>" dest="5"> - <expression>^([0-9]+)$</expression> + <RegExp input="$$1" output="<url function="ParseTMDBFanart" cache="tmdb-images-\1.json">http://api.themoviedb.org/3/movie/\1/images?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5"> + <expression /> </RegExp> <expression noclean="1" /> </RegExp> </GetTMDBFanartByIdChain> <GetTMDBFanartById dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBFanart" cache="tmdb-images-tt\1.json">http://api.themoviedb.org/2.1/Movie.getImages/en/json/57983e31fb435df4df77afb854740ea9/tt\1</url>" dest="5"> - <expression>/tt([0-9]+)</expression> - </RegExp> - <RegExp input="$$1" output="<url function="ParseTMDBFanart" cache="tmdb-images-\1.json">http://api.themoviedb.org/2.1/Movie.getImages/en/json/57983e31fb435df4df77afb854740ea9/\1</url>" dest="5"> - <expression><id>([0-9]*)</id></expression> + <RegExp input="$$1" output="<url function="ParseTMDBFanart" cache="tmdb-images-\1.json">http://api.themoviedb.org/3/movie/\1/images?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5"> + <expression /> </RegExp> <expression noclean="1" /> </RegExp> </GetTMDBFanartById> <ParseTMDBFanart dest="5"> <RegExp input="$$2" output="<details><fanart>\1</fanart></details>" dest="5"> - <RegExp input="$$1" output="<thumb preview="\1w780\2">\1original\2</thumb>" dest="2"> - <expression repeat="yes" noclean="1">"type":"backdrop","size":"original".*?"url":"(.*?)original([^"]*)</expression> + <RegExp input="$$1" output="\1" dest="7"> + <expression clear="yes" noclean="1">"backdrops":\[{([^\]]*)</expression> + </RegExp> + <RegExp input="$$7" output="<thumb preview="http://cf2.imgobject.com/t/p/w780\1">http://cf2.imgobject.com/t/p/original\1</thumb>" dest="2"> + <expression repeat="yes" noclean="1">"file_path":"([^"]*)</expression> </RegExp> <expression noclean="1">(.+)</expression> </RegExp> </ParseTMDBFanart> + <GetTMDBThumbsByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBThumbs" cache="tmdb-images-tt\1.json">http://api.themoviedb.org/2.1/Movie.getImages/en/json/57983e31fb435df4df77afb854740ea9/tt\1</url>" dest="5"> - <expression>tt([0-9]+)</expression> - </RegExp> - <RegExp input="$$1" output="<url function="ParseTMDBThumbs" cache="tmdb-images-\1.json">http://api.themoviedb.org/2.1/Movie.getImages/en/json/57983e31fb435df4df77afb854740ea9/\1</url>" dest="5"> - <expression>^([0-9]+)$</expression> + <RegExp input="$$1" output="<url function="ParseTMDBThumbs" cache="tmdb-images-$INFO[language]-\1.json">http://api.themoviedb.org/3/movie/\1/images?api_key=57983e31fb435df4df77afb854740ea9&language=$INFO[language]</url>" dest="5"> + <expression /> </RegExp> <expression noclean="1" /> </RegExp> </GetTMDBThumbsByIdChain> <GetTMDBThumbsById dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBThumbs" cache="tmdb-images-tt\1.json">http://api.themoviedb.org/2.1/Movie.getImages/en/json/57983e31fb435df4df77afb854740ea9/tt\1</url>" dest="5"> - <expression>/tt([0-9]+)</expression> - </RegExp> - <RegExp input="$$1" output="<url function="ParseTMDBThumbs" cache="tmdb-images-\1.json">http://api.themoviedb.org/2.1/Movie.getImages/en/json/57983e31fb435df4df77afb854740ea9/\1</url>" dest="5"> - <expression><id>([0-9]*)</id></expression> + <RegExp input="$$1" output="<url function="ParseTMDBThumbs" cache="tmdb-images-$INFO[language]-\1.json">http://api.themoviedb.org/3/movie/\1/images?api_key=57983e31fb435df4df77afb854740ea9&language=$INFO[language]</url>" dest="5"> + <expression /> </RegExp> <expression noclean="1" /> </RegExp> </GetTMDBThumbsById> <ParseTMDBThumbs dest="5"> <RegExp input="$$2" output="<details>\1</details>" dest="5"> - <RegExp input="$$1" output="<thumb preview="\1w500\2">\1original\2</thumb>" dest="2"> - <expression repeat="yes" noclean="1">"type":"poster","size":"original".*?"url":"(.*?)original([^"]*)</expression> + <RegExp input="$$1" output="<url function="ParseTMDBAllThumbs" cache="tmdb-images-\1.json">http://api.themoviedb.org/3/movie/\1/images?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="2"> + <expression noclean="1">"id":([0-9]*),</expression> + </RegExp> + <RegExp input="$$1" output="\1" dest="7"> + <expression clear="yes" noclean="1">"posters":\[{([^\]]*)</expression> + </RegExp> + <RegExp input="$$7" output="<thumb preview="http://cf2.imgobject.com/t/p/w500\1">http://cf2.imgobject.com/t/p/original\1</thumb>" dest="2+"> + <expression repeat="yes" noclean="1">"file_path":"([^"]*)</expression> </RegExp> <expression noclean="1">(.+)</expression> </RegExp> </ParseTMDBThumbs> + <ParseTMDBAllThumbs dest="5"> + <RegExp input="$$2" output="<details>\1</details>" dest="5"> + <RegExp input="$$1" output="\1" dest="7"> + <expression clear="yes" noclean="1">"posters":\[{([^\]]*)</expression> + </RegExp> + <RegExp input="$$7" output="<thumb preview="http://cf2.imgobject.com/t/p/w500\1">http://cf2.imgobject.com/t/p/original\1</thumb>" dest="2"> + <expression repeat="yes" noclean="1">"file_path":"([^"]*)</expression> + </RegExp> + <expression noclean="1">(.+)</expression> + </RegExp> + </ParseTMDBAllThumbs> + </scraperfunctions> |