aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/resource.language.en_gb/resources/strings.po18
-rw-r--r--cmake/installdata/windows/dlls.txt1
-rw-r--r--cmake/installdata/windowsstore/dlls.txt1
-rw-r--r--cmake/scripts/windows/ArchSetup.cmake13
-rw-r--r--cmake/scripts/windowsstore/ArchSetup.cmake8
-rw-r--r--lib/cpluff/CMakeLists.txt2
-rw-r--r--project/BuildDependencies/scripts/0_package.target-x64.list6
-rwxr-xr-xsystem/settings/settings.xml10
-rw-r--r--tools/buildsteps/windows/buildffmpeg.sh2
-rw-r--r--tools/buildsteps/windows/ffmpeg_options.txt4
-rw-r--r--tools/buildsteps/windows/make-mingwlibs.sh6
-rw-r--r--tools/buildsteps/windows/patches/0001-ffmpeg-detect-openssl.patch3
-rw-r--r--tools/buildsteps/windows/patches/0002-ffmpeg-zlib-config-conflict.patch2
-rw-r--r--tools/buildsteps/windows/patches/0003-ffmpeg-static.patch20
-rw-r--r--tools/depends/target/ffmpeg/FFMPEG-VERSION2
-rw-r--r--version.txt2
-rw-r--r--xbmc/Application.cpp2
-rw-r--r--xbmc/addons/Scraper.cpp2
-rw-r--r--xbmc/filesystem/SpecialProtocol.cpp2
-rw-r--r--xbmc/guilib/GUIWindowManager.cpp13
-rw-r--r--xbmc/guilib/WindowIDs.dox1
-rw-r--r--xbmc/guilib/WindowIDs.h1
-rw-r--r--xbmc/input/WindowTranslator.cpp1
-rw-r--r--xbmc/rendering/dx/CMakeLists.txt2
-rw-r--r--xbmc/rendering/dx/GUIWindowTestPatternDX.cpp376
-rw-r--r--xbmc/rendering/dx/GUIWindowTestPatternDX.h42
-rw-r--r--xbmc/rendering/gl/CMakeLists.txt6
-rw-r--r--xbmc/rendering/gl/GUIWindowTestPatternGL.cpp185
-rw-r--r--xbmc/rendering/gl/GUIWindowTestPatternGL.h31
-rw-r--r--xbmc/settings/AdvancedSettings.cpp2
-rw-r--r--xbmc/settings/AdvancedSettings.h1
-rw-r--r--xbmc/settings/windows/CMakeLists.txt6
-rw-r--r--xbmc/settings/windows/GUIWindowTestPattern.cpp126
-rw-r--r--xbmc/settings/windows/GUIWindowTestPattern.h48
-rw-r--r--xbmc/utils/FileUtils.cpp19
-rw-r--r--xbmc/video/VideoDatabase.cpp2
-rw-r--r--xbmc/video/VideoInfoScanner.cpp5
-rw-r--r--xbmc/video/VideoThumbLoader.cpp54
38 files changed, 124 insertions, 903 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index 97211d3b71..16a262d4b0 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -1046,10 +1046,7 @@ msgctxt "#225"
msgid "Vertical shift"
msgstr ""
-#: system/settings/settings.xml
-msgctxt "#226"
-msgid "Test patterns..."
-msgstr ""
+#empty string with id 226
#: system/settings/settings.xml
msgctxt "#227"
@@ -4816,12 +4813,7 @@ msgctxt "#10007"
msgid "System information"
msgstr ""
-#: xbmc/guilib/WindowIDs.h
-msgctxt "#10008"
-msgid "Settings - Test patterns"
-msgstr ""
-
-#empty strings from id 10009 to 10010
+#empty strings from id 10008 to 10010
#: xbmc/guilib/WindowIDs.h
msgctxt "#10011"
@@ -19295,11 +19287,7 @@ msgctxt "#36357"
msgid "Calibrate the user interface by adjusting the overscan. Use this tool if the image being displayed is too large or small for your display."
msgstr ""
-#. Description of setting with label #226 "Test patterns..."
-#: system/settings/settings.xml
-msgctxt "#36358"
-msgid "Test patterns for display hardware calibration."
-msgstr ""
+#empty string with id 36358
#. Description of setting with label #36042 "Use limited colour range (16-235)"
#: system/settings/settings.xml
diff --git a/cmake/installdata/windows/dlls.txt b/cmake/installdata/windows/dlls.txt
index c17bd76a7d..a4bfb7949a 100644
--- a/cmake/installdata/windows/dlls.txt
+++ b/cmake/installdata/windows/dlls.txt
@@ -1,3 +1,2 @@
project/BuildDependencies/${ARCH}/bin/libbluray*.jar .
project/BuildDependencies/${ARCH}/bin/*.dll .
-project/BuildDependencies/mingwlibs/${ARCH}/bin/*.dll .
diff --git a/cmake/installdata/windowsstore/dlls.txt b/cmake/installdata/windowsstore/dlls.txt
index a927b3d4ab..8b4544968c 100644
--- a/cmake/installdata/windowsstore/dlls.txt
+++ b/cmake/installdata/windowsstore/dlls.txt
@@ -1,2 +1 @@
project/BuildDependencies/win10-${ARCH}/bin/*.dll dlls
-project/BuildDependencies/mingwlibs/win10-${ARCH}/bin/*.dll dlls
diff --git a/cmake/scripts/windows/ArchSetup.cmake b/cmake/scripts/windows/ArchSetup.cmake
index b94842f75f..032632c6a9 100644
--- a/cmake/scripts/windows/ArchSetup.cmake
+++ b/cmake/scripts/windows/ArchSetup.cmake
@@ -32,9 +32,9 @@ set(DEPS_FOLDER_RELATIVE project/BuildDependencies)
set(DEPENDENCIES_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/${ARCH})
set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/${ARCH})
-list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${MINGW_LIBS_DIR})
-list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin)
-list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${DEPENDENCIES_DIR})
+list(APPEND CMAKE_PREFIX_PATH ${MINGW_LIBS_DIR})
+list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin)
+list(APPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR})
set(PYTHON_INCLUDE_DIR ${DEPENDENCIES_DIR}/include/python)
# -------- Compiler options ---------
@@ -73,8 +73,8 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
link_directories(${DEPENDENCIES_DIR}/lib)
# Additional libraries
-list(APPEND DEPLIBS d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib WS2_32.lib
- PowrProf.lib setupapi.lib dwmapi.lib dxguid.lib DelayImp.lib)
+list(APPEND DEPLIBS bcrypt.lib d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib WS2_32.lib
+ PowrProf.lib setupapi.lib Shlwapi.lib dwmapi.lib dxguid.lib DelayImp.lib)
# NODEFAULTLIB option
set(_nodefaultlibs_RELEASE libcmt)
@@ -88,8 +88,7 @@ endforeach()
# DELAYLOAD option
set(_delayloadlibs zlib.dll libmysql.dll libxslt.dll dnssd.dll dwmapi.dll sqlite3.dll
- avcodec-58.dll avfilter-7.dll avformat-58.dll avutil-56.dll
- postproc-55.dll swresample-3.dll swscale-5.dll d3dcompiler_47.dll)
+ d3dcompiler_47.dll)
foreach(_lib ${_delayloadlibs})
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DELAYLOAD:\"${_lib}\"")
endforeach()
diff --git a/cmake/scripts/windowsstore/ArchSetup.cmake b/cmake/scripts/windowsstore/ArchSetup.cmake
index e3e46e7ff0..928b731633 100644
--- a/cmake/scripts/windowsstore/ArchSetup.cmake
+++ b/cmake/scripts/windowsstore/ArchSetup.cmake
@@ -49,10 +49,10 @@ set(DEPENDENCIES_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/win10-${ARCH})
set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/win10-${ARCH})
# mingw libs
-list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${MINGW_LIBS_DIR})
-list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin)
+list(APPEND CMAKE_PREFIX_PATH ${MINGW_LIBS_DIR})
+list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin)
# dependencies
-list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${DEPENDENCIES_DIR})
+list(APPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR})
# for python
set(PYTHON_INCLUDE_DIR ${DEPENDENCIES_DIR}/include/python)
@@ -91,7 +91,7 @@ set(gtest_force_shared_crt ON CACHE STRING "" FORCE)
link_directories(${MINGW_LIBS_DIR}/lib
${DEPENDENCIES_DIR}/lib)
-list(APPEND DEPLIBS d3d11.lib WS2_32.lib dxguid.lib dloadhelper.lib WindowsApp.lib)
+list(APPEND DEPLIBS bcrypt.lib d3d11.lib WS2_32.lib dxguid.lib dloadhelper.lib WindowsApp.lib)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /WINMD:NO")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:msvcrt /DEBUG:FASTLINK /OPT:NOREF /OPT:NOICF")
diff --git a/lib/cpluff/CMakeLists.txt b/lib/cpluff/CMakeLists.txt
index 931c0aee1c..ff5b1cb038 100644
--- a/lib/cpluff/CMakeLists.txt
+++ b/lib/cpluff/CMakeLists.txt
@@ -46,6 +46,8 @@ target_include_directories(${PROJECT_NAME}
$<INSTALL_INTERFACE:include>
)
+target_compile_definitions(${PROJECT_NAME} PRIVATE -Dhash_delete=kazlib_hash_delete -Dhash_free=kazlib_hash_free -Dhash_insert=kazlib_hash_insert -Dlist_delete=kazlib_list_delete)
+
target_compile_definitions(${PROJECT_NAME}
PRIVATE
XML_STATIC
diff --git a/project/BuildDependencies/scripts/0_package.target-x64.list b/project/BuildDependencies/scripts/0_package.target-x64.list
index 14eeb0a8b6..0811a07218 100644
--- a/project/BuildDependencies/scripts/0_package.target-x64.list
+++ b/project/BuildDependencies/scripts/0_package.target-x64.list
@@ -7,7 +7,7 @@
; -> ...
;PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER!
crossguid-fef89a4-x64-vc140.7z
-curl-7.59.0-x64-v140.7z
+curl-7.61.1-x64-v141.7z
dnssd-765.50.9-x64-vc140-v2.7z
easyhook-2.7.6035.0-x64-vc140.7z
expat-2.2.0-x64-vc140.7z
@@ -30,8 +30,8 @@ libxml2-2.9.4-x64-vc140.7z
libxslt-1.1.29-x64-vc140.7z
lzo-2.09-x64-vc140.7z
mini_wdk-10.0.14393.0-x64.7z
-mysql-connector-c-6.1.9-x64-vc140.7z
-openssl-1.0.2k-x64-vc140.7z
+mariadb-connector-c-3.0.6-x64-v141.7z
+openssl-1.1.1-x64-v141.7z
pcre-8.40-x64-vc140.7z
pillow-4.2.1-x64-vc140.zip
pycryptodome-3.4.7-x64-vc140.zip
diff --git a/system/settings/settings.xml b/system/settings/settings.xml
index 27916231b6..3996711db7 100755
--- a/system/settings/settings.xml
+++ b/system/settings/settings.xml
@@ -2397,16 +2397,6 @@
<level>3</level>
<control type="button" format="action" />
</setting>
- <setting id="videoscreen.testpattern" type="action" label="226" help="36358">
- <requirement>
- <or>
- <condition>HAS_GL</condition>
- <condition>HAS_DX</condition>
- </or>
- </requirement>
- <level>3</level>
- <control type="button" format="action" />
- </setting>
</group>
</category>
<category id="audio" label="14221" help="36360">
diff --git a/tools/buildsteps/windows/buildffmpeg.sh b/tools/buildsteps/windows/buildffmpeg.sh
index cd3bae5272..14e48c850a 100644
--- a/tools/buildsteps/windows/buildffmpeg.sh
+++ b/tools/buildsteps/windows/buildffmpeg.sh
@@ -121,7 +121,7 @@ do_print_status "$LIBNAME-$VERSION (${TRIPLET})" "$blue_color" "Configuring"
[[ -z "$extra_ldflags" ]] && extra_ldflags=-static-libgcc
$LOCALSRCDIR/configure --target-os=$FFMPEG_TARGET_OS --prefix=$FFMPEGDESTDIR --arch=$ARCH \
- --disable-static --enable-shared $FFMPEG_OPTS_SHARED \
+ $FFMPEG_OPTS_SHARED \
--extra-cflags="$extra_cflags" --extra-ldflags="$extra_ldflags"
do_makelib
diff --git a/tools/buildsteps/windows/ffmpeg_options.txt b/tools/buildsteps/windows/ffmpeg_options.txt
index 84b44c3012..30de94404b 100644
--- a/tools/buildsteps/windows/ffmpeg_options.txt
+++ b/tools/buildsteps/windows/ffmpeg_options.txt
@@ -8,11 +8,11 @@
--disable-nvenc
--disable-openssl
--disable-programs
---disable-static
+--disable-shared
--enable-encoder=ac3,aac,wmav2,png,mjpeg
--enable-muxer=spdif,adts,asf,ipod
--enable-postproc
--enable-protocol=http
--enable-runtime-cpudetect
---enable-shared
+--enable-static
--enable-zlib
diff --git a/tools/buildsteps/windows/make-mingwlibs.sh b/tools/buildsteps/windows/make-mingwlibs.sh
index 8aad81f1bb..e5a3594cd9 100644
--- a/tools/buildsteps/windows/make-mingwlibs.sh
+++ b/tools/buildsteps/windows/make-mingwlibs.sh
@@ -64,8 +64,8 @@ throwerror() {
checkfiles() {
for i in $@; do
- if [ ! -f "$PREFIX/bin/$i" ]; then
- throwerror "$PREFIX/bin/$i"
+ if [ ! -f "$PREFIX/$i" ]; then
+ throwerror "$PREFIX/$i"
exit 1
fi
done
@@ -98,7 +98,7 @@ echo "-------------------------------------------------"
echo " building FFmpeg $TRIPLET"
echo "-------------------------------------------------"
./buildffmpeg.sh $MAKECLEAN
-checkfiles avcodec-58.dll avformat-58.dll avutil-56.dll postproc-55.dll swscale-5.dll avfilter-7.dll swresample-3.dll
+checkfiles lib/avcodec.lib lib/avformat.lib lib/avutil.lib lib/postproc.lib lib/swscale.lib lib/avfilter.lib lib/swresample.lib
echo "-------------------------------------------------"
echo " building of FFmpeg $TRIPLET done..."
echo "-------------------------------------------------"
diff --git a/tools/buildsteps/windows/patches/0001-ffmpeg-detect-openssl.patch b/tools/buildsteps/windows/patches/0001-ffmpeg-detect-openssl.patch
index f5abbbfc9a..d5277ecc41 100644
--- a/tools/buildsteps/windows/patches/0001-ffmpeg-detect-openssl.patch
+++ b/tools/buildsteps/windows/patches/0001-ffmpeg-detect-openssl.patch
@@ -12,10 +12,11 @@ diff --git a/configure b/configure
index a1818dc..1cf2a7c 100755
--- a/configure
+++ b/configure
-@@ -6125,6 +6125,7 @@
+@@ -6147,6 +6147,8 @@
check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
++ check_lib openssl openssl/ssl.h OPENSSL_init_ssl -llibssl -llibcrypto -lws2_32 -lgdi32 -ladvapi32 -luser32 ||
+ check_lib openssl openssl/ssl.h SSL_library_init -llibeay32 -lssleay32 ||
die "ERROR: openssl not found"; }
enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create &&
diff --git a/tools/buildsteps/windows/patches/0002-ffmpeg-zlib-config-conflict.patch b/tools/buildsteps/windows/patches/0002-ffmpeg-zlib-config-conflict.patch
index 0955cab1be..632cc55bfb 100644
--- a/tools/buildsteps/windows/patches/0002-ffmpeg-zlib-config-conflict.patch
+++ b/tools/buildsteps/windows/patches/0002-ffmpeg-zlib-config-conflict.patch
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
-@@ -7144,6 +7144,9 @@
+@@ -7197,6 +7197,9 @@
$CONFIG_EXTRA \
$ALL_COMPONENTS \
diff --git a/tools/buildsteps/windows/patches/0003-ffmpeg-static.patch b/tools/buildsteps/windows/patches/0003-ffmpeg-static.patch
new file mode 100644
index 0000000000..fb78864a7d
--- /dev/null
+++ b/tools/buildsteps/windows/patches/0003-ffmpeg-static.patch
@@ -0,0 +1,20 @@
+--- a/configure
++++ b/configure
+@@ -5131,6 +5131,8 @@
+ enabled shared && ! enabled small && test_cmd $windres --version && enable gnu_windres
+ enabled x86_32 && check_ldflags -Wl,--large-address-aware
+ shlibdir_default="$bindir_default"
++ LIBPREF=""
++ LIBSUF=".lib"
+ SLIBPREF=""
+ SLIBSUF=".dll"
+ SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
+@@ -5180,6 +5182,8 @@
+ fi
+ enabled x86_32 && check_ldflags -LARGEADDRESSAWARE
+ shlibdir_default="$bindir_default"
++ LIBPREF=""
++ LIBSUF=".lib"
+ SLIBPREF=""
+ SLIBSUF=".dll"
+ SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
diff --git a/tools/depends/target/ffmpeg/FFMPEG-VERSION b/tools/depends/target/ffmpeg/FFMPEG-VERSION
index 0e5d52f975..ea7b2eedc3 100644
--- a/tools/depends/target/ffmpeg/FFMPEG-VERSION
+++ b/tools/depends/target/ffmpeg/FFMPEG-VERSION
@@ -1,4 +1,4 @@
LIBNAME=ffmpeg
BASE_URL=https://github.com/xbmc/FFmpeg
-VERSION=4.0.2-Leia-Alpha3
+VERSION=4.0.3-Leia-Beta5
ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
diff --git a/version.txt b/version.txt
index d266b11f65..0b2409fc44 100644
--- a/version.txt
+++ b/version.txt
@@ -5,7 +5,7 @@ WEBSITE http://kodi.tv
VERSION_MAJOR 18
VERSION_MINOR 0
VERSION_TAG BETA5
-VERSION_CODE 17.99.805
+VERSION_CODE 17.99.808
ADDON_API 17.9.805
APP_PACKAGE org.xbmc.kodi
PACKAGE_IDENTITY XBMCFoundation.Kodi
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index f553424526..3f3f75a60a 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -1074,8 +1074,6 @@ void CApplication::OnSettingAction(std::shared_ptr<const CSetting> setting)
}
else if (settingId == CSettings::SETTING_VIDEOSCREEN_GUICALIBRATION)
CServiceBroker::GetGUI()->GetWindowManager().ActivateWindow(WINDOW_SCREEN_CALIBRATION);
- else if (settingId == CSettings::SETTING_VIDEOSCREEN_TESTPATTERN)
- CServiceBroker::GetGUI()->GetWindowManager().ActivateWindow(WINDOW_TEST_PATTERN);
else if (settingId == CSettings::SETTING_SOURCE_VIDEOS)
{
std::vector<std::string> params{"library://video/files.xml", "return"};
diff --git a/xbmc/addons/Scraper.cpp b/xbmc/addons/Scraper.cpp
index 3279720973..8b7041387b 100644
--- a/xbmc/addons/Scraper.cpp
+++ b/xbmc/addons/Scraper.cpp
@@ -757,6 +757,7 @@ void DetailsFromFileItem<CAlbum>(const CFileItem &item, CAlbum &album)
album.fRating = item.GetProperty("album.rating").asFloat();
album.iUserrating = item.GetProperty("album.user_rating").asInteger32();
album.iVotes = item.GetProperty("album.votes").asInteger32();
+ album.art = item.GetArt();
int nThumbs = item.GetProperty("album.thumbs").asInteger32();
ParseThumbs(album.thumbURL, item, nThumbs, "album.thumb");
@@ -777,6 +778,7 @@ void DetailsFromFileItem<CArtist>(const CFileItem &item, CArtist &artist)
artist.strBiography = FromString(item, "artist.biography");
artist.strDied = FromString(item, "artist.died");
artist.strDisbanded = FromString(item, "artist.disbanded");
+ artist.art = item.GetArt();
int nAlbums = item.GetProperty("artist.albums").asInteger32();
artist.discography.reserve(nAlbums);
diff --git a/xbmc/filesystem/SpecialProtocol.cpp b/xbmc/filesystem/SpecialProtocol.cpp
index 3b392e02e0..395f8165e8 100644
--- a/xbmc/filesystem/SpecialProtocol.cpp
+++ b/xbmc/filesystem/SpecialProtocol.cpp
@@ -160,6 +160,8 @@ std::string CSpecialProtocol::TranslatePath(const CURL &url)
translatedPath = URIUtils::AddFileToFolder(CServiceBroker::GetSettingsComponent()->GetSettings()->GetString(CSettings::SETTING_AUDIOCDS_RECORDINGPATH), FileName);
else if (RootDir == "screenshots")
translatedPath = URIUtils::AddFileToFolder(CServiceBroker::GetSettingsComponent()->GetSettings()->GetString(CSettings::SETTING_DEBUG_SCREENSHOTPATH), FileName);
+ else if (RootDir == "musicartistsinfo")
+ translatedPath = URIUtils::AddFileToFolder(CServiceBroker::GetSettingsComponent()->GetSettings()->GetString(CSettings::SETTING_MUSICLIBRARY_ARTISTSFOLDER), FileName);
else if (RootDir == "musicplaylists")
translatedPath = URIUtils::AddFileToFolder(CUtil::MusicPlaylistsLocation(), FileName);
else if (RootDir == "videoplaylists")
diff --git a/xbmc/guilib/GUIWindowManager.cpp b/xbmc/guilib/GUIWindowManager.cpp
index 652aa4d9f7..d5fbae93c2 100644
--- a/xbmc/guilib/GUIWindowManager.cpp
+++ b/xbmc/guilib/GUIWindowManager.cpp
@@ -40,12 +40,6 @@
#include "video/dialogs/GUIDialogVideoInfo.h"
#include "video/windows/GUIWindowVideoNav.h"
#include "profiles/windows/GUIWindowSettingsProfile.h"
-#ifdef HAS_GL
-#include "rendering/gl/GUIWindowTestPatternGL.h"
-#endif
-#ifdef HAS_DX
-#include "rendering/dx/GUIWindowTestPatternDX.h"
-#endif
#include "settings/windows/GUIWindowSettingsScreenCalibration.h"
#include "programs/GUIWindowPrograms.h"
#include "pictures/GUIWindowPictures.h"
@@ -184,12 +178,6 @@ void CGUIWindowManager::CreateWindows()
Add(new CGUIWindowFileManager);
Add(new CGUIWindowSettings);
Add(new CGUIWindowSystemInfo);
-#ifdef HAS_GL
- Add(new CGUIWindowTestPatternGL);
-#endif
-#ifdef HAS_DX
- Add(new CGUIWindowTestPatternDX);
-#endif
Add(new CGUIWindowSettingsScreenCalibration);
Add(new CGUIWindowSettingsCategory);
Add(new CGUIWindowVideoNav);
@@ -407,7 +395,6 @@ bool CGUIWindowManager::DestroyWindows()
DestroyWindow(WINDOW_VISUALISATION);
DestroyWindow(WINDOW_SETTINGS_MENU);
DestroyWindow(WINDOW_SETTINGS_PROFILES);
- DestroyWindow(WINDOW_TEST_PATTERN);
DestroyWindow(WINDOW_SCREEN_CALIBRATION);
DestroyWindow(WINDOW_SYSTEM_INFORMATION);
DestroyWindow(WINDOW_SCREENSAVER);
diff --git a/xbmc/guilib/WindowIDs.dox b/xbmc/guilib/WindowIDs.dox
index 3e75572523..dd7e7f694a 100644
--- a/xbmc/guilib/WindowIDs.dox
+++ b/xbmc/guilib/WindowIDs.dox
@@ -14,7 +14,6 @@ This page shows the window names, the window definition, the window ID and the s
| FileManager | WINDOW_FILES | 10003 | FileManager.xml |
| Settings | WINDOW_SETTINGS_MENU | 10004 | Settings.xml |
| SystemInfo | WINDOW_SYSTEM_INFORMATION | 10007 | SettingsSystemInfo.xml |
-| TestPattern | WINDOW_TEST_PATTERN | 10008 | none |
| ScreenCalibration | WINDOW_SCREEN_CALIBRATION | 10011 | SettingsScreenCalibration.xml |
| SystemSettings | WINDOW_SETTINGS_SYSTEM | 10016 | SettingsCategory.xml |
| ServiceSettings | WINDOW_SETTINGS_SERVICE | 10018 | SettingsCategory.xml |
diff --git a/xbmc/guilib/WindowIDs.h b/xbmc/guilib/WindowIDs.h
index 4df484bbf6..83b499b682 100644
--- a/xbmc/guilib/WindowIDs.h
+++ b/xbmc/guilib/WindowIDs.h
@@ -16,7 +16,6 @@
#define WINDOW_FILES 10003
#define WINDOW_SETTINGS_MENU 10004
#define WINDOW_SYSTEM_INFORMATION 10007
-#define WINDOW_TEST_PATTERN 10008
#define WINDOW_SCREEN_CALIBRATION 10011
#define WINDOW_SETTINGS_START 10016
diff --git a/xbmc/input/WindowTranslator.cpp b/xbmc/input/WindowTranslator.cpp
index 9d7a28129d..0238e3c2e6 100644
--- a/xbmc/input/WindowTranslator.cpp
+++ b/xbmc/input/WindowTranslator.cpp
@@ -54,7 +54,6 @@ const CWindowTranslator::WindowMapByName CWindowTranslator::WindowMappingByName
{ "pvrosdguide" , WINDOW_DIALOG_PVR_CHANNEL_GUIDE }, // backward compatibility to v17
{ "pvrosdteletext" , WINDOW_DIALOG_OSD_TELETEXT },
{ "systeminfo" , WINDOW_SYSTEM_INFORMATION },
- { "testpattern" , WINDOW_TEST_PATTERN },
{ "screencalibration" , WINDOW_SCREEN_CALIBRATION },
{ "systemsettings" , WINDOW_SETTINGS_SYSTEM },
{ "servicesettings" , WINDOW_SETTINGS_SERVICE },
diff --git a/xbmc/rendering/dx/CMakeLists.txt b/xbmc/rendering/dx/CMakeLists.txt
index 8fabdf3eb3..bf3dbf0181 100644
--- a/xbmc/rendering/dx/CMakeLists.txt
+++ b/xbmc/rendering/dx/CMakeLists.txt
@@ -1,10 +1,8 @@
set(SOURCES DeviceResources.cpp
- GUIWindowTestPatternDX.cpp
RenderSystemDX.cpp)
set(HEADERS DeviceResources.h
DirectXHelper.h
- GUIWindowTestPatternDX.h
RenderContext.h
RenderSystemDX.h)
diff --git a/xbmc/rendering/dx/GUIWindowTestPatternDX.cpp b/xbmc/rendering/dx/GUIWindowTestPatternDX.cpp
deleted file mode 100644
index 07cbb09e9e..0000000000
--- a/xbmc/rendering/dx/GUIWindowTestPatternDX.cpp
+++ /dev/null
@@ -1,376 +0,0 @@
-/*
- * Copyright (C) 2005-2018 Team Kodi
- * This file is part of Kodi - https://kodi.tv
- *
- * Test patterns designed by Ofer LaOr - hometheater.co.il
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- * See LICENSES/README.md for more information.
- */
-
-#include "GUIWindowTestPatternDX.h"
-#include "rendering/dx/DeviceResources.h"
-#include "rendering/dx/RenderContext.h"
-#ifndef M_PI
- #define M_PI 3.14159265358979323846
-#endif
-
-#ifndef _d3d9TYPES_H_
-#include "DirectXPackedVector.h"
-using namespace DirectX;
-using namespace DirectX::PackedVector;
-using namespace Microsoft::WRL;
-
-DWORD D3DCOLOR_COLORVALUE(float r, float g, float b, float a)
-{
- XMCOLOR xColor;
- XMVECTOR xVector = XMVectorSet(r, g, b, a);
- XMStoreColor(&xColor, xVector);
- DWORD color = xColor;
- return color;
-}
-#endif
-
-CGUIWindowTestPatternDX::CGUIWindowTestPatternDX(void) : CGUIWindowTestPattern()
-{
- m_vb = nullptr;
- m_bufferWidth = 0;
-}
-
-CGUIWindowTestPatternDX::~CGUIWindowTestPatternDX(void)
-{
- m_vb = nullptr;
- m_bufferWidth = 0;
-}
-
-void CGUIWindowTestPatternDX::DrawVerticalLines(int top, int left, int bottom, int right)
-{
- Vertex* vert = new Vertex[2 + (right - left)];
- int p = 0;
- for (int i = left; i <= right; i += 2)
- {
- vert[p].pos.x = (float)i;
- vert[p].pos.y = (float)top;
- vert[p].pos.z = 0.5f;
- vert[p].color = XMFLOAT4(m_white, m_white, m_white, 1.0f);
- ++p;
- vert[p].pos.x = (float)i;
- vert[p].pos.y = (float)bottom;
- vert[p].pos.z = 0.5f;
- vert[p].color = XMFLOAT4(m_white, m_white, m_white, 1.0f);
- ++p;
- }
- UpdateVertexBuffer(vert, p);
-
- ComPtr<ID3D11DeviceContext> pContext = DX::DeviceResources::Get()->GetD3DContext();
- CGUIShaderDX* pGUIShader = DX::Windowing()->GetGUIShader();
-
- pGUIShader->Begin(SHADER_METHOD_RENDER_DEFAULT);
- unsigned stride = sizeof(Vertex), offset = 0;
- pContext->IASetVertexBuffers(0, 1, m_vb.GetAddressOf(), &stride, &offset);
- pContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_LINELIST);
- pGUIShader->Draw(p, 0);
-
- delete [] vert;
-}
-
-void CGUIWindowTestPatternDX::DrawHorizontalLines(int top, int left, int bottom, int right)
-{
- Vertex* vert = new Vertex[2 + (bottom - top)];
- int p = 0;
- for (int i = top; i <= bottom; i += 2)
- {
- vert[p].pos.x = (float)left;
- vert[p].pos.y = (float)i;
- vert[p].pos.z = 0.5f;
- vert[p].color = XMFLOAT4(m_white, m_white, m_white, 1.0f);
- ++p;
- vert[p].pos.x = (float)right;
- vert[p].pos.y = (float)i;
- vert[p].pos.z = 0.5f;
- vert[p].color = XMFLOAT4(m_white, m_white, m_white, 1.0f);
- ++p;
- }
- UpdateVertexBuffer(vert, p);
-
- ComPtr<ID3D11DeviceContext> pContext = DX::DeviceResources::Get()->GetD3DContext();
- CGUIShaderDX* pGUIShader = DX::Windowing()->GetGUIShader();
-
- pGUIShader->Begin(SHADER_METHOD_RENDER_DEFAULT);
- unsigned stride = sizeof(Vertex), offset = 0;
- pContext->IASetVertexBuffers(0, 1, m_vb.GetAddressOf(), &stride, &offset);
- pContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_LINELIST);
- pGUIShader->Draw(p, 0);
-
- delete [] vert;
-}
-
-void CGUIWindowTestPatternDX::DrawCheckers(int top, int left, int bottom, int right)
-{
- int c = (bottom-top+1)*(1+(right-left)/2);
- if (c < 1)
- return;
- Vertex* vert = new Vertex[c];
- int i=0;
- for (int y = top; y <= bottom; y++)
- {
- for (int x = left; x <= right; x += 2)
- {
- if (y % 2 == 0)
- {
- vert[i].pos.x = (float)x;
- vert[i].pos.y = (float)y;
- vert[i].pos.z = 0.5f;
- vert[i].color = XMFLOAT4(m_white, m_white, m_white, 1.0f);
- }
- else
- {
- vert[i].pos.x = (float)x+1.0f;
- vert[i].pos.y = (float)y;
- vert[i].pos.z = 0.5f;
- vert[i].color = XMFLOAT4(m_white, m_white, m_white, 1.0f);
- }
- ++i;
- }
- }
- UpdateVertexBuffer(vert, i);
-
- ComPtr<ID3D11DeviceContext> pContext = DX::DeviceResources::Get()->GetD3DContext();
- CGUIShaderDX* pGUIShader = DX::Windowing()->GetGUIShader();
-
- pGUIShader->Begin(SHADER_METHOD_RENDER_DEFAULT);
- unsigned stride = sizeof(Vertex), offset = 0;
- pContext->IASetVertexBuffers(0, 1, m_vb.GetAddressOf(), &stride, &offset);
- pContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_POINTLIST);
- pGUIShader->Draw(i, 0);
-
- delete [] vert;
-}
-
-void CGUIWindowTestPatternDX::DrawBouncingRectangle(int top, int left, int bottom, int right)
-{
- m_bounceX += m_bounceDirectionX;
- m_bounceY += m_bounceDirectionY;
-
- if ((m_bounceDirectionX == 1 && m_bounceX + TEST_PATTERNS_BOUNCE_SQUARE_SIZE == right) || (m_bounceDirectionX == -1 && m_bounceX == left))
- m_bounceDirectionX = -m_bounceDirectionX;
-
- if ((m_bounceDirectionY == 1 && m_bounceY + TEST_PATTERNS_BOUNCE_SQUARE_SIZE == bottom) || (m_bounceDirectionY == -1 && m_bounceY == top))
- m_bounceDirectionY = -m_bounceDirectionY;
-
- DrawRectangle((float)m_bounceX, (float)m_bounceY, (float)(m_bounceX + TEST_PATTERNS_BOUNCE_SQUARE_SIZE), (float)(m_bounceY + TEST_PATTERNS_BOUNCE_SQUARE_SIZE), D3DCOLOR_COLORVALUE(m_white, m_white, m_white, 1.0f));
-}
-
-void CGUIWindowTestPatternDX::DrawContrastBrightnessPattern(int top, int left, int bottom, int right)
-{
- DWORD color;
- DWORD color_white = D3DCOLOR_COLORVALUE(m_white, m_white, m_white, 1.0f);
- DWORD color_black = D3DCOLOR_COLORVALUE(m_black, m_black, m_black, 1.0f);
- float x5p = (float) (left + (0.05f * (right - left)));
- float y5p = (float) (top + (0.05f * (bottom - top)));
- float x12p = (float) (left + (0.125f * (right - left)));
- float y12p = (float) (top + (0.125f * (bottom - top)));
- float x25p = (float) (left + (0.25f * (right - left)));
- float y25p = (float) (top + (0.25f * (bottom - top)));
- float x37p = (float) (left + (0.375f * (right - left)));
- float y37p = (float) (top + (0.375f * (bottom - top)));
- float x50p = (float)(left + (right - left) / 2);
- float y50p = (float)(top + (bottom - top) / 2);
- float x62p = (float) (left + (0.625f * (right - left)));
- float y62p = (float) (top + (0.625f * (bottom - top)));
- float x75p = (float) (left + (0.75f * (right - left)));
- float y75p = (float) (top + (0.75f * (bottom - top)));
- float x87p = (float) (left + (0.875f * (right - left)));
- float y87p = (float) (top + (0.875f * (bottom - top)));
- float x95p = (float) (left + (0.95f * (right - left)));
- float y95p = (float) (top + (0.95f * (bottom - top)));
-
- m_blinkFrame = (m_blinkFrame + 1) % TEST_PATTERNS_BLINK_CYCLE;
-
- // draw main quadrants
- DrawRectangle(x50p, (float)top, (float)right, y50p, color_white);
- DrawRectangle((float)left, (float)y50p, x50p, (float)bottom, color_white);
-
- XMFLOAT4 xcolor_white, xcolor_black;
- CD3DHelper::XMStoreColor(&xcolor_white, color_white);
- CD3DHelper::XMStoreColor(&xcolor_black, color_black);
-
- // draw border lines
- Vertex vert[] =
- {
- { XMFLOAT3((float)left, y5p, 0.5f), xcolor_white, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3(x50p, y5p, 0.5f), xcolor_white, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3(x5p, (float)top, 0.5f), xcolor_white, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3(x5p, y50p, 0.5f), xcolor_white, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3(x50p, y95p, 0.5f), xcolor_white, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3((float)right, y95p, 0.5f), xcolor_white, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3(x95p, y50p, 0.5f), xcolor_white, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3(x95p, (float)bottom, 0.5f), xcolor_white, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
-
- { XMFLOAT3(x50p, y5p, 0.5f), xcolor_black, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3((float)right, y5p, 0.5f), xcolor_black, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3(x5p, y50p, 0.5f), xcolor_black, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3(x5p, (float)bottom, 0.5f), xcolor_black, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3((float)left, y95p, 0.5f), xcolor_black, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3(x50p, y95p, 0.5f), xcolor_black, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3(x95p, (float)top, 0.5f), xcolor_black, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3(x95p, y50p, 0.5f), xcolor_black, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- };
- UpdateVertexBuffer(vert, ARRAYSIZE(vert));
-
- ComPtr<ID3D11DeviceContext> pContext = DX::DeviceResources::Get()->GetD3DContext();
- CGUIShaderDX* pGUIShader = DX::Windowing()->GetGUIShader();
-
- pGUIShader->Begin(SHADER_METHOD_RENDER_DEFAULT);
- unsigned stride = sizeof(Vertex), offset = 0;
- pContext->IASetVertexBuffers(0, 1, m_vb.GetAddressOf(), &stride, &offset);
- pContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_LINELIST);
- pGUIShader->Draw(ARRAYSIZE(vert), 0);
-
- // draw inner rectangles
- DrawRectangle(x12p, y12p, x37p, y37p, color_white);
- DrawRectangle(x62p, y62p, x87p, y87p, color_white);
-
- DrawRectangle(x62p, y12p, x87p, y37p, color_black);
- DrawRectangle(x12p, y62p, x37p, y87p, color_black);
-
- // draw inner circles
- if (m_blinkFrame < TEST_PATTERNS_BLINK_CYCLE / 2)
- color = D3DCOLOR_COLORVALUE(m_black + 0.05f, m_black + 0.05f, m_black + 0.05f, 1.0f);
- else
- color = D3DCOLOR_COLORVALUE(0.0f, 0.0f, 0.0f, 1.0f); // BTB
- DrawCircleEx(x25p, y75p, (y37p - y12p) / 3, color);
- DrawCircleEx(x75p, y25p, (y37p - y12p) / 3, color);
-
- if (m_blinkFrame < TEST_PATTERNS_BLINK_CYCLE / 2)
- color = D3DCOLOR_COLORVALUE(m_white - 0.05f, m_white - 0.05f, m_white - 0.05f, 1.0f);
- else
- color = D3DCOLOR_COLORVALUE(1.0f, 1.0f, 1.0f, 1.0f); // WTW
- DrawCircleEx(x25p, y25p, (y37p - y12p) / 3, color);
- DrawCircleEx(x75p, y75p, (y37p - y12p) / 3, color);
-}
-
-void CGUIWindowTestPatternDX::DrawCircle(int originX, int originY, int radius)
-{
- DrawCircleEx((float)originX, (float)originY, (float)radius, D3DCOLOR_COLORVALUE(m_white, m_white, m_white, 1.0f));
-}
-
-void CGUIWindowTestPatternDX::DrawCircleEx(float originX, float originY, float radius, DWORD color)
-{
- float angle;
- float vectorX;
- float vectorY;
- float vectorY1 = originY;
- float vectorX1 = originX;
- Vertex vert[1084]; // 361*3 + 1
- int p = 0;
-
- for (int i = 0; i <= 360; i++)
- {
- angle = (float)(((double)i)/57.29577957795135);
- vectorX = originX + (radius*(float)sin((double)angle));
- vectorY = originY + (radius*(float)cos((double)angle));
- vert[p].pos.x = originX;
- vert[p].pos.y = originY;
- vert[p].pos.z = 0.5f;
- CD3DHelper::XMStoreColor(&vert[p].color, color);
- ++p;
- vert[p].pos.x = vectorX1;
- vert[p].pos.y = vectorY1;
- vert[p].pos.z = 0.5f;
- CD3DHelper::XMStoreColor(&vert[p].color, color);
- ++p;
- vert[p].pos.x = vectorX;
- vert[p].pos.y = vectorY;
- vert[p].pos.z = 0.5f;
- CD3DHelper::XMStoreColor(&vert[p].color, color);
- ++p;
- vectorY1 = vectorY;
- vectorX1 = vectorX;
- }
- vert[1083] = vert[0];
-
- UpdateVertexBuffer(vert, ARRAYSIZE(vert));
-
- ComPtr<ID3D11DeviceContext> pContext = DX::DeviceResources::Get()->GetD3DContext();
- CGUIShaderDX* pGUIShader = DX::Windowing()->GetGUIShader();
-
- pGUIShader->Begin(SHADER_METHOD_RENDER_DEFAULT);
- unsigned stride = sizeof(Vertex), offset = 0;
- pContext->IASetVertexBuffers(0, 1, m_vb.GetAddressOf(), &stride, &offset);
- pContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
- pGUIShader->Draw(ARRAYSIZE(vert), 0);
-}
-
-void CGUIWindowTestPatternDX::BeginRender()
-{
- ComPtr<ID3D11DeviceContext> pContext = DX::DeviceResources::Get()->GetD3DContext();
- ID3D11RenderTargetView* renderTarget;
-
- pContext->OMGetRenderTargets(1, &renderTarget, NULL);
- float color[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
- pContext->ClearRenderTargetView(renderTarget, color);
- renderTarget->Release();
-}
-
-void CGUIWindowTestPatternDX::EndRender()
-{
- DX::Windowing()->GetGUIShader()->RestoreBuffers();
-}
-
-void CGUIWindowTestPatternDX::DrawRectangle(float x, float y, float x2, float y2, DWORD color)
-{
- XMFLOAT4 float4;
- CD3DHelper::XMStoreColor(&float4, color);
-
- Vertex vert[] =
- {
- { XMFLOAT3( x, y, 0.5f), float4, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3(x2, y, 0.5f), float4, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3(x2, y2, 0.5f), float4, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3(x2, y2, 0.5f), float4, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3(x, y2, 0.5f), float4, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- { XMFLOAT3( x, y, 0.5f), float4, XMFLOAT2(0.0f, 0.0f), XMFLOAT2(0.0f, 0.0f) },
- };
-
- UpdateVertexBuffer(vert, ARRAYSIZE(vert));
-
- ComPtr<ID3D11DeviceContext> pContext = DX::DeviceResources::Get()->GetD3DContext();
- CGUIShaderDX* pGUIShader = DX::Windowing()->GetGUIShader();
-
- pGUIShader->Begin(SHADER_METHOD_RENDER_DEFAULT);
- unsigned stride = sizeof(Vertex), offset = 0;
- pContext->IASetVertexBuffers(0, 1, m_vb.GetAddressOf(), &stride, &offset);
- pContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
- pGUIShader->Draw(ARRAYSIZE(vert), 0);
-}
-
-void CGUIWindowTestPatternDX::UpdateVertexBuffer(Vertex *vertices, unsigned count)
-{
- unsigned width = sizeof(Vertex) * count;
-
- if (!m_vb || width > m_bufferWidth) // create new
- {
- CD3D11_BUFFER_DESC desc(width, D3D11_BIND_VERTEX_BUFFER, D3D11_USAGE_DYNAMIC, D3D11_CPU_ACCESS_WRITE);
- D3D11_SUBRESOURCE_DATA initData = {};
- initData.pSysMem = vertices;
- initData.SysMemPitch = width;
-
- ComPtr<ID3D11Device1> pDevice = DX::DeviceResources::Get()->GetD3DDevice();
- if (SUCCEEDED(pDevice->CreateBuffer(&desc, &initData, m_vb.ReleaseAndGetAddressOf())))
- {
- m_bufferWidth = width;
- }
- return;
- }
- else // update
- {
- ComPtr<ID3D11DeviceContext> pContext = DX::DeviceResources::Get()->GetD3DContext();
- D3D11_MAPPED_SUBRESOURCE res;
- if (SUCCEEDED(pContext->Map(m_vb.Get(), 0, D3D11_MAP_WRITE_DISCARD, 0, &res)))
- {
- memcpy(res.pData, vertices, sizeof(Vertex) * count);
- pContext->Unmap(m_vb.Get(), 0);
- }
- }
-}
diff --git a/xbmc/rendering/dx/GUIWindowTestPatternDX.h b/xbmc/rendering/dx/GUIWindowTestPatternDX.h
deleted file mode 100644
index 33bb01373e..0000000000
--- a/xbmc/rendering/dx/GUIWindowTestPatternDX.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2005-2018 Team Kodi
- * This file is part of Kodi - https://kodi.tv
- *
- * Test patterns designed by Ofer LaOr - hometheater.co.il
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- * See LICENSES/README.md for more information.
- */
-
-#pragma once
-
-#include "settings/windows/GUIWindowTestPattern.h"
-#include "guilib/GUIShaderDX.h"
-
-#include <wrl/client.h>
-
-class CGUIWindowTestPatternDX : public CGUIWindowTestPattern
-{
-public:
- CGUIWindowTestPatternDX(void);
- virtual ~CGUIWindowTestPatternDX(void);
-
-protected:
- void DrawVerticalLines(int top, int left, int bottom, int right) override;
- void DrawHorizontalLines(int top, int left, int bottom, int right) override;
- void DrawCheckers(int top, int left, int bottom, int right) override;
- void DrawBouncingRectangle(int top, int left, int bottom, int right) override;
- void DrawContrastBrightnessPattern(int top, int left, int bottom, int right) override;
- void DrawCircle(int originX, int originY, int radius) override;
- void BeginRender() override;
- void EndRender() override;
-
-private:
- void UpdateVertexBuffer(Vertex *vertices, unsigned count);
- void DrawRectangle(float x, float y, float x2, float y2, DWORD color);
- void DrawCircleEx(float originX, float originY, float radius, DWORD color);
-
- unsigned m_bufferWidth;
- Microsoft::WRL::ComPtr<ID3D11Buffer> m_vb;
-};
-
diff --git a/xbmc/rendering/gl/CMakeLists.txt b/xbmc/rendering/gl/CMakeLists.txt
index 00fff7668f..f2b1e2dbb5 100644
--- a/xbmc/rendering/gl/CMakeLists.txt
+++ b/xbmc/rendering/gl/CMakeLists.txt
@@ -1,10 +1,8 @@
-set(SOURCES GUIWindowTestPatternGL.cpp
- RenderSystemGL.cpp
+set(SOURCES RenderSystemGL.cpp
../MatrixGL.cpp
GLShader.cpp)
-set(HEADERS GUIWindowTestPatternGL.h
- RenderSystemGL.h
+set(HEADERS RenderSystemGL.h
../MatrixGL.h
GLShader.h)
diff --git a/xbmc/rendering/gl/GUIWindowTestPatternGL.cpp b/xbmc/rendering/gl/GUIWindowTestPatternGL.cpp
deleted file mode 100644
index 41158bbc59..0000000000
--- a/xbmc/rendering/gl/GUIWindowTestPatternGL.cpp
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Copyright (C) 2005-2018 Team Kodi
- * This file is part of Kodi - https://kodi.tv
- *
- * Test patterns designed by Ofer LaOr - hometheater.co.il
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- * See LICENSES/README.md for more information.
- */
-
-#include "system_gl.h"
-#include "GUIWindowTestPatternGL.h"
-
-CGUIWindowTestPatternGL::CGUIWindowTestPatternGL(void) : CGUIWindowTestPattern()
-{
-}
-
-CGUIWindowTestPatternGL::~CGUIWindowTestPatternGL(void) = default;
-
-void CGUIWindowTestPatternGL::DrawVerticalLines(int top, int left, int bottom, int right)
-{
- glBegin(GL_LINES);
- glColor3f(m_white, m_white, m_white);
- for (int i = left; i <= right; i += 2)
- {
- glVertex2d(i, top);
- glVertex2d(i, bottom);
- }
- glEnd();
-}
-
-void CGUIWindowTestPatternGL::DrawHorizontalLines(int top, int left, int bottom, int right)
-{
- glBegin(GL_LINES);
- glColor3f(m_white, m_white, m_white);
- for (int i = top; i <= bottom; i += 2)
- {
- glVertex2d(left, i);
- glVertex2d(right, i);
- }
- glEnd();
-}
-
-void CGUIWindowTestPatternGL::DrawCheckers(int top, int left, int bottom, int right)
-{
- glBegin(GL_POINTS);
- glColor3f(m_white, m_white, m_white);
- for (int y = top; y <= bottom; y++)
- {
- for (int x = left; x <= right; x += 2)
- {
- if (y % 2 == 0)
- glVertex2d(x, y);
- else
- glVertex2d(x+1, y);
- }
- }
- glEnd();
-}
-
-void CGUIWindowTestPatternGL::DrawBouncingRectangle(int top, int left, int bottom, int right)
-{
- m_bounceX += m_bounceDirectionX;
- m_bounceY += m_bounceDirectionY;
-
- if ((m_bounceDirectionX == 1 && m_bounceX + TEST_PATTERNS_BOUNCE_SQUARE_SIZE == right) || (m_bounceDirectionX == -1 && m_bounceX == left))
- m_bounceDirectionX = -m_bounceDirectionX;
-
- if ((m_bounceDirectionY == 1 && m_bounceY + TEST_PATTERNS_BOUNCE_SQUARE_SIZE == bottom) || (m_bounceDirectionY == -1 && m_bounceY == top))
- m_bounceDirectionY = -m_bounceDirectionY;
-
- glColor3f(m_white, m_white, m_white);
- glRecti(m_bounceX, m_bounceY, m_bounceX + TEST_PATTERNS_BOUNCE_SQUARE_SIZE, m_bounceY + TEST_PATTERNS_BOUNCE_SQUARE_SIZE);
-}
-
-void CGUIWindowTestPatternGL::DrawContrastBrightnessPattern(int top, int left, int bottom, int right)
-{
- int x5p = (int) (left + (0.05f * (right - left)));
- int y5p = (int) (top + (0.05f * (bottom - top)));
- int x12p = (int) (left + (0.125f * (right - left)));
- int y12p = (int) (top + (0.125f * (bottom - top)));
- int x25p = (int) (left + (0.25f * (right - left)));
- int y25p = (int) (top + (0.25f * (bottom - top)));
- int x37p = (int) (left + (0.375f * (right - left)));
- int y37p = (int) (top + (0.375f * (bottom - top)));
- int x50p = left + (right - left) / 2;
- int y50p = top + (bottom - top) / 2;
- int x62p = (int) (left + (0.625f * (right - left)));
- int y62p = (int) (top + (0.625f * (bottom - top)));
- int x75p = (int) (left + (0.75f * (right - left)));
- int y75p = (int) (top + (0.75f * (bottom - top)));
- int x87p = (int) (left + (0.875f * (right - left)));
- int y87p = (int) (top + (0.875f * (bottom - top)));
- int x95p = (int) (left + (0.95f * (right - left)));
- int y95p = (int) (top + (0.95f * (bottom - top)));
-
- m_blinkFrame = (m_blinkFrame + 1) % TEST_PATTERNS_BLINK_CYCLE;
-
- // draw main quadrants
- glColor3f(m_white, m_white, m_white);
- glRecti(x50p, top, right, y50p);
- glRecti(left, y50p, x50p, bottom);
-
- // draw border lines
- glBegin(GL_LINES);
- glColor3f(m_white, m_white, m_white);
- glVertex2d(left, y5p);
- glVertex2d(x50p, y5p);
- glVertex2d(x5p, top);
- glVertex2d(x5p, y50p);
- glVertex2d(x50p, y95p);
- glVertex2d(right, y95p);
- glVertex2d(x95p, y50p);
- glVertex2d(x95p, bottom);
-
- glColor3f(m_black, m_black, m_black);
- glVertex2d(x50p, y5p);
- glVertex2d(right, y5p);
- glVertex2d(x5p, y50p);
- glVertex2d(x5p, bottom);
- glVertex2d(left, y95p);
- glVertex2d(x50p, y95p);
- glVertex2d(x95p, top);
- glVertex2d(x95p, y50p);
- glEnd();
-
- // draw inner rectangles
- glColor3f(m_white, m_white, m_white);
- glRecti(x12p, y12p, x37p, y37p);
- glRecti(x62p, y62p, x87p, y87p);
-
- glColor3f(m_black, m_black, m_black);
- glRecti(x62p, y12p, x87p, y37p);
- glRecti(x12p, y62p, x37p, y87p);
-
- // draw inner circles
- if (m_blinkFrame < TEST_PATTERNS_BLINK_CYCLE / 2)
- glColor3f(m_black + 0.05f, m_black + 0.05f, m_black + 0.05f);
- else
- glColor3f(0.0f, 0.0f, 0.0f); //BTB
- DrawCircle(x25p, y75p, (y37p - y12p) / 3);
- DrawCircle(x75p, y25p, (y37p - y12p) / 3);
-
- if (m_blinkFrame < TEST_PATTERNS_BLINK_CYCLE / 2)
- glColor3f(m_white - 0.05f, m_white - 0.05f, m_white - 0.05f);
- else
- glColor3f(1.0f, 1.0f, 1.0f); //WTW
- DrawCircle(x25p, y25p, (y37p - y12p) / 3);
- DrawCircle(x75p, y75p, (y37p - y12p) / 3);
-}
-
-void CGUIWindowTestPatternGL::DrawCircle(int originX, int originY, int radius)
-{
- float angle;
- int vectorX;
- int vectorY;
- int vectorY1 = originY;
- int vectorX1 = originX;
-
- glBegin(GL_TRIANGLES);
- for (int i = 0; i <= 360; i++)
- {
- angle = (float)(((double)i)/57.29577957795135);
- vectorX = (int) (originX + (radius*(float)sin((double)angle)));
- vectorY = (int) (originY + (radius*(float)cos((double)angle)));
- glVertex2d(originX, originY);
- glVertex2d(vectorX1, vectorY1);
- glVertex2d(vectorX, vectorY);
- vectorY1 = vectorY;
- vectorX1 = vectorX;
- }
- glEnd();
-}
-
-void CGUIWindowTestPatternGL::BeginRender()
-{
- glDisable(GL_TEXTURE_2D);
- glDisable(GL_BLEND);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-}
-
-void CGUIWindowTestPatternGL::EndRender()
-{
-
-}
diff --git a/xbmc/rendering/gl/GUIWindowTestPatternGL.h b/xbmc/rendering/gl/GUIWindowTestPatternGL.h
deleted file mode 100644
index 7665722270..0000000000
--- a/xbmc/rendering/gl/GUIWindowTestPatternGL.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2005-2018 Team Kodi
- * This file is part of Kodi - https://kodi.tv
- *
- * Test patterns designed by Ofer LaOr - hometheater.co.il
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- * See LICENSES/README.md for more information.
- */
-
-#pragma once
-
-#include "settings/windows/GUIWindowTestPattern.h"
-
-class CGUIWindowTestPatternGL : public CGUIWindowTestPattern
-{
-public:
- CGUIWindowTestPatternGL(void);
- ~CGUIWindowTestPatternGL(void) override;
-
-private:
- void DrawVerticalLines(int top, int left, int bottom, int right) override;
- void DrawHorizontalLines(int top, int left, int bottom, int right) override;
- void DrawCheckers(int top, int left, int bottom, int right) override;
- void DrawBouncingRectangle(int top, int left, int bottom, int right) override;
- void DrawContrastBrightnessPattern(int top, int left, int bottom, int right) override;
- void DrawCircle(int originX, int originY, int radius) override;
- void BeginRender() override;
- void EndRender() override;
-};
-
diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp
index 4e66fc55e9..1da4b9cdf9 100644
--- a/xbmc/settings/AdvancedSettings.cpp
+++ b/xbmc/settings/AdvancedSettings.cpp
@@ -321,6 +321,7 @@ void CAdvancedSettings::Initialize()
m_videoTvShowExtraArt = {};
m_videoTvSeasonExtraArt = {};
m_videoMovieExtraArt = {};
+ m_videoMovieSetExtraArt = {};
m_videoMusicVideoExtraArt = {};
m_iEpgUpdateCheckInterval = 300; /* check if tables need to be updated every 5 minutes */
@@ -800,6 +801,7 @@ void CAdvancedSettings::ParseSettingsFile(const std::string &file)
SetExtraArtwork(pElement->FirstChildElement("tvshowextraart"), m_videoTvShowExtraArt);
SetExtraArtwork(pElement->FirstChildElement("tvseasonextraart"), m_videoTvSeasonExtraArt);
SetExtraArtwork(pElement->FirstChildElement("movieextraart"), m_videoMovieExtraArt);
+ SetExtraArtwork(pElement->FirstChildElement("moviesetextraart"), m_videoMovieSetExtraArt);
SetExtraArtwork(pElement->FirstChildElement("musicvideoextraart"), m_videoMusicVideoExtraArt);
}
diff --git a/xbmc/settings/AdvancedSettings.h b/xbmc/settings/AdvancedSettings.h
index d74575a8c9..2c353d476b 100644
--- a/xbmc/settings/AdvancedSettings.h
+++ b/xbmc/settings/AdvancedSettings.h
@@ -269,6 +269,7 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler
std::vector<std::string> m_videoTvShowExtraArt;
std::vector<std::string> m_videoTvSeasonExtraArt;
std::vector<std::string> m_videoMovieExtraArt;
+ std::vector<std::string> m_videoMovieSetExtraArt;
std::vector<std::string> m_videoMusicVideoExtraArt;
bool m_bVideoScannerIgnoreErrors;
diff --git a/xbmc/settings/windows/CMakeLists.txt b/xbmc/settings/windows/CMakeLists.txt
index b258610875..c1b69ac04f 100644
--- a/xbmc/settings/windows/CMakeLists.txt
+++ b/xbmc/settings/windows/CMakeLists.txt
@@ -1,13 +1,11 @@
set(SOURCES GUIControlSettings.cpp
GUIWindowSettings.cpp
GUIWindowSettingsCategory.cpp
- GUIWindowSettingsScreenCalibration.cpp
- GUIWindowTestPattern.cpp)
+ GUIWindowSettingsScreenCalibration.cpp)
set(HEADERS GUIControlSettings.h
GUIWindowSettings.h
GUIWindowSettingsCategory.h
- GUIWindowSettingsScreenCalibration.h
- GUIWindowTestPattern.h)
+ GUIWindowSettingsScreenCalibration.h)
core_add_library(settings_windows)
diff --git a/xbmc/settings/windows/GUIWindowTestPattern.cpp b/xbmc/settings/windows/GUIWindowTestPattern.cpp
deleted file mode 100644
index a391413975..0000000000
--- a/xbmc/settings/windows/GUIWindowTestPattern.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (C) 2005-2018 Team Kodi
- * This file is part of Kodi - https://kodi.tv
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- * See LICENSES/README.md for more information.
- */
-
-#include "GUIWindowTestPattern.h"
-#include "ServiceBroker.h"
-#include "input/Key.h"
-#include "guilib/GUIMessage.h"
-#include "guilib/WindowIDs.h"
-#include "windowing/WinSystem.h"
-
-
-CGUIWindowTestPattern::CGUIWindowTestPattern(void)
- : CGUIWindow(WINDOW_TEST_PATTERN, "")
-{
- m_pattern = 0;
- m_bounceX = 0;
- m_bounceY = 0;
- m_bounceDirectionX = 0;
- m_bounceDirectionY = 0;
- m_blinkFrame = 0;
- m_needsScaling = false;
-}
-
-CGUIWindowTestPattern::~CGUIWindowTestPattern(void) = default;
-
-
-bool CGUIWindowTestPattern::OnAction(const CAction &action)
-{
- switch (action.GetID())
- {
- case ACTION_MOVE_UP:
- case ACTION_MOVE_LEFT:
- m_pattern = m_pattern > 0 ? m_pattern - 1 : TEST_PATTERNS_COUNT - 1;
- SetInvalid();
- return true;
-
- case ACTION_MOVE_DOWN:
- case ACTION_MOVE_RIGHT:
- m_pattern = (m_pattern + 1) % TEST_PATTERNS_COUNT;
- SetInvalid();
- return true;
- }
- return CGUIWindow::OnAction(action); // base class to handle basic movement etc.
-}
-
-bool CGUIWindowTestPattern::OnMessage(CGUIMessage& message)
-{
- switch (message.GetMessage())
- {
- case GUI_MSG_WINDOW_INIT:
- m_pattern = 0;
- m_bounceDirectionX = 1;
- m_bounceDirectionY = 1;
- m_bounceX = 0;
- m_bounceY = 0;
- m_blinkFrame = 0;
- break;
-
- }
- return CGUIWindow::OnMessage(message);
-}
-
-void CGUIWindowTestPattern::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions)
-{
- if (m_pattern == 0 || m_pattern == 4)
- MarkDirtyRegion();
- CGUIWindow::Process(currentTime, dirtyregions);
- m_renderRegion.SetRect(0, 0, (float)CServiceBroker::GetWinSystem()->GetGfxContext().GetWidth(), (float)CServiceBroker::GetWinSystem()->GetGfxContext().GetHeight());
-
-#ifndef HAS_DX
- if(CServiceBroker::GetWinSystem()->UseLimitedColor())
- {
- m_white = 235.0f / 255;
- m_black = 16.0f / 255;
- }
- else
-#endif
- {
- m_white = 1.0f;
- m_black = 0.0f;
- }
-}
-
-void CGUIWindowTestPattern::Render()
-{
- BeginRender();
- const RESOLUTION_INFO info = CServiceBroker::GetWinSystem()->GetGfxContext().GetResInfo();
-
- int top = info.Overscan.top;
- int bottom = info.Overscan.bottom;
- int left = info.Overscan.left;
- int right = info.Overscan.right;
-
- switch (m_pattern)
- {
- case 0:
- DrawContrastBrightnessPattern(top, left, bottom, right);
- break;
-
- case 1:
- DrawVerticalLines(top, left, bottom, right);
- break;
-
- case 2:
- DrawHorizontalLines(top, left, bottom, right);
- break;
-
- case 3:
- DrawCheckers(top, left, bottom, right);
- break;
-
- case 4:
- DrawBouncingRectangle(top, left, bottom, right);
- break;
- }
-
- EndRender();
-
- CGUIWindow::Render();
-}
-
diff --git a/xbmc/settings/windows/GUIWindowTestPattern.h b/xbmc/settings/windows/GUIWindowTestPattern.h
deleted file mode 100644
index 7a96cdef29..0000000000
--- a/xbmc/settings/windows/GUIWindowTestPattern.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2005-2018 Team Kodi
- * This file is part of Kodi - https://kodi.tv
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- * See LICENSES/README.md for more information.
- */
-
-#pragma once
-
-#include "guilib/GUIWindow.h"
-
-#define TEST_PATTERNS_COUNT 5
-#define TEST_PATTERNS_BOUNCE_SQUARE_SIZE 100
-#define TEST_PATTERNS_BLINK_CYCLE 100
-
-class CGUIWindowTestPattern : public CGUIWindow
-{
-public:
- CGUIWindowTestPattern(void);
- ~CGUIWindowTestPattern(void) override;
- bool OnMessage(CGUIMessage& message) override;
- bool OnAction(const CAction &action) override;
- void Render() override;
- void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions) override;
-
-protected:
- virtual void DrawVerticalLines(int top, int left, int bottom, int right) = 0;
- virtual void DrawHorizontalLines(int top, int left, int bottom, int right) = 0;
- virtual void DrawCheckers(int top, int left, int bottom, int right) = 0;
- virtual void DrawBouncingRectangle(int top, int left, int bottom, int right) = 0;
- virtual void DrawContrastBrightnessPattern(int top, int left, int bottom, int right) = 0;
- virtual void DrawCircle(int originX, int originY, int radius) = 0;
- virtual void BeginRender() = 0;
- virtual void EndRender() = 0;
-
- int m_pattern;
- int m_bounceX;
- int m_bounceY;
- int m_bounceDirectionX;
- int m_bounceDirectionY;
- int m_blinkFrame;
-
- float m_white = 1.0;
- float m_black = 0.0;
-};
-
-
diff --git a/xbmc/utils/FileUtils.cpp b/xbmc/utils/FileUtils.cpp
index 9036e912a9..9f19808b4e 100644
--- a/xbmc/utils/FileUtils.cpp
+++ b/xbmc/utils/FileUtils.cpp
@@ -23,6 +23,7 @@
#include "URL.h"
#include "settings/Settings.h"
#include "settings/SettingsComponent.h"
+#include "storage/MediaManager.h"
#include "utils/Variant.h"
#if defined(TARGET_WINDOWS)
@@ -138,13 +139,23 @@ bool CFileUtils::RemoteAccessAllowed(const std::string &strPath)
return true;
}
bool isSource;
+ // Check manually added sources (held in sources.xml)
for (const std::string& sourceName : SourceNames)
{
VECSOURCES* sources = CMediaSourceSettings::GetInstance().GetSources(sourceName);
int sourceIndex = CUtil::GetMatchingSource(realPath, *sources, isSource);
if (sourceIndex >= 0 && sourceIndex < (int)sources->size() && sources->at(sourceIndex).m_iHasLock != 2 && sources->at(sourceIndex).m_allowSharing)
return true;
- }
+ }
+ // Check auto-mounted sources
+ VECSOURCES sources;
+ g_mediaManager.GetRemovableDrives(sources); // Sources returned allways have m_allowsharing = true
+ //! @todo Make sharing of auto-mounted sources user configurable
+ int sourceIndex = CUtil::GetMatchingSource(realPath, sources, isSource);
+ if (sourceIndex >= 0 && sourceIndex < static_cast<int>(sources.size()) &&
+ sources.at(sourceIndex).m_iHasLock != 2 && sources.at(sourceIndex).m_allowSharing)
+ return true;
+
return false;
}
@@ -225,10 +236,12 @@ bool CFileUtils::CheckFileAccessAllowed(const std::string &filePath)
// ALLOW kodi paths
const std::vector<std::string> whitelist = {
CSpecialProtocol::TranslatePath("special://home"),
- CSpecialProtocol::TranslatePath("special://xbmc")
+ CSpecialProtocol::TranslatePath("special://xbmc"),
+ CSpecialProtocol::TranslatePath("special://musicartistsinfo")
};
// image urls come in the form of image://... sometimes with a / appended at the end
+ // and can be embedded in a music or video file image://music@...
// strip this off to get the real file path
bool isImage = false;
std::string decodePath = CURL::Decode(filePath);
@@ -238,6 +251,8 @@ bool CFileUtils::CheckFileAccessAllowed(const std::string &filePath)
isImage = true;
decodePath.erase(pos, 8);
URIUtils::RemoveSlashAtEnd(decodePath);
+ if (StringUtils::StartsWith(decodePath, "music@") || StringUtils::StartsWith(decodePath, "video@"))
+ decodePath.erase(pos, 6);
}
// check blacklist
diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp
index 668547a79f..13c6aab5ce 100644
--- a/xbmc/video/VideoDatabase.cpp
+++ b/xbmc/video/VideoDatabase.cpp
@@ -4515,7 +4515,7 @@ bool CVideoDatabase::HasArtForItem(int mediaId, const MediaType &mediaType)
if (NULL == m_pDB.get()) return false;
if (NULL == m_pDS2.get()) return false; // using dataset 2 as we're likely called in loops on dataset 1
- std::string sql = PrepareSQL("SELECT count(*) FROM art WHERE media_id=%i AND media_type='%s'", mediaId, mediaType.c_str());
+ std::string sql = PrepareSQL("SELECT 1 FROM art WHERE media_id=%i AND media_type='%s' LIMIT 1", mediaId, mediaType.c_str());
m_pDS2->query(sql);
bool result = !m_pDS2->eof();
m_pDS2->close();
diff --git a/xbmc/video/VideoInfoScanner.cpp b/xbmc/video/VideoInfoScanner.cpp
index 7f96553d49..470e97f803 100644
--- a/xbmc/video/VideoInfoScanner.cpp
+++ b/xbmc/video/VideoInfoScanner.cpp
@@ -1443,6 +1443,11 @@ namespace VIDEO
std::vector<std::string> artTypes = CVideoThumbLoader::GetArtTypes(ContentToMediaType(content, pItem->m_bIsFolder));
bool lookForThumb = find(artTypes.begin(), artTypes.end(), "thumb") == artTypes.end() &&
art.find("thumb") == art.end();
+ if (content == CONTENT_MOVIES)
+ {
+ for (std::string artType : CVideoThumbLoader::GetArtTypes(MediaTypeVideoCollection))
+ artTypes.push_back("set." + artType);
+ }
// find local art
if (useLocal)
{
diff --git a/xbmc/video/VideoThumbLoader.cpp b/xbmc/video/VideoThumbLoader.cpp
index 211cfa3de9..6000f65294 100644
--- a/xbmc/video/VideoThumbLoader.cpp
+++ b/xbmc/video/VideoThumbLoader.cpp
@@ -8,6 +8,7 @@
#include "VideoThumbLoader.h"
+#include <algorithm>
#include <cstdlib>
#include <utility>
@@ -223,36 +224,63 @@ std::vector<std::string> CVideoThumbLoader::GetArtTypes(const std::string &type)
{
const std::shared_ptr<CAdvancedSettings> advancedSettings = CServiceBroker::GetSettingsComponent()->GetAdvancedSettings();
std::vector<std::string> ret;
- std::vector<std::string> extraart;
if (type == MediaTypeEpisode)
{
- ret = { "thumb" };
- extraart = advancedSettings->m_videoEpisodeExtraArt;
+ ret = {"thumb"};
+ for (auto& artType : advancedSettings->m_videoEpisodeExtraArt)
+ {
+ if (find(ret.begin(), ret.end(), artType) == ret.end())
+ ret.push_back(artType);
+ }
}
else if (type == MediaTypeTvShow)
{
- ret = { "poster", "fanart", "banner" };
- extraart = advancedSettings->m_videoTvShowExtraArt;
+ ret = {"poster", "fanart", "banner"};
+ for (auto& artType : advancedSettings->m_videoTvShowExtraArt)
+ {
+ if (find(ret.begin(), ret.end(), artType) == ret.end())
+ ret.push_back(artType);
+ }
}
else if (type == MediaTypeSeason)
{
- ret = { "poster", "fanart", "banner" };
- extraart = advancedSettings->m_videoTvSeasonExtraArt;
+ ret = {"poster", "fanart", "banner"};
+ for (auto& artType : advancedSettings->m_videoTvSeasonExtraArt)
+ {
+ if (find(ret.begin(), ret.end(), artType) == ret.end())
+ ret.push_back(artType);
+ }
+ }
+ else if (type == MediaTypeMovie)
+ {
+ ret = {"poster", "fanart"};
+ for (auto& artType : advancedSettings->m_videoMovieExtraArt)
+ {
+ if (find(ret.begin(), ret.end(), artType) == ret.end())
+ ret.push_back(artType);
+ }
}
- else if (type == MediaTypeMovie || type == MediaTypeVideoCollection)
+ else if (type == MediaTypeVideoCollection)
{
- ret = { "poster", "fanart" };
- extraart = advancedSettings->m_videoMovieExtraArt;
+ ret = {"poster", "fanart"};
+ for (auto& artType : advancedSettings->m_videoMovieSetExtraArt)
+ {
+ if (find(ret.begin(), ret.end(), artType) == ret.end())
+ ret.push_back(artType);
+ }
}
else if (type == MediaTypeMusicVideo)
{
- ret = { "poster", "fanart" };
- extraart = advancedSettings->m_videoMusicVideoExtraArt;
+ ret = {"poster", "fanart"};
+ for (auto& artType : advancedSettings->m_videoMusicVideoExtraArt)
+ {
+ if (find(ret.begin(), ret.end(), artType) == ret.end())
+ ret.push_back(artType);
+ }
}
else if (type.empty()) // unknown, just the basics
ret = { "poster", "fanart", "banner", "thumb" };
- ret.insert(ret.end(), extraart.begin(), extraart.end());
return ret;
}