diff options
author | Martijn Kaijser <mcm.kaijser@gmail.com> | 2017-12-10 09:41:11 +0100 |
---|---|---|
committer | Martijn Kaijser <mcm.kaijser@gmail.com> | 2017-12-10 09:41:11 +0100 |
commit | 165723ef45ea9e9395c27a0a27b02385bdeb83eb (patch) | |
tree | f5f24a079d7e40e2d011103e353c6fbb12d82331 /addons | |
parent | 46c9aa5da2a3a6bf7ecab2d55477080e676eadd7 (diff) |
[addons] sync scrapers with repo
Diffstat (limited to 'addons')
-rw-r--r-- | addons/metadata.common.imdb.com/addon.xml | 2 | ||||
-rw-r--r-- | addons/metadata.common.imdb.com/changelog.txt | 6 | ||||
-rw-r--r-- | addons/metadata.common.imdb.com/imdb.xml | 77 | ||||
-rw-r--r-- | addons/metadata.common.themoviedb.org/addon.xml | 2 | ||||
-rw-r--r-- | addons/metadata.common.themoviedb.org/tmdb.xml | 115 | ||||
-rw-r--r-- | addons/metadata.themoviedb.org/addon.xml | 6 | ||||
-rw-r--r-- | addons/metadata.themoviedb.org/changelog.txt | 16 | ||||
-rw-r--r-- | addons/metadata.themoviedb.org/resources/settings.xml | 2 | ||||
-rw-r--r-- | addons/metadata.themoviedb.org/tmdb.xml | 43 | ||||
-rw-r--r-- | addons/metadata.tvdb.com/addon.xml | 4 | ||||
-rw-r--r-- | addons/metadata.tvdb.com/changelog.txt | 9 | ||||
-rw-r--r-- | addons/metadata.tvdb.com/resources/language/English/strings.po | 7 | ||||
-rw-r--r-- | addons/metadata.tvdb.com/resources/settings.xml | 1 | ||||
-rw-r--r-- | addons/metadata.tvdb.com/tvdb.xml | 129 |
14 files changed, 216 insertions, 203 deletions
diff --git a/addons/metadata.common.imdb.com/addon.xml b/addons/metadata.common.imdb.com/addon.xml index c12395421b..b5763c2f0c 100644 --- a/addons/metadata.common.imdb.com/addon.xml +++ b/addons/metadata.common.imdb.com/addon.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <addon id="metadata.common.imdb.com" name="IMDB Scraper Library" - version="2.9.1" + version="2.9.3" provider-name="Team Kodi"> <requires> <import addon="xbmc.metadata" version="2.1.0"/> diff --git a/addons/metadata.common.imdb.com/changelog.txt b/addons/metadata.common.imdb.com/changelog.txt index cca5af3b74..b4543c7c86 100644 --- a/addons/metadata.common.imdb.com/changelog.txt +++ b/addons/metadata.common.imdb.com/changelog.txt @@ -1,3 +1,9 @@ +[B]2.9.3[/B] +- fixed: always get USA rating regardless of the country set + +[B]2.9.2[/B] +- changed: simplify ratings code + [B]2.9.1[/B] - changed: improved USA rating detection diff --git a/addons/metadata.common.imdb.com/imdb.xml b/addons/metadata.common.imdb.com/imdb.xml index 16bde91989..b5a5b35efb 100644 --- a/addons/metadata.common.imdb.com/imdb.xml +++ b/addons/metadata.common.imdb.com/imdb.xml @@ -28,34 +28,23 @@ </RegExp> </ParseIMDBRating> - <GetIMDBRatingsById dest="5"> - <RegExp input="$$1" output="<details><url cache="$$1-main.html" function="ParseIMDBRatings">http://akas.imdb.com/title/$$1/|accept-language=en-us</url></details>" dest="5"> - <expression noclean="1" /> + <GetIMDBRatingsById dest="5" clearbuffers="no"> + <RegExp input="$$1" output="<details><url cache="\1-main.html" function="ParseIMDBRatings">http://akas.imdb.com/title/\1/|accept-language=en-us</url></details>" dest="5"> + <expression noclean="1">^(tt\d+)</expression> + </RegExp> + <RegExp input="$$1" output="default="true"" dest="3"> + <expression clear="yes">\|default$</expression> </RegExp> </GetIMDBRatingsById> <ParseIMDBRatings dest="5"> <RegExp input="$$2" output="<details>\1</details>" dest="5"> - <RegExp input="$$1" output="<ratings><rating name="imdb" ><value>\1</value><votes>\2</votes></rating></ratings>" dest="2"> + <RegExp input="$$1" output="<ratings><rating name="imdb" $$3><value>\1</value><votes>\2</votes></rating></ratings>" dest="2"> <expression><span\sitemprop="ratingValue">([0-9.]+).*?ratingCount">([0-9,]+)<</expression> </RegExp> <expression noclean="1" /> </RegExp> </ParseIMDBRatings> - <GetIMDBRatingsByIdAsDef dest="5"> - <RegExp input="$$1" output="<details><url cache="$$1-main.html" function="ParseIMDBRatingsAsDef">http://akas.imdb.com/title/$$1/|accept-language=en-us</url></details>" dest="5"> - <expression noclean="1" /> - </RegExp> - </GetIMDBRatingsByIdAsDef> - <ParseIMDBRatingsAsDef dest="5"> - <RegExp input="$$2" output="<details>\1</details>" dest="5"> - <RegExp input="$$1" output="<ratings><rating name="imdb" default="true"><value>\1</value><votes>\2</votes></rating></ratings>" dest="2"> - <expression><span\sitemprop="ratingValue">([0-9.]+).*?ratingCount">([0-9,]+)<</expression> - </RegExp> - <expression noclean="1" /> - </RegExp> - </ParseIMDBRatingsAsDef> - <GetIMDBTOP250ById dest="5"> <RegExp input="$$1" output="<details><url cache="$$1-main.html" function="ParseIMDBTOP250">http://akas.imdb.com/title/$$1/|accept-language=en-us</url></details>" dest="5"> <expression noclean="1" /> @@ -102,47 +91,51 @@ </ParseIMDBCountry> <GetMetaCriticRatingById dest="5"> <!-- Compatibility function for Pre-Krypton versions--> - <RegExp input="$$1" output="<details><url cache="$$1-main.html" function="ParseMetaCriticRating">http://akas.imdb.com/title/$$1/|accept-language=en-us</url></details>" dest="5"> + <RegExp input="$$1" output="<details><url cache="$$1-criticreviews.html" function="ParseMetaCriticRating">http://akas.imdb.com/title/$$1/criticreviews|accept-language=en-us</url></details>" dest="5"> <expression noclean="1" /> </RegExp> </GetMetaCriticRatingById> <ParseMetaCriticRating dest="5"> <RegExp input="$$2" output="<details>\1</details>" dest="5"> - <RegExp input="$$1" output="<rating>\1.\2</rating>" dest="2"> - <expression><div\sclass="metacriticScore\sscore_[^\s]+\stitleReviewBarSubItem">.*?<span>(\d*)(\d)</expression> + <RegExp input="$$1" output="\1" dest="6"> + <expression noclean="1">(<div class="metascore_block".*)</expression> + </RegExp> + <RegExp input="$$6" output="<rating max="100">\1</value>" dest="2"> + <expression clear="yes"><span itemprop="ratingValue">(\d+)</span></expression> + </RegExp> + <RegExp input="$$6" output="<votes>\1</votes>" dest="2+"> + <expression><span itemprop="ratingCount">(\d+)</span></expression> </RegExp> <expression noclean="1" /> </RegExp> </ParseMetaCriticRating> - <GetMetaCriticRatingsById dest="5"> - <RegExp input="$$1" output="<details><url cache="$$1-main.html" function="ParseMetaCriticRatings">http://akas.imdb.com/title/$$1/|accept-language=en-us</url></details>" dest="5"> - <expression noclean="1" /> + <GetMetaCriticRatingsById dest="5" clearbuffers="no"> + <RegExp input="$$1" output="<details><url cache="\1-criticreviews.html" function="ParseMetaCriticRatings">http://akas.imdb.com/title/\1/criticreviews|accept-language=en-us</url></details>" dest="5"> + <expression noclean="1">(tt\d+)</expression> + </RegExp> + <RegExp input="$$1" output="default="true"" dest="3"> + <expression clear="yes">\|default$</expression> </RegExp> </GetMetaCriticRatingsById> <ParseMetaCriticRatings dest="5"> <RegExp input="$$2" output="<details>\1</details>" dest="5"> - <RegExp input="$$1" output="<ratings><rating name="metacritic" ><value>\1.\2</value></rating></ratings>" dest="2"> - <expression><div\sclass="metacriticScore\sscore_[^\s]+\stitleReviewBarSubItem">.*?<span>(\d*)(\d)</expression> + <RegExp input="$$4" output="<ratings><rating name="metacritic" max="100" $$3>\1</rating></ratings>" dest="2"> + <RegExp input="$$1" output="\1" dest="6"> + <expression clear="yes" noclean="1">(<div class="metascore_block".*)</expression> + </RegExp> + <RegExp input="$$6" output="<value>\1</value>" dest="4"> + <expression clear="yes"><span itemprop="ratingValue">(\d+)</span></expression> + </RegExp> + <RegExp input="$$6" output="<votes>\1</votes>" dest="4+"> + <expression><span itemprop="ratingCount">(\d+)</span></expression> + </RegExp> + <expression noclean="1" clear="yes"/> </RegExp> <expression noclean="1" /> </RegExp> </ParseMetaCriticRatings> - <GetMetaCriticRatingsByIdAsDef dest="5"> - <RegExp input="$$1" output="<details><url cache="$$1-main.html" function="ParseMetaCriticRatingsAsDef">http://akas.imdb.com/title/$$1/|accept-language=en-us</url></details>" dest="5"> - <expression noclean="1" /> - </RegExp> - </GetMetaCriticRatingsByIdAsDef> - <ParseMetaCriticRatingsAsDef dest="5"> - <RegExp input="$$2" output="<details>\1</details>" dest="5"> - <RegExp input="$$1" output="<ratings><rating name="metacritic" default="true"><value>\1.\2</value></rating></ratings>" dest="2"> - <expression><div\sclass="metacriticScore\sscore_[^\s]+\stitleReviewBarSubItem">.*?<span>(\d*)(\d)</expression> - </RegExp> - <expression noclean="1" /> - </RegExp> - </ParseMetaCriticRatingsAsDef> - <GetIMDBPlotById dest="5"> <RegExp input="$$1" output="<details><url cache="$$1-main.html" function="ParseIMDBPlot">http://akas.imdb.com/title/$$1/|accept-language=en-us</url></details>" dest="5"> <expression noclean="1" /> @@ -348,8 +341,8 @@ <RegExp input="$$1" output="<details><url cache="$$1-combined.html" function="ParseIMDBCountryCert">http://akas.imdb.com/title/$$1/combined|accept-language=en-us</url></details>" dest="5"> <expression noclean="1" /> </RegExp> - <RegExp input="$INFO[imdbcertcountry]" output="$$5" dest="5"> - <RegExp input="$$1" output="<details><url cache="$$1-combined.html" function="ParseIMDBUSACert">http://akas.imdb.com/title/$$1/combined|accept-language=en-us</url></details>" dest="5"> + <RegExp input="$INFO[imdbcertcountry]" output="$$2" dest="5"> + <RegExp input="$$1" output="<details><url cache="$$1-combined.html" function="ParseIMDBUSACert">http://akas.imdb.com/title/$$1/combined|accept-language=en-us</url></details>" dest="2"> <expression noclean="1"/> </RegExp> <expression>USA</expression> diff --git a/addons/metadata.common.themoviedb.org/addon.xml b/addons/metadata.common.themoviedb.org/addon.xml index 2d2734bcb3..0f5b905349 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 Movie Database Scraper Library" - version="2.17.2" + version="2.17.6" provider-name="Team Kodi"> <requires> <import addon="xbmc.metadata" version="2.1.0"/> diff --git a/addons/metadata.common.themoviedb.org/tmdb.xml b/addons/metadata.common.themoviedb.org/tmdb.xml index 9d9ae03ca7..ed637830c8 100644 --- a/addons/metadata.common.themoviedb.org/tmdb.xml +++ b/addons/metadata.common.themoviedb.org/tmdb.xml @@ -3,7 +3,7 @@ <GetTMDBCertificationsByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBCertifications" cache="tmdb-cert-\1.json">https://api.tmdb.org/3/movie/\1/releases?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[tmdbcertcountry]</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBCertifications" cache="tmdb-cert-\1.json">https://api.tmdb.org/3/movie/\1/releases?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[tmdbcertcountry]</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -20,7 +20,7 @@ <GetTMDBTitleByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBTitle" cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBTitle" cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -28,11 +28,11 @@ </GetTMDBTitleByIdChain> <GetTMDBLangTitleByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBTitle" cache="tmdb-$INFO[tmdbtitlelanguage]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[tmdbtitlelanguage]</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBTitle" cache="tmdb-$INFO[tmdbtitlelanguage]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[tmdbtitlelanguage]</url>" dest="5"> <expression /> </RegExp> - <RegExp input="$INFO[tmdbtitlelanguage]" output="$$5" dest="5"> - <RegExp input="$$1" output="<url function="ParseTMDBTitle" cache="tmdb-$INFO[tmdbsearchlanguage]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[tmdbsearchlanguage]</url>" dest="5"> + <RegExp input="$INFO[tmdbtitlelanguage]" output="$$2" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBTitle" cache="tmdb-$INFO[tmdbsearchlanguage]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[tmdbsearchlanguage]</url>" dest="2"> <expression/> </RegExp> <expression>Keep Original</expression> @@ -45,8 +45,8 @@ <RegExp input="$$1" output="<title>\1</title>" dest="2"> <expression fixchars="1">"title":"([^"]*)</expression> </RegExp> - <RegExp input="$INFO[tmdbtitlelanguage]" output="$$2" dest="2"> - <RegExp input="$$1" output="<title>\1</title>" dest="2"> + <RegExp input="$INFO[tmdbtitlelanguage]" output="$$3" dest="2"> + <RegExp input="$$1" output="<title>\1</title>" dest="3"> <expression fixchars="1">"original_title":"([^"]*)</expression> </RegExp> <expression>Keep Original</expression> @@ -60,7 +60,7 @@ <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">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url>" dest="5"> + <RegExp input="$$8" output="<url function="ParseTMDBPlot" cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -71,7 +71,7 @@ <RegExp input="$$1" output="\1" dest="8"> <expression clear="yes" noclean="1" /> </RegExp> - <RegExp input="$$8" output="<url function="ParseTMDBPlot" cache="tmdb-$INFO[tmdbplotlanguage]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[tmdbplotlanguage]</url>" dest="5"> + <RegExp input="$$8" output="<url function="ParseTMDBPlot" cache="tmdb-$INFO[tmdbplotlanguage]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[tmdbplotlanguage]</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -82,7 +82,7 @@ <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">https://api.tmdb.org/3/movie/$$8?api_key=6889f6089877fd092454d00edb44a84d&amp;language=en</url>" dest="2"> + <RegExp input="$$9" output="<url function="ParseFallbackTMDBPlot" cache="tmdb-en-$$8.json">https://api.tmdb.org/3/movie/$$8?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=en</url>" dest="2"> <expression>^$</expression> </RegExp> <RegExp input="$$9" output="<plot>\1</plot>" dest="2"> @@ -105,7 +105,7 @@ <RegExp input="$$1" output="\1" dest="8"> <expression clear="yes" noclean="1" /> </RegExp> - <RegExp input="$$8" output="<url function="ParseTMDBTagline" cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url>" dest="5"> + <RegExp input="$$8" output="<url function="ParseTMDBTagline" cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -116,7 +116,7 @@ <RegExp input="$$1" output="\1" dest="8"> <expression clear="yes" noclean="1" /> </RegExp> - <RegExp input="$$8" output="<url function="ParseTMDBTagline" cache="tmdb-$INFO[tmdbtaglinelanguage]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[tmdbtaglinelanguage]</url>" dest="5"> + <RegExp input="$$8" output="<url function="ParseTMDBTagline" cache="tmdb-$INFO[tmdbtaglinelanguage]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[tmdbtaglinelanguage]</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -127,7 +127,7 @@ <RegExp input="$$1" output="\1" dest="9"> <expression clear="yes" fixchars="1">"tagline":"([^"]*)</expression> </RegExp> - <RegExp input="$$9" output="<url function="ParseFallbackTMDBTagline" cache="tmdb-en-$$8.json">https://api.tmdb.org/3/movie/$$8?api_key=6889f6089877fd092454d00edb44a84d&amp;language=en</url>" dest="2"> + <RegExp input="$$9" output="<url function="ParseFallbackTMDBTagline" cache="tmdb-en-$$8.json">https://api.tmdb.org/3/movie/$$8?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=en</url>" dest="2"> <expression>^$</expression> </RegExp> <RegExp input="$$9" output="<tagline>\1</tagline>" dest="2"> @@ -150,7 +150,7 @@ <RegExp input="$$1" output="\1" dest="8"> <expression clear="yes" noclean="1" /> </RegExp> - <RegExp input="$$8" output="<url function="ParseTMDBTags" >https://api.tmdb.org/3/movie/\1/keywords?api_key=6889f6089877fd092454d00edb44a84d</url>" dest="5"> + <RegExp input="$$8" output="<url function="ParseTMDBTags" >https://api.tmdb.org/3/movie/\1/keywords?api_key=ecbc86c92da237cb9faff6d3ddc4be6d</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -170,7 +170,7 @@ <RegExp input="$$1" output="\1" dest="8"> <expression clear="yes" noclean="1" /> </RegExp> - <RegExp input="$$8" output="<url function="ParseTMDBSet" cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url>" dest="5"> + <RegExp input="$$8" output="<url function="ParseTMDBSet" cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -181,7 +181,7 @@ <RegExp input="$$1" output="\1" dest="8"> <expression clear="yes" noclean="1" /> </RegExp> - <RegExp input="$$8" output="<url function="ParseTMDBSet" cache="tmdb-$INFO[tmdbsetlanguage]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[tmdbsetlanguage]</url>" dest="5"> + <RegExp input="$$8" output="<url function="ParseTMDBSet" cache="tmdb-$INFO[tmdbsetlanguage]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[tmdbsetlanguage]</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -192,7 +192,7 @@ <RegExp input="$$1" output="\1" dest="9"> <expression clear="yes" noclean="1">"belongs_to_collection":\{"id":[0-9]+,"name":"([^"]*)</expression> </RegExp> - <RegExp input="$$9" output="<url function="ParseFallbackTMDBSet" cache="tmdb-en-$$8.json">https://api.tmdb.org/3/movie/$$8?api_key=6889f6089877fd092454d00edb44a84d&amp;language=en</url>" dest="2"> + <RegExp input="$$9" output="<url function="ParseFallbackTMDBSet" cache="tmdb-en-$$8.json">https://api.tmdb.org/3/movie/$$8?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=en</url>" dest="2"> <expression>^$</expression> </RegExp> <RegExp input="$$9" output="<set>\1</set>" dest="2"> @@ -212,10 +212,10 @@ <GetTMDBCastByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBBaseImageURL" cache="tmdb-config.json">https://api.tmdb.org/3/configuration?api_key=6889f6089877fd092454d00edb44a84d</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBBaseImageURL" cache="tmdb-config.json">https://api.tmdb.org/3/configuration?api_key=ecbc86c92da237cb9faff6d3ddc4be6d</url>" dest="5"> <expression /> </RegExp> - <RegExp input="$$1" output="<url function="ParseTMDBCast" cache="tmdb-cast-\1.json">https://api.tmdb.org/3/movie/\1/casts?api_key=6889f6089877fd092454d00edb44a84d</url>" dest="5+"> + <RegExp input="$$1" output="<url function="ParseTMDBCast" cache="tmdb-cast-\1.json">https://api.tmdb.org/3/movie/\1/casts?api_key=ecbc86c92da237cb9faff6d3ddc4be6d</url>" dest="5+"> <expression /> </RegExp> <expression noclean="1" /> @@ -238,7 +238,7 @@ <GetTMDBDirectorsByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBDirectors" cache="tmdb-cast-\1.json">https://api.tmdb.org/3/movie/\1/casts?api_key=6889f6089877fd092454d00edb44a84d</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBDirectors" cache="tmdb-cast-\1.json">https://api.tmdb.org/3/movie/\1/casts?api_key=ecbc86c92da237cb9faff6d3ddc4be6d</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -258,7 +258,7 @@ <GetTMDBWitersByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBWriters" cache="tmdb-cast-\1.json">https://api.tmdb.org/3/movie/\1/casts?api_key=6889f6089877fd092454d00edb44a84d</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBWriters" cache="tmdb-cast-\1.json">https://api.tmdb.org/3/movie/\1/casts?api_key=ecbc86c92da237cb9faff6d3ddc4be6d</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -278,7 +278,7 @@ <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">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBGenres" cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -286,7 +286,7 @@ </GetTMDBGenresByIdChain> <GetTMDBLangGenresByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBGenres" cache="tmdb-$INFO[tmdbgenreslanguage]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[tmdbgenreslanguage]</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBGenres" cache="tmdb-$INFO[tmdbgenreslanguage]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[tmdbgenreslanguage]</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -306,7 +306,7 @@ <GetTMDBRatingByIdChain dest="4"> <!-- Compatibility function for Pre-Krypton versions--> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBRating" cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBRating" cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -324,16 +324,19 @@ </RegExp> </ParseTMDBRating> - <GetTMDBRatingsByIdChain dest="4"> + <GetTMDBRatingsByIdChain dest="4" clearbuffers="no"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBRatings" cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url>" dest="5"> - <expression /> + <RegExp input="$$1" output="<url function="ParseTMDBRatings" cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url>" dest="5"> + <expression noclean="1">^((tt)?\d+)</expression> + </RegExp> + <RegExp input="$$1" output="default="true"" dest="3"> + <expression clear="yes">\|default$</expression> </RegExp> <expression noclean="1" /> </RegExp> </GetTMDBRatingsByIdChain> <ParseTMDBRatings dest="5"> - <RegExp input="$$2" output="<details><ratings><rating name="themoviedb">\1</rating></ratings></details>" dest="5"> + <RegExp input="$$2" output="<details><ratings><rating name="themoviedb" $$3>\1</rating></ratings></details>" dest="5"> <RegExp input="$$1" output="<value>\1</value>" dest="2"> <expression noclean="1">"vote_average":([^,]*),"</expression> </RegExp> @@ -344,29 +347,9 @@ </RegExp> </ParseTMDBRatings> - <GetTMDBRatingsByIdAsDefChain dest="4"> - <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBRatingsAsDef" cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url>" dest="5"> - <expression /> - </RegExp> - <expression noclean="1" /> - </RegExp> - </GetTMDBRatingsByIdAsDefChain> - <ParseTMDBRatingsAsDef dest="5"> - <RegExp input="$$2" output="<details><ratings><rating name="themoviedb" default="true">\1</rating></ratings></details>" dest="5"> - <RegExp input="$$1" output="<value>\1</value>" dest="2"> - <expression noclean="1">"vote_average":([^,]*),"</expression> - </RegExp> - <RegExp input="$$1" output="<votes>\1</votes>" dest="2+"> - <expression noclean="1">"vote_count":([0-9]+)</expression> - </RegExp> - <expression noclean="1" /> - </RegExp> - </ParseTMDBRatingsAsDef> - <GetTMDBStudioByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBStudio" cache="tmdb-en-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=en</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBStudio" cache="tmdb-en-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=en</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -386,7 +369,7 @@ <GetTMDBCountryByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBCountry" cache="tmdb-en-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=en</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBCountry" cache="tmdb-en-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=en</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -406,7 +389,7 @@ <GetTMDBTrailerByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBTrailer" cache="tmdb-trailer-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1/trailers?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBTrailer" cache="tmdb-trailer-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1/trailers?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -414,7 +397,7 @@ </GetTMDBTrailerByIdChain> <GetTMDBLangTrailerByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBTrailer" cache="tmdb-trailer-$INFO[tmdbtrailerlanguage]-\1.json">https://api.tmdb.org/3/movie/\1/trailers?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[tmdbtrailerlanguage]</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBTrailer" cache="tmdb-trailer-$INFO[tmdbtrailerlanguage]-\1.json">https://api.tmdb.org/3/movie/\1/trailers?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[tmdbtrailerlanguage]</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> @@ -431,7 +414,7 @@ <RegExp input="$$7" output="<trailer>plugin://plugin.video.youtube/?action=play_video&amp;videoid=\1</trailer>" dest="9"> <expression noclean="1">"source":"([^"]*)</expression> </RegExp> - <RegExp input="$$9" output="<url function="ParseTMDBEnTrailer" cache="tmdb-trailer-en-$$8.json">https://api.tmdb.org/3/movie/$$8/trailers?api_key=6889f6089877fd092454d00edb44a84d&amp;language=en</url>" dest="2"> + <RegExp input="$$9" output="<url function="ParseTMDBEnTrailer" cache="tmdb-trailer-en-$$8.json">https://api.tmdb.org/3/movie/$$8/trailers?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=en</url>" dest="2"> <expression>^$</expression> </RegExp> <RegExp input="$$9" output="$$9" dest="2"> @@ -451,7 +434,7 @@ <RegExp input="$$7" output="<trailer>plugin://plugin.video.youtube/?action=play_video&amp;videoid=\1</trailer>" dest="9"> <expression noclean="1">"source":"([^"]*)</expression> </RegExp> - <RegExp input="$$9" output="<url function="ParseTMDBAllTrailer" cache="tmdb-trailer-$$8.json">https://api.tmdb.org/3/movie/$$8/trailers?api_key=6889f6089877fd092454d00edb44a84d</url>" dest="5"> + <RegExp input="$$9" output="<url function="ParseTMDBAllTrailer" cache="tmdb-trailer-$$8.json">https://api.tmdb.org/3/movie/$$8/trailers?api_key=ecbc86c92da237cb9faff6d3ddc4be6d</url>" dest="5"> <expression>^$</expression> </RegExp> <RegExp input="$$9" output="$$9" dest="2"> @@ -474,10 +457,10 @@ <GetTMDBFanartByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBBaseImageURL" cache="tmdb-config.json">https://api.tmdb.org/3/configuration?api_key=6889f6089877fd092454d00edb44a84d</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBBaseImageURL" cache="tmdb-config.json">https://api.tmdb.org/3/configuration?api_key=ecbc86c92da237cb9faff6d3ddc4be6d</url>" dest="5"> <expression /> </RegExp> - <RegExp input="$$1" output="<url function="ParseTMDBFanart" cache="tmdb-images-\1.json">https://api.tmdb.org/3/movie/\1/images?api_key=6889f6089877fd092454d00edb44a84d</url>" dest="5+"> + <RegExp input="$$1" output="<url function="ParseTMDBFanart" cache="tmdb-images-\1.json">https://api.tmdb.org/3/movie/\1/images?api_key=ecbc86c92da237cb9faff6d3ddc4be6d</url>" dest="5+"> <expression /> </RegExp> <expression noclean="1" /> @@ -497,10 +480,10 @@ <GetTMDBThumbsByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBBaseImageURL" cache="tmdb-config.json">https://api.tmdb.org/3/configuration?api_key=6889f6089877fd092454d00edb44a84d</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBBaseImageURL" cache="tmdb-config.json">https://api.tmdb.org/3/configuration?api_key=ecbc86c92da237cb9faff6d3ddc4be6d</url>" dest="5"> <expression /> </RegExp> - <RegExp input="$$1" output="<url function="ParseTMDBThumbs" cache="tmdb-images-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1/images?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url>" dest="5+"> + <RegExp input="$$1" output="<url function="ParseTMDBThumbs" cache="tmdb-images-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1/images?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url>" dest="5+"> <expression /> </RegExp> <expression noclean="1" /> @@ -508,10 +491,10 @@ </GetTMDBThumbsByIdChain> <GetTMDBLangThumbsByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBBaseImageURL" cache="tmdb-config.json">https://api.tmdb.org/3/configuration?api_key=6889f6089877fd092454d00edb44a84d</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBBaseImageURL" cache="tmdb-config.json">https://api.tmdb.org/3/configuration?api_key=ecbc86c92da237cb9faff6d3ddc4be6d</url>" dest="5"> <expression /> </RegExp> - <RegExp input="$$1" output="<url function="ParseTMDBLangThumbs" cache="tmdb-images-$INFO[tmdbthumblanguage]-\1.json">https://api.tmdb.org/3/movie/\1/images?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[tmdbthumblanguage]</url>" dest="5+"> + <RegExp input="$$1" output="<url function="ParseTMDBLangThumbs" cache="tmdb-images-$INFO[tmdbthumblanguage]-\1.json">https://api.tmdb.org/3/movie/\1/images?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[tmdbthumblanguage]</url>" dest="5+"> <expression /> </RegExp> <expression noclean="1" /> @@ -532,12 +515,12 @@ <expression clear="yes">(.+)</expression> </RegExp> <RegExp input="$$9" output="$$12" dest="2+"> - <RegExp input="$INFO[language]" output="<url function="ParseTMDBAllThumbs" cache="tmdb-images-$$8.json">https://api.tmdb.org/3/movie/$$8/images?api_key=6889f6089877fd092454d00edb44a84d</url>" dest="12"> + <RegExp input="$INFO[language]" output="<url function="ParseTMDBAllThumbs" cache="tmdb-images-$$8.json">https://api.tmdb.org/3/movie/$$8/images?api_key=ecbc86c92da237cb9faff6d3ddc4be6d</url>" dest="12"> <expression>en</expression> </RegExp> <expression>^$</expression> </RegExp> - <RegExp input="$INFO[language]" output="<url function="ParseTMDBEnThumbs" cache="tmdb-images-en-$$8.json">https://api.tmdb.org/3/movie/$$8/images?api_key=6889f6089877fd092454d00edb44a84d&amp;language=en</url>" dest="2+"> + <RegExp input="$INFO[language]" output="<url function="ParseTMDBEnThumbs" cache="tmdb-images-en-$$8.json">https://api.tmdb.org/3/movie/$$8/images?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=en</url>" dest="2+"> <expression>^((?!en).)*$</expression> </RegExp> <expression noclean="1">(.+)</expression> @@ -558,12 +541,12 @@ <expression clear="yes">(.+)</expression> </RegExp> <RegExp input="$$9" output="$$12" dest="2+"> - <RegExp input="$INFO[tmdbthumblanguage]" output="<url function="ParseTMDBAllThumbs" cache="tmdb-images-$$8.json">https://api.tmdb.org/3/movie/$$8/images?api_key=6889f6089877fd092454d00edb44a84d</url>" dest="12"> + <RegExp input="$INFO[tmdbthumblanguage]" output="<url function="ParseTMDBAllThumbs" cache="tmdb-images-$$8.json">https://api.tmdb.org/3/movie/$$8/images?api_key=ecbc86c92da237cb9faff6d3ddc4be6d</url>" dest="12"> <expression>en</expression> </RegExp> <expression>^$</expression> </RegExp> - <RegExp input="$INFO[tmdbthumblanguage]" output="<url function="ParseTMDBEnThumbs" cache="tmdb-images-en-$$8.json">https://api.tmdb.org/3/movie/$$8/images?api_key=6889f6089877fd092454d00edb44a84d&amp;language=en</url>" dest="2+"> + <RegExp input="$INFO[tmdbthumblanguage]" output="<url function="ParseTMDBEnThumbs" cache="tmdb-images-en-$$8.json">https://api.tmdb.org/3/movie/$$8/images?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=en</url>" dest="2+"> <expression>^((?!en).)*$</expression> </RegExp> <expression noclean="1">(.+)</expression> @@ -583,7 +566,7 @@ <RegExp input="$$9" output="$$9" dest="2"> <expression clear="yes">(.+)</expression> </RegExp> - <RegExp input="$$9" output="<url function="ParseTMDBAllThumbs" cache="tmdb-images-$$8.json">https://api.tmdb.org/3/movie/$$8/images?api_key=6889f6089877fd092454d00edb44a84d</url>" dest="2"> + <RegExp input="$$9" output="<url function="ParseTMDBAllThumbs" cache="tmdb-images-$$8.json">https://api.tmdb.org/3/movie/$$8/images?api_key=ecbc86c92da237cb9faff6d3ddc4be6d</url>" dest="2"> <expression>^$</expression> </RegExp> <expression noclean="1">(.+)</expression> @@ -612,7 +595,7 @@ <GetTMDBPremieredByIdChain dest="4"> <RegExp input="$$5" output="<details>\1</details>" dest="4"> - <RegExp input="$$1" output="<url function="ParseTMDBPremiered" cache="tmdb-$INFO[tmdbtitlelanguage]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[tmdbtitlelanguage]</url>" dest="5"> + <RegExp input="$$1" output="<url function="ParseTMDBPremiered" cache="tmdb-$INFO[tmdbtitlelanguage]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[tmdbtitlelanguage]</url>" dest="5"> <expression /> </RegExp> <expression noclean="1" /> diff --git a/addons/metadata.themoviedb.org/addon.xml b/addons/metadata.themoviedb.org/addon.xml index a45818e004..7a914e3819 100644 --- a/addons/metadata.themoviedb.org/addon.xml +++ b/addons/metadata.themoviedb.org/addon.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <addon id="metadata.themoviedb.org" name="The Movie Database" - version="4.0.1" + version="5.0.2" provider-name="Team Kodi"> <requires> <import addon="xbmc.metadata" version="2.1.0"/> - <import addon="metadata.common.imdb.com" version="2.7.8"/> - <import addon="metadata.common.themoviedb.org" version="2.13.1"/> + <import addon="metadata.common.imdb.com" version="2.9.2"/> + <import addon="metadata.common.themoviedb.org" version="2.17.6"/> <import addon="plugin.video.youtube" version="4.4.10" 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 6e9b28ec22..35d33e76be 100644 --- a/addons/metadata.themoviedb.org/changelog.txt +++ b/addons/metadata.themoviedb.org/changelog.txt @@ -1,9 +1,21 @@ +[B]5.0.2[/B] +- changed: made tmdb uniqueid consistent with documentation + +[B]5.0.1[/B] +- changed: simplified ratings code + +[B]5.0.0[/B] +Version bump for Krypton + +[B]4.0.3[/B] +- changed: split zh-cn and zh-tw + [B]4.0.1[/B] --switched API queries to https +- switched API queries to https [B]4.0.0[/B] - added: multiple ratings and uniqueid support (requires Kodi v17) -thanks phate89 -- added: premiered date -thanks phate89 +- added: premiered date (requires Kodi v17) -thanks phate89 [B]3.9.4[/B] - Fixed after API layout changes diff --git a/addons/metadata.themoviedb.org/resources/settings.xml b/addons/metadata.themoviedb.org/resources/settings.xml index 2b67ec3725..6241d2701c 100644 --- a/addons/metadata.themoviedb.org/resources/settings.xml +++ b/addons/metadata.themoviedb.org/resources/settings.xml @@ -3,7 +3,7 @@ <setting label="30005" type="bool" id="keeporiginaltitle" default="false"/> <setting label="30000" type="bool" id="fanart" default="true"/> <setting label="30004" type="bool" id="trailer" default="true"/> - <setting label="30002" type="select" values="bg|cs|da|de|el|en|es|fa|fa-ir|fi|fr|he|hr|hu|it|ja|ko|nb|nl|no|pl|pt|pt-br|ro|ru|sk|sl|sr|sv|th|tr|uk|zh" id="language" default="en"/> + <setting label="30002" type="select" values="bg|cs|da|de|el|en|es|fa|fa-ir|fi|fr|he|hr|hu|it|ja|ko|nb|nl|no|pl|pt|pt-br|ro|ru|sk|sl|sr|sv|th|tr|uk|zh-cn|zh-tw" id="language" default="en"/> <setting label="30006" type="select" values="au|bg|cs|da|de|el|es|fi|fr|gb|he|hr|hu|it|ja|ko|nl|no|pl|pt|ru|sl|sv|th|tr|us|zh" id="tmdbcertcountry" default="us"/> <setting label="30003" type="labelenum" values="TMDb|IMDb" id="RatingS" default="TMDb"/> <setting label="30007" type="bool" id="imdbanyway" visible="eq(-1,0)" default="false"/> diff --git a/addons/metadata.themoviedb.org/tmdb.xml b/addons/metadata.themoviedb.org/tmdb.xml index bb793ed31f..5c6e8407d1 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="2012-01-16"> <CreateSearchUrl dest="3"> - <RegExp input="$$1" output="<url>https://api.tmdb.org/3/search/movie?api_key=6889f6089877fd092454d00edb44a84d&amp;query=\1&amp;year=$$4&amp;language=$INFO[language]</url>" dest="3"> + <RegExp input="$$1" output="<url>https://api.tmdb.org/3/search/movie?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;query=\1&amp;year=$$4&amp;language=$INFO[language]</url>" dest="3"> <RegExp input="$$2" output="\1" dest="4"> <expression clear="yes">(.+)</expression> </RegExp> @@ -9,34 +9,34 @@ </RegExp> </CreateSearchUrl> <NfoUrl dest="3"> - <RegExp input="$$1" output="<details><url>https://api.tmdb.org/3/movie/\2?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url><id>\2</id></details>" dest="3"> + <RegExp input="$$1" output="<details><url>https://api.tmdb.org/3/movie/\2?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$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 cache="tmdb-$INFO[language]-tt\1.json">https://api.tmdb.org/3/movie/tt\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url><id>tt\1</id></details>" dest="3"> + <RegExp input="$$1" output="<details><url cache="tmdb-$INFO[language]-tt\1.json">https://api.tmdb.org/3/movie/tt\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url><id>tt\1</id></details>" dest="3"> <expression>imdb....?/title/tt([0-9]+)</expression> </RegExp> - <RegExp input="$$1" output="<details><url cache="tmdb-$INFO[language]-tt\1.json">https://api.tmdb.org/3/movie/tt\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url><id>tt\1</id></details>" dest="3"> + <RegExp input="$$1" output="<details><url cache="tmdb-$INFO[language]-tt\1.json">https://api.tmdb.org/3/movie/tt\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url><id>tt\1</id></details>" dest="3"> <expression>imdb....?/Title\?t{0,2}([0-9]+)</expression> </RegExp> </NfoUrl> <GetSearchResults dest="8"> <RegExp input="$$3" output="<results>\1</results>" dest="8"> - <RegExp input="$$1" output="<entity><title>\3</title><id>\2</id><year>\1</year><url cache="tmdb-$INFO[language]-\2.json">https://api.tmdb.org/3/movie/\2?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url></entity>" dest="3"> + <RegExp input="$$1" output="<entity><title>\3</title><id>\2</id><year>\1</year><url cache="tmdb-$INFO[language]-\2.json">https://api.tmdb.org/3/movie/\2?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url></entity>" dest="3"> <expression repeat="yes">"release_date":"([0-9]+)-.*?"id":([0-9]*),"original_title":"[^"]*","original_language":"[^"]*","title":"([^"]*)"</expression> </RegExp> - <RegExp input="$$1" output="<entity><title>\3</title><id>\2</id><year>\1</year><url cache="tmdb-$INFO[language]-\2.json">https://api.tmdb.org/3/movie/\2?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url></entity>" dest="3+"> + <RegExp input="$$1" output="<entity><title>\3</title><id>\2</id><year>\1</year><url cache="tmdb-$INFO[language]-\2.json">https://api.tmdb.org/3/movie/\2?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url></entity>" dest="3+"> <expression repeat="yes">"release_date":"([0-9]+)-.*?"id":([0-9]*),"original_title":"([^"]*)","original_language":"[^"]*"</expression> </RegExp> - <RegExp input="$$1" output="<entity><title>\2</title><id>\1</id><url cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url></entity>" dest="3+"> + <RegExp input="$$1" output="<entity><title>\2</title><id>\1</id><url cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url></entity>" dest="3+"> <expression repeat="yes">"release_date":null.*?"id":([0-9]*),"original_title":"([^"]*)","original_language":"[^"]*"</expression> </RegExp> - <RegExp input="$$1" output="<entity><title>\2</title><id>\1</id><year>\3</year><url cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url></entity>" dest="3+"> + <RegExp input="$$1" output="<entity><title>\2</title><id>\1</id><year>\3</year><url cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url></entity>" dest="3+"> <expression repeat="yes">"id":([0-9]*).*?title":"[^"]*".*?original_title":"([^"]*)".*?"release_date":"([0-9]+)-</expression> </RegExp> - <RegExp input="$$1" output="<entity><title>\2</title><id>\1</id><year>\3</year><url cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url></entity>" dest="3+"> + <RegExp input="$$1" output="<entity><title>\2</title><id>\1</id><year>\3</year><url cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url></entity>" dest="3+"> <expression repeat="yes">"id":([0-9]*).*?title":"([^"]*)".*?original_title":"[^"]*".*?"release_date":"([0-9]+)-</expression> </RegExp> - <RegExp input="$$1" output="<entity><title>\2</title><id>\1</id><url cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=6889f6089877fd092454d00edb44a84d&amp;language=$INFO[language]</url></entity>" dest="3+"> + <RegExp input="$$1" output="<entity><title>\2</title><id>\1</id><url cache="tmdb-$INFO[language]-\1.json">https://api.tmdb.org/3/movie/\1?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=$INFO[language]</url></entity>" dest="3+"> <expression repeat="yes">"id":([0-9]*).*?title":"([^"]*)".*?original_title":"[^"]*".*?"release_date":null</expression> </RegExp> <expression noclean="1" /> @@ -44,7 +44,7 @@ </GetSearchResults> <GetDetails dest="3"> <RegExp input="$$5" output="<details>\1</details>" dest="3"> - <RegExp input="$$1" output="<uniqueid type="themoviedb" default="true">$$2</uniqueid>" dest="5"> + <RegExp input="$$1" output="<uniqueid type="tmdb" default="true">$$2</uniqueid>" dest="5"> <expression/> </RegExp> <RegExp input="$$1" output="\1" dest="11"> @@ -74,26 +74,17 @@ <RegExp input="$$1" output="\1" dest="10"> <expression clear="yes" noclean="1">"runtime":([0-9]+)</expression> </RegExp> - <RegExp input="$$10" output="<url function="ParseFallbackTMDBRuntime" cache="tmdb-en-$$2.json">https://api.tmdb.org/3/movie/$$2?api_key=6889f6089877fd092454d00edb44a84d&amp;language=en</url>" dest="5+"> + <RegExp input="$$10" output="<url function="ParseFallbackTMDBRuntime" cache="tmdb-en-$$2.json">https://api.tmdb.org/3/movie/$$2?api_key=ecbc86c92da237cb9faff6d3ddc4be6d&amp;language=en</url>" dest="5+"> <expression>^$</expression> </RegExp> <RegExp input="$$10" output="<runtime>\1</runtime>" dest="5+"> <expression>(.+)</expression> </RegExp> - <RegExp input="$INFO[RatingS]" output="$$6" dest="5+"> - <RegExp input="$$11" output="<chain function="GetIMDBRatingsByIdAsDef">\1</chain>" dest="6"> - <expression>(.+)</expression> - </RegExp> - <RegExp input="" output="<chain function="GetTMDBRatingsByIdChain">$$2</chain>" dest="6+"> - <expression/> - </RegExp> - <expression>IMDb</expression> - </RegExp> - <RegExp input="$INFO[RatingS]" output="<chain function="GetTMDBRatingsByIdAsDefChain">$$2</chain>$$7" dest="5+"> - <RegExp input="$11" conditional="imdbanyway" output="<chain function="GetIMDBRatingsById">$$11</chain>" dest="7"> - <expression>(.+)</expression> - </RegExp> - <expression>TMDb</expression> + <RegExp input="$$11|$INFO[RatingS]|default|$INFO[imdbanyway]" output="<chain function="GetIMDBRatingsById">$$11\1</chain>" dest="5+"> + <expression>tt[0-9]+\|(?:IMDb(\|default)|.*true$)</expression> + </RegExp> + <RegExp input="$INFO[RatingS]|default" output="<chain function="GetTMDBRatingsByIdChain">$$2\1</chain>" dest="5+"> + <expression>TMDb(\|default)|.*</expression> </RegExp> <RegExp input="$$2" output="<chain function="GetTMDBStudioByIdChain">$$2</chain>" dest="5+"> <expression /> diff --git a/addons/metadata.tvdb.com/addon.xml b/addons/metadata.tvdb.com/addon.xml index 90bf985f9b..1e91ce0d08 100644 --- a/addons/metadata.tvdb.com/addon.xml +++ b/addons/metadata.tvdb.com/addon.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <addon id="metadata.tvdb.com" name="The TVDB" - version="2.0.4" + version="3.0.1" provider-name="Team Kodi"> <requires> <import addon="xbmc.metadata" version="2.1.0"/> - <import addon="metadata.common.imdb.com" version="2.7.8"/> + <import addon="metadata.common.imdb.com" version="2.9.2"/> </requires> <extension point="xbmc.metadata.scraper.tvshows" language="multi" diff --git a/addons/metadata.tvdb.com/changelog.txt b/addons/metadata.tvdb.com/changelog.txt index 9cc6563131..fdd47553c4 100644 --- a/addons/metadata.tvdb.com/changelog.txt +++ b/addons/metadata.tvdb.com/changelog.txt @@ -1,3 +1,12 @@ +[B]3.0.1[/B] +- fixed: Uniqueids fixes + +[B]3.0.0[/B] +- Changed: Multiple ratings and uniqueids + +[B]2.0.5[/B] +- Fixed: Prevent language choices from interfering with IMDb ratings + [B]2.0.4[/B] - Fixed: Moved IMDb ratings to prevent clearing buffers before GetActors diff --git a/addons/metadata.tvdb.com/resources/language/English/strings.po b/addons/metadata.tvdb.com/resources/language/English/strings.po index 9e3b25632d..705e48df98 100644 --- a/addons/metadata.tvdb.com/resources/language/English/strings.po +++ b/addons/metadata.tvdb.com/resources/language/English/strings.po @@ -37,11 +37,11 @@ msgid "Language" msgstr "" msgctxt "#30005" -msgid "Get Rating from" +msgid "Get Default Rating from" msgstr "" msgctxt "#30006" -msgid "Use TheTVDB Ratings in case IMDb is missing" +msgid "Also get ratings from TheTVDB" msgstr "" msgctxt "#30007" @@ -52,3 +52,6 @@ msgctxt "#30008" msgid "Fallback language" msgstr "" +msgctxt "#30009" +msgid "Also get ratings from IMDb" +msgstr "" diff --git a/addons/metadata.tvdb.com/resources/settings.xml b/addons/metadata.tvdb.com/resources/settings.xml index a85487fd08..b636150f05 100644 --- a/addons/metadata.tvdb.com/resources/settings.xml +++ b/addons/metadata.tvdb.com/resources/settings.xml @@ -10,4 +10,5 @@ <setting label="30008" type="select" id="fallbacklanguage" values="cs|da|de|el|en|es|fi|fr|he|hr|hu|it|ja|ko|nl|no|pl|pt|ru|sl|sv|tr|zh" subsetting="true" sort="yes" visible="eq(-1,true)" default="en" /> <setting label="30005" type="labelenum" values="TheTVDB|IMDb" id="RatingS" default="TheTVDB"/> <setting label="30006" type="bool" id="fallback" subsetting="true" visible="eq(-1,1)" default="true"/> + <setting label="30009" type="bool" id="alsoimdb" subsetting="true" visible="eq(-2,0)" default="false"/> </settings> diff --git a/addons/metadata.tvdb.com/tvdb.xml b/addons/metadata.tvdb.com/tvdb.xml index 589e1a1a5c..801c7f4bdd 100644 --- a/addons/metadata.tvdb.com/tvdb.xml +++ b/addons/metadata.tvdb.com/tvdb.xml @@ -22,7 +22,7 @@ </RegExp> </NfoUrl> <NfoUrlAuth dest="3" clearbuffers="no"> - <RegExp input="$$19" output="<details><url cache="$$6-$INFO[language].xml">https://api.thetvdb.com/series/$$6|Authorization=Bearer%20\1&Accept-Language=$INFO[language]</url><id>$$6</id></details>" dest="3"> + <RegExp input="$$19" output="<details><url cache="$$6-$INFO[language].xml">https://api.thetvdb.com/series/$$6|Authorization=Bearer%20\1&accept-language=$INFO[language]</url><id>$$6</id></details>" dest="3"> <RegExp input="$$1" output="\1" dest="19"> <expression>"token": "(.*)"</expression> </RegExp> @@ -30,7 +30,7 @@ </RegExp> </NfoUrlAuth> <GetTVDBId dest="3" clearbuffers="no"> - <RegExp input="$$19" output="<details><url function="GetTVDBIdAuth" cache="search-$$7-$INFO[language].json">https://api.thetvdb.com/search/series?imdbId=$$7|Authorization=Bearer%20\1&Accept-Language=$INFO[language]</url></details>" dest="3"> + <RegExp input="$$19" output="<details><url function="GetTVDBIdAuth" cache="search-$$7-$INFO[language].json">https://api.thetvdb.com/search/series?imdbId=$$7|Authorization=Bearer%20\1&accept-language=$INFO[language]</url></details>" dest="3"> <RegExp input="$$1" output="\1" dest="19"> <expression>"token": "(.*)"</expression> </RegExp> @@ -38,7 +38,7 @@ </RegExp> </GetTVDBId> <GetTVDBIdAuth dest="3" clearbuffers="no"> - <RegExp input="$$1" output="<details><url cache="\1-$INFO[language].xml">https://api.thetvdb.com/series/\1|Authorization=Bearer%20$$19&Accept-Language=$INFO[language]</url><id>\1</id></details>" dest="3"> + <RegExp input="$$1" output="<details><url cache="\1-$INFO[language].xml">https://api.thetvdb.com/series/\1|Authorization=Bearer%20$$19&accept-language=$INFO[language]</url><id>\1</id></details>" dest="3"> <expression>"id": (\d+),</expression> </RegExp> </GetTVDBIdAuth> @@ -61,10 +61,10 @@ <RegExp input="$INFO[language]" output="\1" dest="16"> <expression/> </RegExp> - <RegExp input="" output="<url function="GetSearchResultsAuth" cache="search-$$5-$INFO[language].json">https://api.thetvdb.com/search/series?name=$$5|Authorization=Bearer%20$$19&Accept-Language=$INFO[language]</url>" dest="4"> + <RegExp input="" output="<url function="GetSearchResultsAuth" cache="search-$$5-$INFO[language].json">https://api.thetvdb.com/search/series?name=$$5|Authorization=Bearer%20$$19&accept-language=$INFO[language]</url>" dest="4"> <expression noclean="1"/> </RegExp> - <RegExp conditional="usefallbacklanguage1" input="$INFO[language]" output="<chain function="SwitchLanguage">$INFO[fallbacklanguage]</chain><url function="GetSearchResultsAuth" cache="search-$$5-$INFO[fallbacklanguage].json">https://api.thetvdb.com/search/series?name=$$5|Authorization=Bearer%20$$19&Accept-Language=$INFO[fallbacklanguage]</url>" dest="4+"> + <RegExp conditional="usefallbacklanguage1" input="$INFO[language]" output="<chain function="SwitchLanguage">$INFO[fallbacklanguage]</chain><url function="GetSearchResultsAuth" cache="search-$$5-$INFO[fallbacklanguage].json">https://api.thetvdb.com/search/series?name=$$5|Authorization=Bearer%20$$19&accept-language=$INFO[fallbacklanguage]</url>" dest="4+"> <expression>^(?!\Q$INFO[fallbacklanguage]\E$)</expression> </RegExp> <expression noclean="1"/> @@ -138,7 +138,7 @@ <title><xsl:value-of select="$title"/></title> <year><xsl:value-of select="substring(firstAired,1,4)"/></year> <language>$$16</language> - <url><xsl:attribute name="cache"><xsl:value-of select="id"/>-$INFO[language].json</xsl:attribute>https://api.thetvdb.com/series/<xsl:value-of select="id"/>|Authorization=Bearer%20$$19&Accept-Language=$INFO[language]</url> + <url><xsl:attribute name="cache"><xsl:value-of select="id"/>-$INFO[language].json</xsl:attribute>https://api.thetvdb.com/series/<xsl:value-of select="id"/>|Authorization=Bearer%20$$19&accept-language=$INFO[language]</url> <id><xsl:value-of select="id"/></id> </entity> </xsl:template> @@ -154,14 +154,17 @@ <GetDetails dest="7" clearbuffers="no"> <RegExp input="$$4" output="<?xml version="1.0" encoding="utf-8" standalone="yes"?><details>\1</details>" dest="7"> <RegExp input="$$3" output="\1" dest="19"> - <expression>Authorization=Bearer%20(.+)&Accept-Language</expression> + <expression>Authorization=Bearer%20(.+)&accept-language</expression> </RegExp> <RegExp input="" output="" dest="14"> <expression clear="yes"/> </RegExp> - <RegExp input="$$1" output="<id>\1</id>" dest="4"> + <RegExp input="$$1" output="<uniqueid type="tvdb" default="true">\1</uniqueid>" dest="4"> <expression clear="yes">"id": (\d+),</expression> </RegExp> + <RegExp input="$$1" output="<uniqueid type="imdb">\1</uniqueid>" dest="4+"> + <expression>"imdbId": "(tt\d+)",</expression> + </RegExp> <RegExp input="$$1" output="<title>\1</title>" dest="4+"> <expression fixchars="1">"seriesName": "(.*)",\s+"aliases"</expression> </RegExp> @@ -199,7 +202,7 @@ <expression noclean="1" repeat="yes">"([^"]+)"</expression> </RegExp> <RegExp input="$INFO[language]" output="$$5" dest="4+"> - <RegExp input="$$14" output="<url function="GetFallbackDetails" cache="$$2-$INFO[fallbacklanguage].json">https://api.thetvdb.com/series/$$2|Authorization=Bearer%20$$19&Accept-Language=$INFO[fallbacklanguage]</url>" dest="5"> + <RegExp input="$$14" output="<url function="GetFallbackDetails" cache="$$2-$INFO[fallbacklanguage].json">https://api.thetvdb.com/series/$$2|Authorization=Bearer%20$$19&accept-language=$INFO[fallbacklanguage]</url>" dest="5"> <expression clear="yes">(?!^$)</expression> </RegExp> <expression>(?!^\Q$INFO[fallbacklanguage]\E$)</expression> @@ -210,24 +213,24 @@ <RegExp input="$$1" output="<chain function="GetArt">\1</chain>" dest="4+"> <expression noclean="1">"id": (\d+),</expression> </RegExp> - <RegExp input="$$5" output="\1" dest="4+"> - <RegExp input="$$1" output="<rating>\1</rating>" dest="5"> + <RegExp input="$$6" output="\1" dest="4+"> + <RegExp input="$$1" output="<value>\1</value>" dest="5"> <expression clear="yes">"siteRating": (?:(\d+(?:\.\d)?)|null)</expression> </RegExp> <RegExp input="$$1" output="<votes>\1</votes>" dest="5+"> <expression>"siteRatingCount": (?:(\d+)|null)\s+}</expression> </RegExp> - <RegExp input="$INFO[RatingS]" output="$$6" dest="5"> - <RegExp input="$$7" output="<chain function="GetIMDBRatingById">$$7</chain>" dest="6"> - <RegExp input="$$1" output="\1" dest="7"> - <expression clear="yes">"imdbId": "(tt\d+)",</expression> - </RegExp> - <expression clear="yes">(?!^$)</expression> - </RegExp> - <RegExp conditional="fallback" input="$$7" output="$$5" dest="6"> - <expression>^$</expression> - </RegExp> - <expression>IMDb</expression> + <RegExp input="$$1" output="\1" dest="8"> + <expression clear="yes">"imdbId": "(tt\d+)",</expression> + </RegExp> + <RegExp input="$INFO[RatingS]" output="default="true"" dest="9"> + <expression>TheTVDB</expression> + </RegExp> + <RegExp input="$INFO[RatingS]|$INFO[fallback]" output="<ratings><rating name="tvdb" $$9 >$$5</rating></ratings>" dest="6"> + <expression>TheTVDB|true</expression> + </RegExp> + <RegExp input="$$8|$INFO[RatingS]|default|$INFO[alsoimdb]" output="<chain function="GetIMDBRatingsById">$$8\1</chain>" dest="6+"> + <expression>^tt\d+\|(?:IMDb(\|default)|.*true$)</expression> </RegExp> <expression noclean="1"/> </RegExp> @@ -309,14 +312,14 @@ <RegExp input="$INFO[language]" output="\1" dest="16"> <expression/> </RegExp> - <RegExp input="$$1" output="<url function="LoadArt" cache="$$18-art-\1-$$16.json">https://api.thetvdb.com/series/$$18/images/query?keyType=\1|Authorization=Bearer%20$$19&Accept-Language=$$16</url>" dest="4"> + <RegExp input="$$1" output="<url function="LoadArt" cache="$$18-art-\1-$$16.json">https://api.thetvdb.com/series/$$18/images/query?keyType=\1|Authorization=Bearer%20$$19&accept-language=$$16</url>" dest="4"> <expression clear="yes" repeat="yes">"keyType": "([^"]+)"</expression> </RegExp> <RegExp conditional="usefallbacklanguage1" input="$INFO[fallbacklanguage]" output="$$5" dest="4+"> <RegExp input="" output="<chain function="SwitchLanguage">$INFO[fallbacklanguage]</chain>" dest="5"> <expression noclean="1"/> </RegExp> - <RegExp input="$$1" output="<url function="LoadArt" cache="$$18-art-\1-$INFO[fallbacklanguage].json">https://api.thetvdb.com/series/$$18/images/query?keyType=\1|Authorization=Bearer%20$$19&Accept-Language=$INFO[fallbacklanguage]</url>" dest="5+"> + <RegExp input="$$1" output="<url function="LoadArt" cache="$$18-art-\1-$INFO[fallbacklanguage].json">https://api.thetvdb.com/series/$$18/images/query?keyType=\1|Authorization=Bearer%20$$19&accept-language=$INFO[fallbacklanguage]</url>" dest="5+"> <expression repeat="yes">"keyType": "([^"]+)"</expression> </RegExp> <expression>^(?!\Q$$16\E$|en$)</expression> @@ -325,7 +328,7 @@ <RegExp input="" output="<chain function="SwitchLanguage">en</chain>" dest="5"> <expression noclean="1"/> </RegExp> - <RegExp input="$$1" output="<url function="LoadArt" cache="$$18-art-\1-en.json">https://api.thetvdb.com/series/$$18/images/query?keyType=\1|Authorization=Bearer%20$$19&Accept-Language=en</url>" dest="5+"> + <RegExp input="$$1" output="<url function="LoadArt" cache="$$18-art-\1-en.json">https://api.thetvdb.com/series/$$18/images/query?keyType=\1|Authorization=Bearer%20$$19&accept-language=en</url>" dest="5+"> <expression repeat="yes">"keyType": "([^"]+)"</expression> </RegExp> <expression>^(?!en)</expression> @@ -429,7 +432,7 @@ <RegExp input="$$2" output="\1" dest="18"> <expression>"id":(\d+)}</expression> </RegExp> - <RegExp input="$$19" output="<url function="GetEpisodeListAuth" cache="episodes-$$18-1-$INFO[language].json">https://api.thetvdb.com/series/$$18/episodes|Authorization=Bearer%20$$19&Accept-Language=$INFO[language]</url>" dest="5"> + <RegExp input="$$19" output="<url function="GetEpisodeListAuth" cache="episodes-$$18-1-$INFO[language].json">https://api.thetvdb.com/series/$$18/episodes|Authorization=Bearer%20$$19&accept-language=$INFO[language]</url>" dest="5"> <expression clear="yes">(?!^$)</expression> </RegExp> @@ -470,7 +473,7 @@ <xsl:param name="current"/> <xsl:param name="last"/> <xsl:if test="$last>=$current"> - <url><xsl:attribute name="function">LoadEpisodeList</xsl:attribute><xsl:attribute name="cache">episodes-$$18-<xsl:value-of select="$current"/>-$INFO[language].json</xsl:attribute>https://api.thetvdb.com/series/$$18/episodes?page=<xsl:value-of select="$current"/>|Authorization=Bearer%20$$19&Accept-Language=$INFO[language]</url> + <url><xsl:attribute name="function">LoadEpisodeList</xsl:attribute><xsl:attribute name="cache">episodes-$$18-<xsl:value-of select="$current"/>-$INFO[language].json</xsl:attribute>https://api.thetvdb.com/series/$$18/episodes?page=<xsl:value-of select="$current"/>|Authorization=Bearer%20$$19&accept-language=$INFO[language]</url> <xsl:call-template name="generatelinks"> <xsl:with-param name="current" select="$current+1"/> <xsl:with-param name="last" select="last"/> @@ -515,7 +518,7 @@ </xsl:variable> <xsl:call-template name="count-episodes"> <xsl:with-param name="season-list" select="$season-list"/> - <xsl:with-param name="count-list" select="'|S1|0'"/> + <xsl:with-param name="count-list" select="concat('|S', substring-before($season-list,'|'), '|0')"/> </xsl:call-template> </xsl:if> </xsl:template> @@ -524,7 +527,8 @@ <xsl:param name="count-list"/> <xsl:variable name="first" select="substring-before($season-list,'|')"/> <xsl:variable name="remaining" select="substring-after($season-list,'|')"/> - <xsl:variable name="currList" select="concat($count-list, '|S', string($first+1), '|', string(count(//Episode[SeasonNumber=$first])+substring-after($count-list,concat('|S',$first,'|'))))"/> + <xsl:variable name="next" select="substring-before($remaining,'|')"/> + <xsl:variable name="currList" select="concat($count-list, '|S', $next, '|', string(count(//Episode[SeasonNumber=$first])+substring-after($count-list,concat('|S',$first,'|'))))"/> <xsl:choose> <xsl:when test="substring-after($remaining,'|')!=''"> <xsl:call-template name="count-episodes"> @@ -594,7 +598,7 @@ </xsl:choose> </xsl:otherwise> </xsl:choose> - <url post="yes" cache="auth.json">https://api.thetvdb.com/login?{"apikey":"439DFEBA9D3059C6","id":<xsl:value-of select="id"/>}|Content-Type=application/json&Accept-Language=$INFO[language]</url> + <url post="yes" cache="auth.json">https://api.thetvdb.com/login?{"apikey":"439DFEBA9D3059C6","id":<xsl:value-of select="id"/>}|Content-Type=application/json&accept-language=$INFO[language]</url> </episode> </xsl:template> @@ -657,7 +661,7 @@ <RegExp input="$$1" output="\1" dest="19"> <expression>"token": "(.*)"</expression> </RegExp> - <RegExp input="$$2|" output="<url function="GetEpisodeDetailsAuth" cache="episode-\1-$INFO[language].json">https://api.thetvdb.com/episodes/\1|Authorization=Bearer%20$$19&amp;Accept-Language=$INFO[language]</url>" dest="5"> + <RegExp input="$$2|" output="<url function="GetEpisodeDetailsAuth" cache="episode-\1-$INFO[language].json">https://api.thetvdb.com/episodes/\1|Authorization=Bearer%20$$19&amp;accept-language=$INFO[language]</url>" dest="5"> <expression noclean="1" repeat="yes">(\d+)\|</expression> </RegExp> <RegExp input="$$1" output="" dest="13"> @@ -762,7 +766,7 @@ <expression noclean="1"/> </RegExp> <RegExp input="$INFO[language]" output="$$6" dest="5"> - <RegExp input="$$14" output="<url function="GetFallbackEpisodeDetails" cache="episode-$$17-$INFO[fallbacklanguage].json">https://api.thetvdb.com/episodes/$$17|Authorization=Bearer%20$$19&Accept-Language=$INFO[fallbacklanguage]</url>" dest="6"> + <RegExp input="$$14" output="<url function="GetFallbackEpisodeDetails" cache="episode-$$17-$INFO[fallbacklanguage].json">https://api.thetvdb.com/episodes/$$17|Authorization=Bearer%20$$19&accept-language=$INFO[fallbacklanguage]</url>" dest="6"> <expression clear="yes">(?!^$)</expression> </RegExp> <expression>(?!^\Q$INFO[fallbacklanguage]\E$)</expression> @@ -862,7 +866,8 @@ </xsl:otherwise> </xsl:choose> </plot> - <uniqueid><xsl:value-of select="$FirstEpisode/id"/></uniqueid> + <uniqueid type="tvdb" default="true"><xsl:value-of select="$FirstEpisode/id"/></uniqueid> + <xsl:if test="$FirstEpisode/imdbId!=''"><uniqueid type="imdb"><xsl:value-of select="$FirstEpisode/imdbId"/></uniqueid></xsl:if> <aired><xsl:value-of select="$FirstEpisode/firstAired"/></aired> <xsl:choose> <xsl:when test="'$INFO[dvdorder]'!='true'"> @@ -953,26 +958,30 @@ </xsl:otherwise> </xsl:choose> </xsl:if> - <xsl:choose> - <xsl:when test="('$INFO[RatingS]'='IMDb') and (($FirstEpisode/imdbId!='') or ('$INFO[fallback]'='false'))"> - <xsl:if test="$FirstEpisode/imdbId!=''"><chain function="GetIMDBRatingById"><xsl:value-of select="$FirstEpisode/imdbId"/></chain></xsl:if> - </xsl:when> - <xsl:otherwise> - <xsl:choose> - <xsl:when test="$single-episode"> - <rating><xsl:value-of select="$FirstEpisode/siteRating"/></rating> - <votes><xsl:value-of select="$FirstEpisode/siteRatingCount"/></votes> - </xsl:when> - <xsl:otherwise> - <xsl:call-template name="merge-rating"> - <xsl:with-param name="list" select="$episode-list" /> - <xsl:with-param name="rating" select="'0'" /> - <xsl:with-param name="votes" select="'0'" /> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> - </xsl:otherwise> - </xsl:choose> + <xsl:if test="('$INFO[RatingS]'='IMDb') or ('$INFO[alsoimdb]'='true')"> + <xsl:if test="$FirstEpisode/imdbId!=''"><chain function="GetIMDBRatingsById"><xsl:value-of select="$FirstEpisode/imdbId"/><xsl:if test="'$INFO[RatingS]'='IMDb'">|default</xsl:if></chain></xsl:if> + </xsl:if> + <xsl:if test="('$INFO[RatingS]'='TheTVDB') or ('$INFO[fallback]'='true')"> + <xsl:choose> + <xsl:when test="$single-episode"> + <ratings> + <rating> + <xsl:attribute name="name">tvdb</xsl:attribute> + <xsl:if test="'$INFO[RatingS]'='TheTVDB'"><xsl:attribute name="default">true</xsl:attribute></xsl:if> + <value><xsl:value-of select="$FirstEpisode/siteRating"/></value> + <votes><xsl:value-of select="$FirstEpisode/siteRatingCount"/></votes> + </rating> + </ratings> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="merge-rating"> + <xsl:with-param name="list" select="$episode-list" /> + <xsl:with-param name="rating" select="'0'" /> + <xsl:with-param name="votes" select="'0'" /> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:if> <xsl:call-template name="split-details"> <xsl:with-param name="list" select="$episode-list"/> </xsl:call-template> @@ -1041,10 +1050,16 @@ </xsl:call-template> </xsl:when> <xsl:otherwise> - <xsl:if test="$currVotes>0"> - <rating><xsl:value-of select="format-number($currRating div $currVotes,'#.#')"/></rating> - </xsl:if> - <votes><xsl:value-of select="$currVotes"/></votes> + <ratings> + <rating> + <xsl:attribute name="name">tvdb</xsl:attribute> + <xsl:if test="'$INFO[RatingS]'='TheTVDB'"><xsl:attribute name="default">true</xsl:attribute></xsl:if> + <xsl:if test="$currVotes>0"> + <value><xsl:value-of select="format-number($currRating div $currVotes,'#.#')"/></value> + </xsl:if> + <votes><xsl:value-of select="$currVotes"/></votes> + </rating> + </ratings> </xsl:otherwise> </xsl:choose> </xsl:template> |