[SCM] kodi/master: Imported Upstream version 16.0+dfsg1

rbalint at users.alioth.debian.org rbalint at users.alioth.debian.org
Thu Feb 25 21:29:47 UTC 2016


The following commit has been merged in the master branch:
commit d47318295a7ec31e066c47f6a4b9e72dc28706c1
Author: Balint Reczey <balint at balintreczey.hu>
Date:   Mon Feb 22 23:00:57 2016 +0100

    Imported Upstream version 16.0+dfsg1

diff --git a/addons/metadata.album.universal/addon.xml b/addons/metadata.album.universal/addon.xml
index 277fc24..236fca3 100644
--- a/addons/metadata.album.universal/addon.xml
+++ b/addons/metadata.album.universal/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="metadata.album.universal"
        name="Universal Album Scraper"
-       version="2.5.1"
+       version="2.6.0"
        provider-name="Olympia, Team Kodi">
   <requires>
     <import addon="xbmc.metadata" version="2.1.0"/>
diff --git a/addons/metadata.album.universal/albumuniversal.xml b/addons/metadata.album.universal/albumuniversal.xml
index c70f78b..64e752a 100644
--- a/addons/metadata.album.universal/albumuniversal.xml
+++ b/addons/metadata.album.universal/albumuniversal.xml
@@ -122,6 +122,9 @@
 			<RegExp input="$INFO[albumthemessource]" output="<url function="GetAMGAlbumThemes" cache="mb-$$4-rg.xml">http://musicbrainz.org/ws/2/release-group/$$4?inc=url-rels</url>" dest="5+">
 				<expression>allmusic.com</expression>
 			</RegExp>
+			<RegExp input="$INFO[albumthemessource]" output="<chain function="GetTADBAlbumThemeByMBID">$$4</chain>" dest="5+">
+				<expression>TheAudioDb.com</expression>
+			</RegExp>
 			<RegExp conditional="fanarttvalbumthumbs" input="$$4" output="<chain function="GetFanartTvAlbumThumbsByMBID">\1</chain>" dest="5+">
 				<expression noclean="1">(.+)</expression>
 			</RegExp>
diff --git a/addons/metadata.album.universal/changelog.txt b/addons/metadata.album.universal/changelog.txt
index 1ee8e5a..990eb44 100644
--- a/addons/metadata.album.universal/changelog.txt
+++ b/addons/metadata.album.universal/changelog.txt
@@ -1,3 +1,6 @@
+[B]2.6.0[/B]
+Added: Theme support from theaudiodb.com
+
 [B]2.5.1[/B]
 Update author name
 
diff --git a/addons/metadata.album.universal/resources/settings.xml b/addons/metadata.album.universal/resources/settings.xml
index 83c97d0..7403127 100644
--- a/addons/metadata.album.universal/resources/settings.xml
+++ b/addons/metadata.album.universal/resources/settings.xml
@@ -8,7 +8,7 @@
       <setting label="30004" type="labelenum" values="MusicBrainz|allmusic.com|TheAudioDb.com|None" id="albumratingsource" default="MusicBrainz"/>
       <setting label="30005" type="labelenum" values="TheAudioDb.com|allmusic.com|None" id="albumstylessource" default="TheAudioDb.com"/>
       <setting label="30006" type="labelenum" values="TheAudioDb.com|allmusic.com|None" id="albummoodssource" default="TheAudioDb.com"/>
-      <setting label="30007" type="labelenum" values="allmusic.com|None" id="albumthemessource" default="allmusic.com"/>
+      <setting label="30007" type="labelenum" values="TheAudioDb.com|allmusic.com|None" id="albumthemessource" default="TheAudioDb.com"/>
   </category>
 
   <category label="30009">
diff --git a/addons/metadata.common.theaudiodb.com/addon.xml b/addons/metadata.common.theaudiodb.com/addon.xml
index a14f29d..2bd428d 100644
--- a/addons/metadata.common.theaudiodb.com/addon.xml
+++ b/addons/metadata.common.theaudiodb.com/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="metadata.common.theaudiodb.com"
        name="TheAudioDb Scraper Library"
-       version="1.8.2"
+       version="1.9.0"
        provider-name="Team Kodi">
   <requires>
     <import addon="xbmc.metadata" version="2.1.0"/>
diff --git a/addons/metadata.common.theaudiodb.com/tadb.xml b/addons/metadata.common.theaudiodb.com/tadb.xml
index eb65cfd..ceeddd6 100644
--- a/addons/metadata.common.theaudiodb.com/tadb.xml
+++ b/addons/metadata.common.theaudiodb.com/tadb.xml
@@ -78,9 +78,6 @@
 				<expression fixchars="1">strBiography$INFO[tadbartistlanguage]":"(.*?)","</expression>
 			</RegExp>
 			<RegExp input="$$11" output="$$12" dest="2">
-				<RegExp input="$INFO[biogfbsource]" output="<chain function="GetLastFMFallbackBiographyByMBID">$$8</chain>" dest="12">
-					<expression>last.fm</expression>
-				</RegExp>
 				<RegExp input="$INFO[biogfbsource]" output="<chain function="GetAMGFallbackBiographyByAMGID">$$9</chain>" dest="12">
 					<expression>allmusic.com</expression>
 				</RegExp>
@@ -244,9 +241,6 @@
 				<expression fixchars="1">strGenre":"([^"]*)</expression>
 			</RegExp>
 			<RegExp input="$$11" output="$$12" dest="2">
-				<RegExp input="$INFO[genresfbsource]" output="<chain function="GetLastFMFallbackArtistGenresByMBID">$$8</chain>" dest="12">
-					<expression>last.fm</expression>
-				</RegExp>
 				<RegExp input="$INFO[genresfbsource]" output="<chain function="GetAMGFallbackArtistGenresByAMGID">$$9</chain>" dest="12">
 					<expression>allmusic.com</expression>
 				</RegExp>
@@ -301,9 +295,6 @@
 				<expression fixchars="1">strMood":"([^"]*)</expression>
 			</RegExp>
 			<RegExp input="$$11" output="$$12" dest="2">
-				<RegExp input="$INFO[moodsfbsource]" output="<chain function="GetLastFMFallbackArtistMoodsByMBID">$$8</chain>" dest="12">
-					<expression>last.fm</expression>
-				</RegExp>
 				<RegExp input="$INFO[moodsfbsource]" output="<chain function="GetAMGFallbackArtistMoodsByAMGID">$$9</chain>" dest="12">
 					<expression>allmusic.com</expression>
 				</RegExp>
@@ -358,9 +349,6 @@
 				<expression fixchars="1">strStyle":"([^"]*)</expression>
 			</RegExp>
 			<RegExp input="$$11" output="$$12" dest="2">
-				<RegExp input="$INFO[stylesfbsource]" output="<chain function="GetLastFMFallbackArtistStylesByMBID">$$8</chain>" dest="12">
-					<expression>last.fm</expression>
-				</RegExp>
 				<RegExp input="$INFO[stylesfbsource]" output="<chain function="GetAMGFallbackArtistStylesByAMGID">$$9</chain>" dest="12">
 					<expression>allmusic.com</expression>
 				</RegExp>
@@ -535,6 +523,25 @@
 		</RegExp>
 	</ParseTADBAlbumStyles>
 
+	<GetTADBAlbumThemeByID dest="5">
+		<RegExp input="$$1" output="<details><url function="ParseTADBAlbumTheme" cache="tadb-\1-album.json">http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album.php?m=\1</url></details>" dest="5">
+			<expression noclean="1"/>
+		</RegExp>
+	</GetTADBAlbumThemeByID>
+	<GetTADBAlbumThemeByMBID dest="5">
+		<RegExp input="$$1" output="<details><url function="ParseTADBAlbumTheme" cache="tadb-\1-album.json">http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album-mb.php?i=\1</url></details>" dest="5">
+			<expression noclean="1"/>
+		</RegExp>
+	</GetTADBAlbumThemeByMBID>
+	<ParseTADBAlbumTheme dest="5">
+		<RegExp input="$$2" output="<details>\1</details>" dest="5">
+			<RegExp input="$$1" output="<theme>\1</theme>" dest="2">
+				<expression noclean="1">strTheme":"([^"]*)</expression>
+			</RegExp>
+			<expression noclean="1" />
+		</RegExp>
+	</ParseTADBAlbumTheme>
+
 	<GetTADBAlbumTracksByID dest="5">
 		<RegExp input="$$1" output="<details><url function="ParseTADBAlbumTracks">http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/track.php?m=\1</details>" dest="5">
 			<expression noclean="1"/>
diff --git a/addons/metadata.common.themoviedb.org/addon.xml b/addons/metadata.common.themoviedb.org/addon.xml
index 6f78418..4c8c5ff 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.13.2"
+       version="2.14.0"
        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 502765f..b204cfe 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">http://api.tmdb.org/3/movie/\1/releases?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[tmdbcertcountry]</url>" dest="5">
+			<RegExp input="$$1" output="<url function="ParseTMDBCertifications" cache="tmdb-cert-\1.json">http://api.tmdb.org/3/movie/\1/releases?api_key=f7f51775877e0bb6703520952b3c7840&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">http://api.tmdb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[language]</url>" dest="5">
+			<RegExp input="$$1" output="<url function="ParseTMDBTitle" cache="tmdb-$INFO[language]-\1.json">http://api.tmdb.org/3/movie/\1?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=$INFO[language]</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -28,7 +28,7 @@
 	</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">http://api.tmdb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[tmdbtitlelanguage]</url>" dest="5">
+			<RegExp input="$$1" output="<url function="ParseTMDBTitle" cache="tmdb-$INFO[tmdbtitlelanguage]-\1.json">http://api.tmdb.org/3/movie/\1?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=$INFO[tmdbtitlelanguage]</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -48,7 +48,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">http://api.tmdb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[language]</url>" dest="5">
+			<RegExp input="$$8" output="<url function="ParseTMDBPlot" cache="tmdb-$INFO[language]-\1.json">http://api.tmdb.org/3/movie/\1?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=$INFO[language]</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -59,7 +59,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">http://api.tmdb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[tmdbplotlanguage]</url>" dest="5">
+			<RegExp input="$$8" output="<url function="ParseTMDBPlot" cache="tmdb-$INFO[tmdbplotlanguage]-\1.json">http://api.tmdb.org/3/movie/\1?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=$INFO[tmdbplotlanguage]</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -70,7 +70,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">http://api.tmdb.org/3/movie/$$8?api_key=57983e31fb435df4df77afb854740ea9&amp;language=en</url>" dest="2">
+			<RegExp input="$$9" output="<url function="ParseFallbackTMDBPlot" cache="tmdb-en-$$8.json">http://api.tmdb.org/3/movie/$$8?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=en</url>" dest="2">
 				<expression>^$</expression>
 			</RegExp>
 			<RegExp input="$$9" output="<plot>\1</plot>" dest="2">
@@ -93,7 +93,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">http://api.tmdb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[language]</url>" dest="5">
+			<RegExp input="$$8" output="<url function="ParseTMDBTagline" cache="tmdb-$INFO[language]-\1.json">http://api.tmdb.org/3/movie/\1?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=$INFO[language]</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -104,7 +104,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">http://api.tmdb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[tmdbtaglinelanguage]</url>" dest="5">
+			<RegExp input="$$8" output="<url function="ParseTMDBTagline" cache="tmdb-$INFO[tmdbtaglinelanguage]-\1.json">http://api.tmdb.org/3/movie/\1?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=$INFO[tmdbtaglinelanguage]</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -115,7 +115,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">http://api.tmdb.org/3/movie/$$8?api_key=57983e31fb435df4df77afb854740ea9&amp;language=en</url>" dest="2">
+			<RegExp input="$$9" output="<url function="ParseFallbackTMDBTagline" cache="tmdb-en-$$8.json">http://api.tmdb.org/3/movie/$$8?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=en</url>" dest="2">
 				<expression>^$</expression>
 			</RegExp>
 			<RegExp input="$$9" output="<tagline>\1</tagline>" dest="2">
@@ -138,7 +138,7 @@
 			<RegExp input="$$1" output="\1" dest="8">
 				<expression clear="yes" noclean="1" />
 			</RegExp>
-			<RegExp input="$$8" output="<url function="ParseTMDBTags" >http://api.tmdb.org/3/movie/\1/keywords?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5">
+			<RegExp input="$$8" output="<url function="ParseTMDBTags" >http://api.tmdb.org/3/movie/\1/keywords?api_key=f7f51775877e0bb6703520952b3c7840</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -158,7 +158,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">http://api.tmdb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[language]</url>" dest="5">
+			<RegExp input="$$8" output="<url function="ParseTMDBSet" cache="tmdb-$INFO[language]-\1.json">http://api.tmdb.org/3/movie/\1?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=$INFO[language]</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -169,7 +169,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">http://api.tmdb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[tmdbsetlanguage]</url>" dest="5">
+			<RegExp input="$$8" output="<url function="ParseTMDBSet" cache="tmdb-$INFO[tmdbsetlanguage]-\1.json">http://api.tmdb.org/3/movie/\1?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=$INFO[tmdbsetlanguage]</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -180,7 +180,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">http://api.tmdb.org/3/movie/$$8?api_key=57983e31fb435df4df77afb854740ea9&amp;language=en</url>" dest="2">
+			<RegExp input="$$9" output="<url function="ParseFallbackTMDBSet" cache="tmdb-en-$$8.json">http://api.tmdb.org/3/movie/$$8?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=en</url>" dest="2">
 				<expression>^$</expression>
 			</RegExp>
 			<RegExp input="$$9" output="<set>\1</set>" dest="2">
@@ -200,10 +200,10 @@
 
 	<GetTMDBCastByIdChain dest="4">
 		<RegExp input="$$5" output="<details>\1</details>" dest="4">
-			<RegExp input="$$1" output="<url function="ParseTMDBBaseImageURL" cache="tmdb-config.json">http://api.tmdb.org/3/configuration?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5">
+			<RegExp input="$$1" output="<url function="ParseTMDBBaseImageURL" cache="tmdb-config.json">http://api.tmdb.org/3/configuration?api_key=f7f51775877e0bb6703520952b3c7840</url>" dest="5">
 				<expression />
 			</RegExp>
-			<RegExp input="$$1" output="<url function="ParseTMDBCast" cache="tmdb-cast-\1.json">http://api.tmdb.org/3/movie/\1/casts?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5+">
+			<RegExp input="$$1" output="<url function="ParseTMDBCast" cache="tmdb-cast-\1.json">http://api.tmdb.org/3/movie/\1/casts?api_key=f7f51775877e0bb6703520952b3c7840</url>" dest="5+">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -226,7 +226,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">http://api.tmdb.org/3/movie/\1/casts?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5">
+			<RegExp input="$$1" output="<url function="ParseTMDBDirectors" cache="tmdb-cast-\1.json">http://api.tmdb.org/3/movie/\1/casts?api_key=f7f51775877e0bb6703520952b3c7840</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -246,7 +246,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">http://api.tmdb.org/3/movie/\1/casts?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5">
+			<RegExp input="$$1" output="<url function="ParseTMDBWriters" cache="tmdb-cast-\1.json">http://api.tmdb.org/3/movie/\1/casts?api_key=f7f51775877e0bb6703520952b3c7840</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -266,7 +266,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">http://api.tmdb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[language]</url>" dest="5">
+			<RegExp input="$$1" output="<url function="ParseTMDBGenres" cache="tmdb-$INFO[language]-\1.json">http://api.tmdb.org/3/movie/\1?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=$INFO[language]</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -274,7 +274,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">http://api.tmdb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[tmdbgenreslanguage]</url>" dest="5">
+			<RegExp input="$$1" output="<url function="ParseTMDBGenres" cache="tmdb-$INFO[tmdbgenreslanguage]-\1.json">http://api.tmdb.org/3/movie/\1?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=$INFO[tmdbgenreslanguage]</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -294,7 +294,7 @@
 
 	<GetTMDBRatingByIdChain dest="4">
 		<RegExp input="$$5" output="<details>\1</details>" dest="4">
-			<RegExp input="$$1" output="<url function="ParseTMDBRating" cache="tmdb-$INFO[language]-\1.json">http://api.tmdb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[language]</url>" dest="5">
+			<RegExp input="$$1" output="<url function="ParseTMDBRating" cache="tmdb-$INFO[language]-\1.json">http://api.tmdb.org/3/movie/\1?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=$INFO[language]</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -314,7 +314,7 @@
 
 	<GetTMDBStudioByIdChain dest="4">
 		<RegExp input="$$5" output="<details>\1</details>" dest="4">
-			<RegExp input="$$1" output="<url function="ParseTMDBStudio" cache="tmdb-en-\1.json">http://api.tmdb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&amp;language=en</url>" dest="5">
+			<RegExp input="$$1" output="<url function="ParseTMDBStudio" cache="tmdb-en-\1.json">http://api.tmdb.org/3/movie/\1?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=en</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -334,7 +334,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">http://api.tmdb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&amp;language=en</url>" dest="5">
+			<RegExp input="$$1" output="<url function="ParseTMDBCountry" cache="tmdb-en-\1.json">http://api.tmdb.org/3/movie/\1?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=en</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -354,7 +354,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">http://api.tmdb.org/3/movie/\1/trailers?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[language]</url>" dest="5">
+			<RegExp input="$$1" output="<url function="ParseTMDBTrailer" cache="tmdb-trailer-$INFO[language]-\1.json">http://api.tmdb.org/3/movie/\1/trailers?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=$INFO[language]</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -362,7 +362,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">http://api.tmdb.org/3/movie/\1/trailers?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[tmdbtrailerlanguage]</url>" dest="5">
+			<RegExp input="$$1" output="<url function="ParseTMDBTrailer" cache="tmdb-trailer-$INFO[tmdbtrailerlanguage]-\1.json">http://api.tmdb.org/3/movie/\1/trailers?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=$INFO[tmdbtrailerlanguage]</url>" dest="5">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -379,7 +379,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">http://api.tmdb.org/3/movie/$$8/trailers?api_key=57983e31fb435df4df77afb854740ea9&amp;language=en</url>" dest="2">
+			<RegExp input="$$9" output="<url function="ParseTMDBEnTrailer" cache="tmdb-trailer-en-$$8.json">http://api.tmdb.org/3/movie/$$8/trailers?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=en</url>" dest="2">
 				<expression>^$</expression>
 			</RegExp>
 			<RegExp input="$$9" output="$$9" dest="2">
@@ -399,7 +399,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">http://api.tmdb.org/3/movie/$$8/trailers?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5">
+			<RegExp input="$$9" output="<url function="ParseTMDBAllTrailer" cache="tmdb-trailer-$$8.json">http://api.tmdb.org/3/movie/$$8/trailers?api_key=f7f51775877e0bb6703520952b3c7840</url>" dest="5">
 				<expression>^$</expression>
 			</RegExp>
 			<RegExp input="$$9" output="$$9" dest="2">
@@ -422,10 +422,10 @@
 
 	<GetTMDBFanartByIdChain dest="4">
 		<RegExp input="$$5" output="<details>\1</details>" dest="4">
-			<RegExp input="$$1" output="<url function="ParseTMDBBaseImageURL" cache="tmdb-config.json">http://api.tmdb.org/3/configuration?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5">
+			<RegExp input="$$1" output="<url function="ParseTMDBBaseImageURL" cache="tmdb-config.json">http://api.tmdb.org/3/configuration?api_key=f7f51775877e0bb6703520952b3c7840</url>" dest="5">
 				<expression />
 			</RegExp>
-			<RegExp input="$$1" output="<url function="ParseTMDBFanart" cache="tmdb-images-\1.json">http://api.tmdb.org/3/movie/\1/images?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5+">
+			<RegExp input="$$1" output="<url function="ParseTMDBFanart" cache="tmdb-images-\1.json">http://api.tmdb.org/3/movie/\1/images?api_key=f7f51775877e0bb6703520952b3c7840</url>" dest="5+">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -445,10 +445,10 @@
 
 	<GetTMDBThumbsByIdChain dest="4">
 		<RegExp input="$$5" output="<details>\1</details>" dest="4">
-			<RegExp input="$$1" output="<url function="ParseTMDBBaseImageURL" cache="tmdb-config.json">http://api.tmdb.org/3/configuration?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5">
+			<RegExp input="$$1" output="<url function="ParseTMDBBaseImageURL" cache="tmdb-config.json">http://api.tmdb.org/3/configuration?api_key=f7f51775877e0bb6703520952b3c7840</url>" dest="5">
 				<expression />
 			</RegExp>
-			<RegExp input="$$1" output="<url function="ParseTMDBThumbs" cache="tmdb-images-$INFO[language]-\1.json">http://api.tmdb.org/3/movie/\1/images?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[language]</url>" dest="5+">
+			<RegExp input="$$1" output="<url function="ParseTMDBThumbs" cache="tmdb-images-$INFO[language]-\1.json">http://api.tmdb.org/3/movie/\1/images?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=$INFO[language]</url>" dest="5+">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -456,10 +456,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">http://api.tmdb.org/3/configuration?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="5">
+			<RegExp input="$$1" output="<url function="ParseTMDBBaseImageURL" cache="tmdb-config.json">http://api.tmdb.org/3/configuration?api_key=f7f51775877e0bb6703520952b3c7840</url>" dest="5">
 				<expression />
 			</RegExp>
-			<RegExp input="$$1" output="<url function="ParseTMDBLangThumbs" cache="tmdb-images-$INFO[tmdbthumblanguage]-\1.json">http://api.tmdb.org/3/movie/\1/images?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[tmdbthumblanguage]</url>" dest="5+">
+			<RegExp input="$$1" output="<url function="ParseTMDBLangThumbs" cache="tmdb-images-$INFO[tmdbthumblanguage]-\1.json">http://api.tmdb.org/3/movie/\1/images?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=$INFO[tmdbthumblanguage]</url>" dest="5+">
 				<expression />
 			</RegExp>
 			<expression noclean="1" />
@@ -480,12 +480,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">http://api.tmdb.org/3/movie/$$8/images?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="12">
+				<RegExp input="$INFO[language]" output="<url function="ParseTMDBAllThumbs" cache="tmdb-images-$$8.json">http://api.tmdb.org/3/movie/$$8/images?api_key=f7f51775877e0bb6703520952b3c7840</url>" dest="12">
 					<expression>en</expression>
 				</RegExp>
 				<expression>^$</expression>
 			</RegExp>
-			<RegExp input="$INFO[language]" output="<url function="ParseTMDBEnThumbs" cache="tmdb-images-en-$$8.json">http://api.tmdb.org/3/movie/$$8/images?api_key=57983e31fb435df4df77afb854740ea9&amp;language=en</url>" dest="2+">
+			<RegExp input="$INFO[language]" output="<url function="ParseTMDBEnThumbs" cache="tmdb-images-en-$$8.json">http://api.tmdb.org/3/movie/$$8/images?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=en</url>" dest="2+">
 				<expression>^((?!en).)*$</expression>
 			</RegExp>
 			<expression noclean="1">(.+)</expression>
@@ -506,12 +506,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">http://api.tmdb.org/3/movie/$$8/images?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="12">
+				<RegExp input="$INFO[tmdbthumblanguage]" output="<url function="ParseTMDBAllThumbs" cache="tmdb-images-$$8.json">http://api.tmdb.org/3/movie/$$8/images?api_key=f7f51775877e0bb6703520952b3c7840</url>" dest="12">
 					<expression>en</expression>
 				</RegExp>
 				<expression>^$</expression>
 			</RegExp>
-			<RegExp input="$INFO[tmdbthumblanguage]" output="<url function="ParseTMDBEnThumbs" cache="tmdb-images-en-$$8.json">http://api.tmdb.org/3/movie/$$8/images?api_key=57983e31fb435df4df77afb854740ea9&amp;language=en</url>" dest="2+">
+			<RegExp input="$INFO[tmdbthumblanguage]" output="<url function="ParseTMDBEnThumbs" cache="tmdb-images-en-$$8.json">http://api.tmdb.org/3/movie/$$8/images?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=en</url>" dest="2+">
 				<expression>^((?!en).)*$</expression>
 			</RegExp>
 			<expression noclean="1">(.+)</expression>
@@ -531,7 +531,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">http://api.tmdb.org/3/movie/$$8/images?api_key=57983e31fb435df4df77afb854740ea9</url>" dest="2">
+			<RegExp input="$$9" output="<url function="ParseTMDBAllThumbs" cache="tmdb-images-$$8.json">http://api.tmdb.org/3/movie/$$8/images?api_key=f7f51775877e0bb6703520952b3c7840</url>" dest="2">
 				<expression>^$</expression>
 			</RegExp>
 			<expression noclean="1">(.+)</expression>
diff --git a/addons/metadata.themoviedb.org/addon.xml b/addons/metadata.themoviedb.org/addon.xml
index 0518b11..bcb1ccd 100644
--- a/addons/metadata.themoviedb.org/addon.xml
+++ b/addons/metadata.themoviedb.org/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="metadata.themoviedb.org"
        name="The Movie Database"
-       version="3.8.8"
+       version="3.9.0"
        provider-name="Team Kodi">
   <requires>
     <import addon="xbmc.metadata" version="2.1.0"/>
diff --git a/addons/metadata.themoviedb.org/changelog.txt b/addons/metadata.themoviedb.org/changelog.txt
index ee97612..785e645 100644
--- a/addons/metadata.themoviedb.org/changelog.txt
+++ b/addons/metadata.themoviedb.org/changelog.txt
@@ -1,3 +1,6 @@
+[B]3.9.0[/B]
+- Update
+
 [B]3.8.8[/B]
 - Update author name
 
diff --git a/addons/metadata.themoviedb.org/tmdb.xml b/addons/metadata.themoviedb.org/tmdb.xml
index 8a9222d..d41dd09 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>http://api.tmdb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&amp;query=\1&amp;year=$$4&amp;language=$INFO[language]</url>" dest="3">
+		<RegExp input="$$1" output="<url>http://api.tmdb.org/3/search/movie?api_key=f7f51775877e0bb6703520952b3c7840&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,25 +9,25 @@
 		</RegExp>
 	</CreateSearchUrl>
 	<NfoUrl dest="3">
-		<RegExp input="$$1" output="<details><url>http://api.tmdb.org/3/movie/\2?api_key=57983e31fb435df4df77afb854740ea9&amp;language=$INFO[language]</url><id>\2</id></details>" dest="3">
+		<RegExp input="$$1" output="<details><url>http://api.tmdb.org/3/movie/\2?api_key=f7f51775877e0bb6703520952b3c7840&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">http://api.tmdb.org/3/movie/tt\1?api_key=57983e31fb435df4df77afb854740ea9&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">http://api.tmdb.org/3/movie/tt\1?api_key=f7f51775877e0bb6703520952b3c7840&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">http://api.tmdb.org/3/movie/tt\1?api_key=57983e31fb435df4df77afb854740ea9&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">http://api.tmdb.org/3/movie/tt\1?api_key=f7f51775877e0bb6703520952b3c7840&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">http://api.tmdb.org/3/movie/\2?api_key=57983e31fb435df4df77afb854740ea9&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">http://api.tmdb.org/3/movie/\2?api_key=f7f51775877e0bb6703520952b3c7840&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">http://api.tmdb.org/3/movie/\2?api_key=57983e31fb435df4df77afb854740ea9&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">http://api.tmdb.org/3/movie/\2?api_key=f7f51775877e0bb6703520952b3c7840&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">http://api.tmdb.org/3/movie/\1?api_key=57983e31fb435df4df77afb854740ea9&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">http://api.tmdb.org/3/movie/\1?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=$INFO[language]</url></entity>" dest="3+">
 				<expression repeat="yes">"release_date":null.*?"id":([0-9]*),"original_title":"([^"]*)","original_language":"[^"]*"</expression>
 			</RegExp>
 			<expression noclean="1" />
@@ -59,7 +59,7 @@
 			<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">http://api.tmdb.org/3/movie/$$2?api_key=57983e31fb435df4df77afb854740ea9&amp;language=en</url>" dest="5+">
+			<RegExp input="$$10" output="<url function="ParseFallbackTMDBRuntime" cache="tmdb-en-$$2.json">http://api.tmdb.org/3/movie/$$2?api_key=f7f51775877e0bb6703520952b3c7840&amp;language=en</url>" dest="5+">
 				<expression>^$</expression>
 			</RegExp>
 			<RegExp input="$$10" output="<runtime>\1</runtime>" dest="5+">
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index c688f8b..a697a61 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -7120,7 +7120,11 @@ msgctxt "#14081"
 msgid "File lists"
 msgstr ""
 
-#empty string with id 14082
+#. Label of button in Settings -> Audio output to clear the audio DSP database.
+#: system/settings/settings.xml
+msgctxt "#14082"
+msgid "Reset the Audio DSP database..."
+msgstr ""
 
 #: system/settings/settings.xml
 msgctxt "#14083"
@@ -9645,7 +9649,7 @@ msgstr ""
 #. DialogOK for no installed ADSP add-on available
 #: xbmc/cores/AudioEngine/DSPAddons/ActiveAEDSP.cpp
 msgctxt "#19274"
-msgid "You need a add-on installed for the process of audio DSP signal. System becomes disabled."
+msgid "You need an add-on installed to be able to use audio digital signal processing (DSP)."
 msgstr ""
 
 #: xbmc/pvr/timers/PVRTimerInfoTag.cpp
@@ -17391,10 +17395,10 @@ msgctxt "#36438"
 msgid "Enables digital signal processing (DSP) of audio channels specified by the speaker configuration."
 msgstr ""
 
-#. Description of setting "System -> Audio output -> Reset the Audio DSP database..." with label 311
+#. Description of setting "System -> Audio output -> Reset the Audio DSP database..." with label 14082
 #: system/settings/settings.xml
 msgctxt "#36439"
-msgid "All data (add-on settings and audio DSP manager settings) in the audio DSP database is being erased."
+msgid "All data (add-on settings and audio DSP manager settings) in the audio DSP database will be erased."
 msgstr ""
 
 #. Used in confirm on dialog to erase database
diff --git a/configure.ac b/configure.ac
index 95f285b..5800ab7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT([kodi], [15.9.903], [http://trac.kodi.tv])
+AC_INIT([kodi], [16.0.000], [http://trac.kodi.tv])
 AC_CONFIG_HEADERS([xbmc/config.h])
 AH_TOP([#pragma once])
 m4_include([m4/ax_prog_cc_for_build.m4])
diff --git a/lib/cximage-6.0/CxImage/ximamng.cpp b/lib/cximage-6.0/CxImage/ximamng.cpp
index 865c490..9a77abf 100644
--- a/lib/cximage-6.0/CxImage/ximamng.cpp
+++ b/lib/cximage-6.0/CxImage/ximamng.cpp
@@ -253,6 +253,8 @@ bool CxImageMNG::Decode(CxFile *hFile)
 		// read all
 		while(pData->bReading){
 			retval = mng_display_resume(hmng);
+			if (retval != MNG_NEEDTIMERWAIT)
+				break;
 			info.nNumFrames++;
 		}
 
diff --git a/lib/cximage-6.0/CxImage/ximapng.cpp b/lib/cximage-6.0/CxImage/ximapng.cpp
index adadeea..a58441c 100644
--- a/lib/cximage-6.0/CxImage/ximapng.cpp
+++ b/lib/cximage-6.0/CxImage/ximapng.cpp
@@ -73,6 +73,7 @@ bool CxImagePNG::Decode(CxFile *hFile)
 #endif
 		/* Free all of the memory associated with the png_ptr and info_ptr */
 		delete [] row_pointers;
+		row_pointers = nullptr;
 		png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
 		cx_throw("");
 	}
@@ -467,6 +468,7 @@ bool CxImagePNG::Decode(CxFile *hFile)
 	}
 
 	delete [] row_pointers;
+	row_pointers = nullptr;
 
 	/* read the rest of the file, getting any additional chunks in info_ptr */
 	png_read_end(png_ptr, info_ptr);
@@ -788,6 +790,7 @@ bool CxImagePNG::Encode(CxFile *hFile)
 	}
 
 	delete [] row_pointers;
+	row_pointers = nullptr;
 
 	//if necessary, restore the original palette
 	if (!bGrayScale && head.biClrUsed && info.nBkgndIndex>0)
diff --git a/media/Splash.png b/media/Splash.png
index 3f6b1d4..0c58250 100644
Binary files a/media/Splash.png and b/media/Splash.png differ
diff --git a/system/settings/settings.xml b/system/settings/settings.xml
index b9c0500..76c9a33 100644
--- a/system/settings/settings.xml
+++ b/system/settings/settings.xml
@@ -2598,7 +2598,7 @@
             </dependency>
           </dependencies>
         </setting>
-        <setting id="audiooutput.dspresetdb" type="action" label="334" help="36439">
+        <setting id="audiooutput.dspresetdb" type="action" label="14082" help="36439">
           <level>1</level>
           <control type="button" format="action" />
           <dependencies>
diff --git a/system/shaders/convolution-6x6_d3d.fx b/system/shaders/convolution-6x6_d3d.fx
index d2f583a..9ef8c08 100644
--- a/system/shaders/convolution-6x6_d3d.fx
+++ b/system/shaders/convolution-6x6_d3d.fx
@@ -38,6 +38,12 @@ SamplerState KernelSampler : IMMUTABLE
   Filter   = MIN_MAG_MIP_LINEAR;
 };
 
+struct VS_INPUT
+{
+  float4 Position   : POSITION;
+  float2 TextureUV  : TEXCOORD0;
+};
+
 struct VS_OUTPUT
 {
   float2 TextureUV  : TEXCOORD0;
@@ -47,7 +53,7 @@ struct VS_OUTPUT
 //
 // VS for rendering in screen space
 //
-VS_OUTPUT VS(VS_OUTPUT In)
+VS_OUTPUT VS(VS_INPUT In)
 {
   VS_OUTPUT output  = (VS_OUTPUT)0;
   output.Position.x =  (In.Position.x / (g_viewPort.x  / 2.0)) - 1;
diff --git a/tools/android/packaging/media/drawable-xhdpi/banner.png b/tools/android/packaging/media/drawable-xhdpi/banner.png
index e67c5cc..c5a0e9a 100644
Binary files a/tools/android/packaging/media/drawable-xhdpi/banner.png and b/tools/android/packaging/media/drawable-xhdpi/banner.png differ
diff --git a/userdata/RssFeeds.xml b/userdata/RssFeeds.xml
index 6169113..48b99e8 100644
--- a/userdata/RssFeeds.xml
+++ b/userdata/RssFeeds.xml
@@ -3,8 +3,8 @@
   <!-- RSS feeds. To have multiple feeds, just add a feed to the set. You can also have multiple sets. 	!-->
   <!-- To use different sets in your skin, each must be called from skin with a unique id.             	!-->
   <set id="1">
-    <feed updateinterval="30">http://feeds.xbmc.org/xbmc</feed>
-    <feed updateinterval="30">http://feeds.xbmc.org/latest_xbmc_addons</feed>
-    <feed updateinterval="30">http://feeds.xbmc.org/updated_xbmc_addons</feed>
+    <feed updateinterval="30">http://feeds.kodi.tv/xbmc</feed>
+    <feed updateinterval="30">http://feeds.kodi.tv/latest_xbmc_addons</feed>
+    <feed updateinterval="30">http://feeds.kodi.tv/updated_xbmc_addons</feed>
   </set>
 </rssfeeds>
diff --git a/version.txt b/version.txt
index afbab59..ec1f382 100644
--- a/version.txt
+++ b/version.txt
@@ -3,9 +3,9 @@ COMPANY_NAME XBMC-Foundation
 WEBSITE http://kodi.tv
 VERSION_MAJOR 16
 VERSION_MINOR 0
-VERSION_TAG RC3
-VERSION_CODE 159903
-ADDON_API 15.9.903
+VERSION_TAG
+VERSION_CODE 160000
+ADDON_API 16.0.000
 
 # Notes:
 # Change AC_INIT in configure.ac
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index 0a55813..0e3d6da 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -2358,6 +2358,8 @@ bool CApplication::OnAction(const CAction &action)
       {
         // calculate the speed based on the amount the button is held down
         int iPower = (int)(action.GetAmount() * MAX_FFWD_SPEED + 0.5f);
+        // amount can be negative, for example rewind and forward share the same axis
+        iPower = std::abs(iPower);
         // returns 0 -> MAX_FFWD_SPEED
         int iSpeed = 1 << iPower;
         if (iSpeed != 1 && action.GetID() == ACTION_ANALOG_REWIND)
diff --git a/xbmc/android/activity/AndroidFeatures.cpp b/xbmc/android/activity/AndroidFeatures.cpp
index 7526cd0..0c958b8 100644
--- a/xbmc/android/activity/AndroidFeatures.cpp
+++ b/xbmc/android/activity/AndroidFeatures.cpp
@@ -63,3 +63,14 @@ int CAndroidFeatures::GetVersion()
   return version;
 }
 
+int CAndroidFeatures::GetCPUCount()
+{
+  static int count = -1;
+
+  if (count == -1)
+  {
+    count = android_getCpuCount();
+  }
+  return count;
+}
+
diff --git a/xbmc/android/activity/AndroidFeatures.h b/xbmc/android/activity/AndroidFeatures.h
index 9d0c20b..98aee45 100644
--- a/xbmc/android/activity/AndroidFeatures.h
+++ b/xbmc/android/activity/AndroidFeatures.h
@@ -27,4 +27,5 @@ class CAndroidFeatures
 
   static bool         HasNeon();
   static int          GetVersion();
-};
\ No newline at end of file
+  static int          GetCPUCount();
+};
diff --git a/xbmc/cores/VideoRenderers/BaseRenderer.cpp b/xbmc/cores/VideoRenderers/BaseRenderer.cpp
index 987714f..7889cf8 100644
--- a/xbmc/cores/VideoRenderers/BaseRenderer.cpp
+++ b/xbmc/cores/VideoRenderers/BaseRenderer.cpp
@@ -394,7 +394,50 @@ inline void CBaseRenderer::ReorderDrawPoints()
   }
 
 
-  int diff = (int) ((m_destRect.Height() - m_destRect.Width()) / 2);
+  int diffX = 0;
+  int diffY = 0;
+  int centerX = 0;
+  int centerY = 0;
+  
+  if (changeAspect)// we are either rotating by 90 or 270 degrees which inverts aspect ratio
+  {
+    int newWidth = m_destRect.Height(); // new width is old height
+    int newHeight = m_destRect.Width(); // new height is old width
+    int diffWidth = newWidth - m_destRect.Width(); // difference between old and new width
+    int diffHeight = newHeight - m_destRect.Height(); // difference between old and new height
+
+    // if the new width is bigger then the old or
+    // the new height is bigger then the old - we need to scale down
+    if (diffWidth > 0 || diffHeight > 0 )
+    {
+      float aspectRatio = GetAspectRatio();
+      // scale to fit screen width because
+      // the difference in width is bigger then the
+      // difference in height
+      if (diffWidth > diffHeight)
+      {
+        newWidth = m_destRect.Width(); // clamp to the width of the old dest rect
+        newHeight *= aspectRatio;
+      }
+      else // scale to fit screen height
+      {
+        newHeight = m_destRect.Height(); // clamp to the height of the old dest rect
+        newWidth /= aspectRatio;
+      }
+    }
+    
+    // calculate the center point of the view
+    centerX = m_viewRect.x1 + m_viewRect.Width() / 2;
+    centerY = m_viewRect.y1 + m_viewRect.Height() / 2;
+
+    // calculate the number of pixels we need to go in each
+    // x direction from the center point
+    diffX = newWidth / 2;
+    // calculate the number of pixels we need to go in each
+    // y direction from the center point
+    diffY = newHeight / 2;
+    
+  }
 
   for (int destIdx=0, srcIdx=pointOffset; destIdx < 4; destIdx++)
   {
@@ -405,21 +448,21 @@ inline void CBaseRenderer::ReorderDrawPoints()
     {
       switch (srcIdx)
       {
-        case 0:
-          m_rotatedDestCoords[destIdx].x -= diff;
-          m_rotatedDestCoords[destIdx].y += diff;
+        case 0:// top left
+          m_rotatedDestCoords[destIdx].x = centerX - diffX;
+          m_rotatedDestCoords[destIdx].y = centerY - diffY;
           break;
-        case 1:
-          m_rotatedDestCoords[destIdx].x += diff;
-          m_rotatedDestCoords[destIdx].y += diff;
+        case 1:// top right
+          m_rotatedDestCoords[destIdx].x = centerX + diffX;
+          m_rotatedDestCoords[destIdx].y = centerY - diffY;
           break;
-        case 2:
-          m_rotatedDestCoords[destIdx].x += diff;
-          m_rotatedDestCoords[destIdx].y -= diff;
+        case 2:// bottom right
+          m_rotatedDestCoords[destIdx].x = centerX + diffX;
+          m_rotatedDestCoords[destIdx].y = centerY + diffY;
           break;
-        case 3:
-          m_rotatedDestCoords[destIdx].x -= diff;
-          m_rotatedDestCoords[destIdx].y -= diff;
+        case 3:// bottom left
+          m_rotatedDestCoords[destIdx].x = centerX - diffX;
+          m_rotatedDestCoords[destIdx].y = centerY + diffY;
           break;
       }
     }
diff --git a/xbmc/cores/VideoRenderers/DXVAHD.cpp b/xbmc/cores/VideoRenderers/DXVAHD.cpp
index 98850d8..247d1a6 100644
--- a/xbmc/cores/VideoRenderers/DXVAHD.cpp
+++ b/xbmc/cores/VideoRenderers/DXVAHD.cpp
@@ -588,20 +588,6 @@ bool CProcessorHD::Render(CRect src, CRect dst, ID3D11Resource* target, ID3D11Vi
 
   bool progressive = deinterlace_mode == VS_DEINTERLACEMODE_OFF;
 
-  ID3D11Texture2D* targetTex = nullptr;
-  hr = target->QueryInterface(__uuidof(ID3D11Texture2D), reinterpret_cast<void**>(&targetTex));
-  if (FAILED(hr))
-  {
-    CLog::Log(LOGERROR, __FUNCTION__" - failed getting target texture with error %x", hr);
-    return false;
-  }
-
-  D3D11_TEXTURE2D_DESC desc;
-  targetTex->GetDesc(&desc);
-  targetTex->Release();
-
-  CRect rectTarget(0, 0, float(desc.Width), float(desc.Height));
-  CWIN32Util::CropSource(src, dst, rectTarget);
   RECT sourceRECT = { src.x1, src.y1, src.x2, src.y2 };
   RECT dstRECT    = { dst.x1, dst.y1, dst.x2, dst.y2 };
 
diff --git a/xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.cpp b/xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.cpp
index d40b617..55ac586 100644
--- a/xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.cpp
+++ b/xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.cpp
@@ -311,13 +311,13 @@ bool CYUV2RGBShader::Create(unsigned int sourceWidth, unsigned int sourceHeight,
   return true;
 }
 
-void CYUV2RGBShader::Render(CRect sourceRect, CRect destRect,
+void CYUV2RGBShader::Render(CRect sourceRect, CPoint dest[],
                             float contrast,
                             float brightness,
                             unsigned int flags,
                             YUVBuffer* YUVbuf)
 {
-  PrepareParameters(sourceRect, destRect,
+  PrepareParameters(sourceRect, dest,
                     contrast, brightness, flags);
   SetShaderParameters(YUVbuf);
   Execute(nullptr, 4);
@@ -328,45 +328,48 @@ CYUV2RGBShader::~CYUV2RGBShader()
 }
 
 void CYUV2RGBShader::PrepareParameters(CRect sourceRect,
-                                       CRect destRect,
+                                       CPoint dest[],
                                        float contrast,
                                        float brightness,
                                        unsigned int flags)
 {
-  if (m_sourceRect != sourceRect || m_destRect != destRect)
+  if (m_sourceRect != sourceRect
+    || m_dest[0] != dest[0] || m_dest[1] != dest[1]
+    || m_dest[2] != dest[2] || m_dest[3] != dest[3])
   {
     m_sourceRect = sourceRect;
-    m_destRect = destRect;
+    for (size_t i = 0; i < 4; ++i)
+      m_dest[i] = dest[i];
 
     CUSTOMVERTEX* v;
     CWinShader::LockVertexBuffer((void**)&v);
 
-    v[0].x = destRect.x1;
-    v[0].y = destRect.y1;
+    v[0].x = m_dest[0].x;
+    v[0].y = m_dest[0].y;
     v[0].z = 0.0f;
     v[0].tu = sourceRect.x1 / m_sourceWidth;
     v[0].tv = sourceRect.y1 / m_sourceHeight;
     v[0].tu2 = v[0].tu3 = (sourceRect.x1 / 2.0f) / (m_sourceWidth>>1);
     v[0].tv2 = v[0].tv3 = (sourceRect.y1 / 2.0f) / (m_sourceHeight>>1);
 
-    v[1].x = destRect.x2;
-    v[1].y = destRect.y1;
+    v[1].x = m_dest[1].x;
+    v[1].y = m_dest[1].y;
     v[1].z = 0.0f;
     v[1].tu = sourceRect.x2 / m_sourceWidth;
     v[1].tv = sourceRect.y1 / m_sourceHeight;
     v[1].tu2 = v[1].tu3 = (sourceRect.x2 / 2.0f) / (m_sourceWidth>>1);
     v[1].tv2 = v[1].tv3 = (sourceRect.y1 / 2.0f) / (m_sourceHeight>>1);
 
-    v[2].x = destRect.x2;
-    v[2].y = destRect.y2;
+    v[2].x = m_dest[2].x;
+    v[2].y = m_dest[2].y;
     v[2].z = 0.0f;
     v[2].tu = sourceRect.x2 / m_sourceWidth;
     v[2].tv = sourceRect.y2 / m_sourceHeight;
     v[2].tu2 = v[2].tu3 = (sourceRect.x2 / 2.0f) / (m_sourceWidth>>1);
     v[2].tv2 = v[2].tv3 = (sourceRect.y2 / 2.0f) / (m_sourceHeight>>1);
 
-    v[3].x = destRect.x1;
-    v[3].y = destRect.y2;
+    v[3].x = m_dest[3].x;
+    v[3].y = m_dest[3].y;
     v[3].z = 0.0f;
     v[3].tu = sourceRect.x1 / m_sourceWidth;
     v[3].tv = sourceRect.y2 / m_sourceHeight;
diff --git a/xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.h b/xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.h
index 294018b..41aed5f 100644
--- a/xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.h
+++ b/xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.h
@@ -78,7 +78,7 @@ class CYUV2RGBShader : public CWinShader
 public:
   virtual bool Create(unsigned int sourceWidth, unsigned int sourceHeight, ERenderFormat fmt);
   virtual void Render(CRect sourceRect,
-                      CRect destRect,
+                      CPoint dest[],
                       float contrast,
                       float brightness,
                       unsigned int flags,
@@ -94,7 +94,7 @@ public:
 
 protected:
   virtual void PrepareParameters(CRect sourceRect,
-                                 CRect destRect,
+                                 CPoint dest[],
                                  float contrast,
                                  float brightness,
                                  unsigned int flags);
@@ -103,7 +103,8 @@ protected:
 private:
   CYUV2RGBMatrix      m_matrix;
   unsigned int        m_sourceWidth, m_sourceHeight;
-  CRect               m_sourceRect , m_destRect;
+  CRect               m_sourceRect;
+  CPoint              m_dest[4];
   ERenderFormat       m_format;
   float               m_texSteps[2];
 
diff --git a/xbmc/cores/VideoRenderers/WinRenderer.cpp b/xbmc/cores/VideoRenderers/WinRenderer.cpp
index 4821b9b..ff85274 100644
--- a/xbmc/cores/VideoRenderers/WinRenderer.cpp
+++ b/xbmc/cores/VideoRenderers/WinRenderer.cpp
@@ -34,6 +34,7 @@
 #include "utils/log.h"
 #include "utils/win32/gpu_memcpy_sse4.h"
 #include "VideoShaders/WinVideoFilter.h"
+#include "win32/WIN32Util.h"
 #include "windowing/WindowingFactory.h"
 
 typedef struct {
@@ -580,6 +581,8 @@ void CWinRenderer::SelectPSVideoFilter()
       m_bUseHQScaler = true;
     }
   }
+  if (m_renderOrientation)
+    m_bUseHQScaler = false;
 }
 
 void CWinRenderer::UpdatePSVideoFilter()
@@ -783,7 +786,7 @@ void CWinRenderer::ScaleGUIShader()
   CRect destRect = CRect(m_rotatedDestCoords[0], m_rotatedDestCoords[2]);
 
   // pass contrast and brightness as diffuse color elements (see shader code)
-  CD3DTexture::DrawQuad(destRect, D3DCOLOR_ARGB(255, contrast, brightness, 255), &m_SWTarget, &tu,
+  CD3DTexture::DrawQuad(m_rotatedDestCoords, D3DCOLOR_ARGB(255, contrast, brightness, 255), &m_SWTarget, &tu,
                        !cbcontrol ? SHADER_METHOD_RENDER_VIDEO : SHADER_METHOD_RENDER_VIDEO_CONTROL);
 }
 
@@ -808,64 +811,46 @@ void CWinRenderer::Stage1()
   CD3D11_VIEWPORT viewPort(0.0f, 0.0f, 0.0f, 0.0f);
   ID3D11DeviceContext* pContext = g_Windowing.Get3D11Context();
 
-  // store current render target and depth view.
   ID3D11RenderTargetView *oldRTView = nullptr; ID3D11DepthStencilView* oldDSView = nullptr;
-  pContext->OMGetRenderTargets(1, &oldRTView, &oldDSView);
-  // select destination rectangle 
-  CRect destRect;
   if (m_bUseHQScaler)
   {
-    if (m_renderOrientation > 0)
-    {
-      // we need to rotate source coordinates for HQ scaller 
-      // so we using ReorderDrawPoints with source coords.
-
-      // save coords
-      CRect oldDest = m_destRect;
-      saveRotatedCoords();
-
-      m_destRect = m_sourceRect;
-      ReorderDrawPoints();
-      // get rotated coords
-      destRect = CRect(m_rotatedDestCoords[0], m_rotatedDestCoords[2]);
-
-      // restore coords
-      restoreRotatedCoords();
-      m_destRect = oldDest;
-    }
-    else
-      destRect = m_sourceRect;
+    // store current render target and depth view.
+    pContext->OMGetRenderTargets(1, &oldRTView, &oldDSView);
+    // change destination for HQ scallers
+    ID3D11RenderTargetView* pRTView = m_IntermediateTarget.GetRenderTarget();
+    pContext->OMSetRenderTargets(1, &pRTView, nullptr);
+    // viewport equals intermediate target size
+    viewPort = CD3D11_VIEWPORT(0.0f, 0.0f, 
+                               static_cast<float>(m_IntermediateTarget.GetWidth()), 
+                               static_cast<float>(m_IntermediateTarget.GetHeight()));
+    g_Windowing.ResetScissors();
   }
   else
-    destRect = g_graphicsContext.StereoCorrection(CRect(m_rotatedDestCoords[0], m_rotatedDestCoords[2]));
-  // select target view 
-  ID3D11RenderTargetView* pRTView = m_bUseHQScaler ? m_IntermediateTarget.GetRenderTarget() : oldRTView;
-  // change destination for HQ scallers
-  if (m_bUseHQScaler)
-    pContext->OMSetRenderTargets(1, &pRTView, nullptr);
-  // get rendertarget's dimension
-  if (pRTView)
   {
-    ID3D11Resource* pResource = nullptr;
-    ID3D11Texture2D* pTexture = nullptr;
-
-    pRTView->GetResource(&pResource);
-    if (SUCCEEDED(pResource->QueryInterface(__uuidof(ID3D11Texture2D), reinterpret_cast<void**>(&pTexture))))
-    {
-      D3D11_TEXTURE2D_DESC desc;
-      pTexture->GetDesc(&desc);
-      viewPort = CD3D11_VIEWPORT(0.0f, 0.0f, static_cast<float>(desc.Width), static_cast<float>(desc.Height));
-    }
-    SAFE_RELEASE(pResource);
-    SAFE_RELEASE(pTexture);
+    // viewport equals full backbuffer size
+    CRect bbSize = g_Windowing.GetBackBufferRect();
+    viewPort = CD3D11_VIEWPORT(0.f, 0.f, bbSize.Width(), bbSize.Height());
   }
-  // reset scissors for HQ scaler
-  if (m_bUseHQScaler)
-    g_Windowing.ResetScissors();
   // reset view port
   pContext->RSSetViewports(1, &viewPort);
+  // select destination rectangle 
+  CPoint destPoints[4];
+  if (m_renderOrientation)
+  {
+    for (size_t i = 0; i < 4; i++)
+      destPoints[i] = m_rotatedDestCoords[i];
+  }
+  else
+  {
+    CRect destRect = m_bUseHQScaler ? m_sourceRect : g_graphicsContext.StereoCorrection(m_destRect);
+    destPoints[0] = { destRect.x1, destRect.y1 };
+    destPoints[1] = { destRect.x2, destRect.y1 };
+    destPoints[2] = { destRect.x2, destRect.y2 };
+    destPoints[3] = { destRect.x1, destRect.y2 };
+  }
+
   // render video frame
-  m_colorShader->Render(m_sourceRect, destRect,
+  m_colorShader->Render(m_sourceRect, destPoints,
                         CMediaSettings::GetInstance().GetCurrentVideoSettings().m_Contrast,
                         CMediaSettings::GetInstance().GetCurrentVideoSettings().m_Brightness,
                         m_iFlags, (YUVBuffer*)m_VideoBuffers[m_iYV12RenderBuffer]);
@@ -873,9 +858,11 @@ void CWinRenderer::Stage1()
   g_Windowing.RestoreViewPort();
   // Restore the render target and depth view.
   if (m_bUseHQScaler)
+  {
     pContext->OMSetRenderTargets(1, &oldRTView, oldDSView);
-  SAFE_RELEASE(oldRTView);
-  SAFE_RELEASE(oldDSView);
+    SAFE_RELEASE(oldRTView);
+    SAFE_RELEASE(oldDSView);
+  }
 }
 
 void CWinRenderer::Stage2()
@@ -888,7 +875,6 @@ void CWinRenderer::Stage2()
 void CWinRenderer::RenderProcessor(DWORD flags)
 {
   CSingleLock lock(g_graphicsContext);
-  CRect destRect = m_bUseHQScaler ? m_sourceRect : g_graphicsContext.StereoCorrection(m_destRect);
   DXVABuffer *image = (DXVABuffer*)m_VideoBuffers[m_iYV12RenderBuffer];
   if (!image->pic)
     return;
@@ -935,7 +921,30 @@ void CWinRenderer::RenderProcessor(DWORD flags)
       break;
   }
 
-  m_processor->Render(m_sourceRect, destRect, m_IntermediateTarget.Get(), views, flags, image->frameIdx, m_renderOrientation);
+  CRect destRect;
+  switch (m_renderOrientation)
+  {
+  case 90:
+    destRect = CRect(m_rotatedDestCoords[3], m_rotatedDestCoords[1]);
+    break;
+  case 180:
+    destRect = m_destRect;
+    break;
+  case 270:
+    destRect = CRect(m_rotatedDestCoords[1], m_rotatedDestCoords[3]);
+    break;
+  default:
+    destRect = m_bUseHQScaler ? m_sourceRect : g_graphicsContext.StereoCorrection(m_destRect);
+    break;
+  }
+
+  CRect src = m_sourceRect, dst = destRect;
+  CRect target = CRect(0.0f, 0.0f,
+                       static_cast<float>(m_IntermediateTarget.GetWidth()), 
+                       static_cast<float>(m_IntermediateTarget.GetHeight()));
+  CWIN32Util::CropSource(src, dst, target, m_renderOrientation);
+
+  m_processor->Render(src, dst, m_IntermediateTarget.Get(), views, flags, image->frameIdx, m_renderOrientation);
   
   if (m_bUseHQScaler)
   {
@@ -943,9 +952,25 @@ void CWinRenderer::RenderProcessor(DWORD flags)
   }
   else
   {
-    // texels
-    CRect tu = { destRect.x1 / m_destWidth, destRect.y1 / m_destHeight, destRect.x2 / m_destWidth, destRect.y2 / m_destHeight };
-    CD3DTexture::DrawQuad(m_destRect, 0xFFFFFFFF, &m_IntermediateTarget, &tu, SHADER_METHOD_RENDER_TEXTURE_BLEND);
+    CRect oldViewPort;
+    bool stereoHack = g_graphicsContext.GetStereoMode() == RENDER_STEREO_MODE_SPLIT_HORIZONTAL
+                   || g_graphicsContext.GetStereoMode() == RENDER_STEREO_MODE_SPLIT_VERTICAL;
+
+    if (stereoHack)
+    {
+      CRect bbSize = g_Windowing.GetBackBufferRect();
+
+      g_Windowing.GetViewPort(oldViewPort);
+      g_Windowing.SetViewPort(bbSize);
+      g_Windowing.SetCameraPosition(CPoint(bbSize.Width() / 2.f, bbSize.Height() / 2.f), bbSize.Width(), bbSize.Height(), 0.f);
+    }
+
+    // render frame
+    CRect tu = { dst.x1 / m_destWidth, dst.y1 / m_destHeight, dst.x2 / m_destWidth, dst.y2 / m_destHeight };
+    CD3DTexture::DrawQuad(dst, 0xFFFFFF, &m_IntermediateTarget, &tu, SHADER_METHOD_RENDER_TEXTURE_BLEND);
+
+    if (stereoHack)
+      g_Windowing.SetViewPort(oldViewPort);
   }
 }
 
@@ -1089,7 +1114,7 @@ bool CWinRenderer::Supports(ESCALINGMETHOD method)
       if (method == VS_SCALINGMETHOD_DXVA_HARDWARE ||
           method == VS_SCALINGMETHOD_AUTO)
         return true;
-      else if (!g_advancedSettings.m_DXVAAllowHqScaling)
+      else if (!g_advancedSettings.m_DXVAAllowHqScaling || m_renderOrientation)
         return false;
     }
 
@@ -1097,7 +1122,7 @@ bool CWinRenderer::Supports(ESCALINGMETHOD method)
       || (method == VS_SCALINGMETHOD_LINEAR && m_renderMethod == RENDER_PS)) 
         return true;
 
-    if (g_Windowing.GetFeatureLevel() >= D3D_FEATURE_LEVEL_9_3)
+    if (g_Windowing.GetFeatureLevel() >= D3D_FEATURE_LEVEL_9_3 && !m_renderOrientation)
     {
       if(method == VS_SCALINGMETHOD_CUBIC
       || method == VS_SCALINGMETHOD_LANCZOS2
diff --git a/xbmc/guilib/D3DResource.cpp b/xbmc/guilib/D3DResource.cpp
index e1abe1c..8aa8125 100644
--- a/xbmc/guilib/D3DResource.cpp
+++ b/xbmc/guilib/D3DResource.cpp
@@ -415,7 +415,7 @@ unsigned int CD3DTexture::GetMemoryUsage(unsigned int pitch) const
 }
 
 // static methods
-void CD3DTexture::DrawQuad(const CRect &rect, color_t color, CD3DTexture *texture, const CRect *texCoords, SHADER_METHOD options)
+void CD3DTexture::DrawQuad(const CPoint points[4], color_t color, CD3DTexture *texture, const CRect *texCoords, SHADER_METHOD options)
 {
   unsigned numViews = 0;
   ID3D11ShaderResourceView* views = nullptr;
@@ -426,20 +426,32 @@ void CD3DTexture::DrawQuad(const CRect &rect, color_t color, CD3DTexture *textur
     views = texture->GetShaderResource();
   }
 
-  DrawQuad(rect, color, numViews, &views, texCoords, options);
+  DrawQuad(points, color, numViews, &views, texCoords, options);
 }
 
-void CD3DTexture::DrawQuad(const CRect &rect, color_t color, unsigned numViews, ID3D11ShaderResourceView **view, const CRect *texCoords, SHADER_METHOD options)
+void CD3DTexture::DrawQuad(const CRect &rect, color_t color, CD3DTexture *texture, const CRect *texCoords, SHADER_METHOD options)
+{
+  CPoint points[] =
+  {
+    { rect.x1, rect.y1 },
+    { rect.x2, rect.y1 },
+    { rect.x2, rect.y2 },
+    { rect.x1, rect.y2 },
+  };
+  DrawQuad(points, color, texture, texCoords, options);
+}
+
+void CD3DTexture::DrawQuad(const CPoint points[4], color_t color, unsigned numViews, ID3D11ShaderResourceView **view, const CRect *texCoords, SHADER_METHOD options)
 {
   XMFLOAT4 xcolor;
   CD3DHelper::XMStoreColor(&xcolor, color);
   CRect coords = texCoords ? *texCoords : CRect(0.0f, 0.0f, 1.0f, 1.0f);
 
   Vertex verts[4] = {
-    { XMFLOAT3(rect.x1, rect.y1, 0), xcolor, XMFLOAT2(coords.x1, coords.y1), XMFLOAT2(0.0f, 0.0f) },
-    { XMFLOAT3(rect.x2, rect.y1, 0), xcolor, XMFLOAT2(coords.x2, coords.y1), XMFLOAT2(0.0f, 0.0f) },
-    { XMFLOAT3(rect.x2, rect.y2, 0), xcolor, XMFLOAT2(coords.x2, coords.y2), XMFLOAT2(0.0f, 0.0f) },
-    { XMFLOAT3(rect.x1, rect.y2, 0), xcolor, XMFLOAT2(coords.x1, coords.y2), XMFLOAT2(0.0f, 0.0f) },
+    { XMFLOAT3(points[0].x, points[0].y, 0), xcolor, XMFLOAT2(coords.x1, coords.y1), XMFLOAT2(0.0f, 0.0f) },
+    { XMFLOAT3(points[1].x, points[1].y, 0), xcolor, XMFLOAT2(coords.x2, coords.y1), XMFLOAT2(0.0f, 0.0f) },
+    { XMFLOAT3(points[2].x, points[2].y, 0), xcolor, XMFLOAT2(coords.x2, coords.y2), XMFLOAT2(0.0f, 0.0f) },
+    { XMFLOAT3(points[3].x, points[3].y, 0), xcolor, XMFLOAT2(coords.x1, coords.y2), XMFLOAT2(0.0f, 0.0f) },
   };
 
   CGUIShaderDX* pGUIShader = g_Windowing.GetGUIShader();
@@ -450,6 +462,17 @@ void CD3DTexture::DrawQuad(const CRect &rect, color_t color, unsigned numViews,
   pGUIShader->DrawQuad(verts[0], verts[1], verts[2], verts[3]);
 }
 
+void CD3DTexture::DrawQuad(const CRect &rect, color_t color, unsigned numViews, ID3D11ShaderResourceView **view, const CRect *texCoords, SHADER_METHOD options)
+{
+  CPoint points[] =
+  {
+    { rect.x1, rect.y1 },
+    { rect.x2, rect.y1 },
+    { rect.x2, rect.y2 },
+    { rect.x1, rect.y2 },
+  };
+  DrawQuad(points, color, numViews, view, texCoords, options);
+}
 
 CD3DEffect::CD3DEffect()
 {
diff --git a/xbmc/guilib/D3DResource.h b/xbmc/guilib/D3DResource.h
index de6ee57..ed6cf96 100644
--- a/xbmc/guilib/D3DResource.h
+++ b/xbmc/guilib/D3DResource.h
@@ -124,6 +124,12 @@ public:
   DXGI_FORMAT GetFormat() const { return m_format; }
 
   // static methods
+  static void DrawQuad(const CPoint points[4], color_t color, CD3DTexture *texture, const CRect *texCoords,
+    SHADER_METHOD options = SHADER_METHOD_RENDER_TEXTURE_BLEND);
+
+  static void DrawQuad(const CPoint points[4], color_t color, unsigned numViews, ID3D11ShaderResourceView **view, const CRect *texCoords,
+    SHADER_METHOD options = SHADER_METHOD_RENDER_TEXTURE_BLEND);
+
   static void DrawQuad(const CRect &coords, color_t color, CD3DTexture *texture, const CRect *texCoords,
     SHADER_METHOD options = SHADER_METHOD_RENDER_TEXTURE_BLEND);
 
diff --git a/xbmc/guilib/Geometry.h b/xbmc/guilib/Geometry.h
index 0b92ffd..6dc06f4 100644
--- a/xbmc/guilib/Geometry.h
+++ b/xbmc/guilib/Geometry.h
@@ -82,6 +82,13 @@ public:
     return *this;
   };
 
+  bool operator !=(const this_type &point) const
+  {
+    if (x != point.x) return true;
+    if (y != point.y) return true;
+    return false;
+  };
+
   T x, y;
 };
 
diff --git a/xbmc/music/MusicDatabase.cpp b/xbmc/music/MusicDatabase.cpp
index fe9e3d3..0fea149 100644
--- a/xbmc/music/MusicDatabase.cpp
+++ b/xbmc/music/MusicDatabase.cpp
@@ -3794,12 +3794,6 @@ bool CMusicDatabase::GetSongsFullByWhere(const std::string &baseDir, const Filte
     unsigned int time = XbmcThreads::SystemClockMillis();
     int total = -1;
 
-    std::string strSQL = "SELECT %s FROM songview ";
-    if (artistData) 
-      // Get data from song and song_artist tables to fully populate songs with artists
-      // Some songs may not have artists so Left join.
-      strSQL = "SELECT %s FROM songview LEFT JOIN songartistview on songartistview.idsong = songview.idsong ";
-
     Filter extFilter = filter;
     CMusicDbUrl musicUrl;
     SortDescription sorting = sortDescription;
@@ -3823,22 +3817,35 @@ bool CMusicDatabase::GetSongsFullByWhere(const std::string &baseDir, const Filte
 
     // Apply the limiting directly here if there's no special sorting but limiting
     bool limited = extFilter.limit.empty() && sortDescription.sortBy == SortByNone &&
-                   (sortDescription.limitStart > 0 || sortDescription.limitEnd > 0);
+      (sortDescription.limitStart > 0 || sortDescription.limitEnd > 0);
     if (limited)
       strSQLExtra += DatabaseUtils::BuildLimitClause(sortDescription.limitEnd, sortDescription.limitStart);
 
-    if (!artistData)
-      strSQL = PrepareSQL(strSQL, !filter.fields.empty() && filter.fields.compare("*") != 0 ? filter.fields.c_str() : "songview.* ") + strSQLExtra;
-    else
-    {
-      strSQL = PrepareSQL(strSQL, !filter.fields.empty() && filter.fields.compare("*") != 0 ? filter.fields.c_str() : "songview.*, songartistview.* ");
-      if (!limited)
-        strSQL += strSQLExtra;
-      else
+    std::string strSQL;
+    if (artistData)
+    { // Get data from song and song_artist tables to fully populate songs with artists
+      // Some songs may not have artists so Left join.
+      // Bug in SQLite optimiser for left join on views means have to use tables not songartistview
+      if (limited)
         //Apply where clause and limits to songview, then join as mutiple records in result set per song
-        strSQL += " WHERE songview.idsong IN (SELECT idsong FROM (SELECT idsong FROM songview " + strSQLExtra + ") as temp)";
+        strSQL = "SELECT sv.*, "
+        "song_artist.idArtist AS idArtist, "
+        "artist.strArtist AS strArtist, "
+        "artist.strMusicBrainzArtistID AS strMusicBrainzArtistID "
+        "FROM (SELECT songview.* FROM songview " + strSQLExtra + ") AS sv "
+        "LEFT JOIN song_artist on song_artist.idsong = sv.idsong "
+        "LEFT JOIN artist ON song_artist.idArtist = artist.idArtist ";
+      else
+        strSQL = "SELECT songview.*, "
+        "song_artist.idArtist AS idArtist, "
+        "artist.strArtist AS strArtist, "
+        "artist.strMusicBrainzArtistID AS strMusicBrainzArtistID "
+        "FROM songview LEFT JOIN song_artist on song_artist.idsong = songview.idsong "
+        "LEFT JOIN artist ON song_artist.idArtist = artist.idArtist " + strSQLExtra;
     }
-
+    else
+      strSQL = "SELECT songview.* FROM songview " + strSQLExtra;
+    
     CLog::Log(LOGDEBUG, "%s query = %s", __FUNCTION__, strSQL.c_str());
     // run query
     if (!m_pDS->query(strSQL))
@@ -3888,9 +3895,15 @@ bool CMusicDatabase::GetSongsFullByWhere(const std::string &baseDir, const Filte
           item->m_iprogramCount = ++count;
           items.Add(item);
         }
-        // Get song artist credits
+        // Get song artist credits, API only exposes id, name and mbid fields
         if (artistData)
-          artistCredits.push_back(GetArtistCreditFromDataset(record, songArtistOffset));
+        {
+          CArtistCredit artistCredit;
+          artistCredit.idArtist = record->at(songArtistOffset).get_asInt();
+          artistCredit.m_strArtist = record->at(songArtistOffset + 1).get_asString();
+          artistCredit.m_strMusicBrainzArtistID = record->at(songArtistOffset + 2).get_asString();
+          artistCredits.push_back(artistCredit);
+        }
       }
       catch (...)
       {
@@ -3909,11 +3922,6 @@ bool CMusicDatabase::GetSongsFullByWhere(const std::string &baseDir, const Filte
     // cleanup
     m_pDS->close();
 
-    // Load some info from embedded cuesheet if present (now only ReplayGain)
-    CueInfoLoader cueLoader;
-    for (int i = 0; i < items.Size(); ++i)
-      cueLoader.Load(LoadCuesheet(items[i]->GetMusicInfoTag()->GetURL()), items[i]);
-
     CLog::Log(LOGDEBUG, "%s(%s) - took %d ms", __FUNCTION__, filter.where.c_str(), XbmcThreads::SystemClockMillis() - time);
     return true;
   }
diff --git a/xbmc/pvr/windows/GUIWindowPVRBase.cpp b/xbmc/pvr/windows/GUIWindowPVRBase.cpp
index bdc0e62..6b7937c 100644
--- a/xbmc/pvr/windows/GUIWindowPVRBase.cpp
+++ b/xbmc/pvr/windows/GUIWindowPVRBase.cpp
@@ -87,7 +87,13 @@ std::string CGUIWindowPVRBase::GetSelectedItemPath(bool bRadio)
 
 void CGUIWindowPVRBase::Notify(const Observable &obs, const ObservableMessage msg)
 {
-  UpdateSelectedItemPath();
+  if (IsActive())
+  {
+    // Only the active window must set the selected item path which is shared
+    // between all PVR windows, not the last notified window (observer).
+    UpdateSelectedItemPath();
+  }
+
   CGUIMessage m(GUI_MSG_REFRESH_LIST, GetID(), 0, msg);
   CApplicationMessenger::GetInstance().SendGUIMessage(m);
 }
diff --git a/xbmc/rendering/dx/RenderSystemDX.h b/xbmc/rendering/dx/RenderSystemDX.h
index 44f4ddd..cf58be2 100644
--- a/xbmc/rendering/dx/RenderSystemDX.h
+++ b/xbmc/rendering/dx/RenderSystemDX.h
@@ -83,6 +83,7 @@ public:
   IDXGIOutput* GetCurrentOutput(void) { return m_pOutput; }
 
   virtual void Project(float &x, float &y, float &z);
+  virtual CRect GetBackBufferRect() { return CRect(0.f, 0.f, static_cast<float>(m_nBackBufferWidth), static_cast<float>(m_nBackBufferHeight)); }
 
   void FinishCommandList(bool bExecute = true);
   void FlushGPU();
diff --git a/xbmc/utils/CPUInfo.cpp b/xbmc/utils/CPUInfo.cpp
index 660d355..f1d07dd 100644
--- a/xbmc/utils/CPUInfo.cpp
+++ b/xbmc/utils/CPUInfo.cpp
@@ -412,6 +412,14 @@ CCPUInfo::CCPUInfo(void)
       }
     }
     fclose(fCPUInfo);
+    //  /proc/cpuinfo is not reliable on some Android platforms
+    //  At least we should get the correct cpu count for multithreaded decoding
+#if defined(TARGET_ANDROID)
+    if (CAndroidFeatures::GetCPUCount() > m_cpuCount)
+    {
+      m_cpuCount = CAndroidFeatures::GetCPUCount();
+    }
+#endif
   }
   else
   {
diff --git a/xbmc/video/VideoInfoScanner.cpp b/xbmc/video/VideoInfoScanner.cpp
index ffc5dfd..5f8d3f8 100644
--- a/xbmc/video/VideoInfoScanner.cpp
+++ b/xbmc/video/VideoInfoScanner.cpp
@@ -511,6 +511,11 @@ namespace VIDEO
 
   INFO_RET CVideoInfoScanner::RetrieveInfoForTvShow(CFileItem *pItem, bool bDirNames, ScraperPtr &info2, bool useLocal, CScraperUrl* pURL, bool fetchEpisodes, CGUIDialogProgress* pDlgProgress)
   {
+    if (pItem->m_bIsFolder && IsExcluded(pItem->GetPath()))
+    {
+      CLog::Log(LOGWARNING, "Skipping show '%s' with '.nomedia' file in its directory, it won't be added to the library.", CURL::GetRedacted(pItem->GetPath()).c_str());
+      return INFO_NOT_NEEDED;
+    }
     long idTvShow = -1;
     if (pItem->m_bIsFolder)
       idTvShow = m_database.GetTvShowId(pItem->GetPath());

-- 
kodi packaging



More information about the pkg-multimedia-commits mailing list