diff options
78 files changed, 1792 insertions, 1325 deletions
diff --git a/.gitignore b/.gitignore index 19c200efe5..4fb64a22fe 100644 --- a/.gitignore +++ b/.gitignore @@ -288,7 +288,6 @@ cmake_install.cmake /tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh /tools/darwin/packaging/osx/mkdmg-osx.sh /tools/darwin/packaging/osx/VolumeIcon.icns -/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh /tools/darwin/packaging/seatbeltunlock/mkdeb-seatbeltunlock.sh /tools/darwin/runtime/XBMCHelper diff --git a/addons/metadata.local/addon.xml b/addons/metadata.local/addon.xml index 897277b662..546fe134a7 100755 --- a/addons/metadata.local/addon.xml +++ b/addons/metadata.local/addon.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <addon id="metadata.local" name="Local information only" - version="1.0.0" + version="1.0.1" provider-name="Team Kodi"> <requires> <import addon="xbmc.metadata" version="1.0"/> @@ -22,8 +22,12 @@ language="multi" library="local.xml"/> <extension point="xbmc.addon.metadata"> - <summary lang="en">Local Infomation only pseudo-scraper</summary> - <description lang="en">Use local information only</description> + <summary lang="en_GB">Local Infomation only pseudo-scraper</summary> + <description lang="en_GB">Use local information only</description> <platform>all</platform> + <license>GPL-2.0-only</license> + <assets> + <icon>icon.png</icon> + </assets> </extension> </addon> diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po index 2bce2babdc..dc73e73828 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -15838,7 +15838,41 @@ msgstr "" #24171-24179 reserved for future use of lifecycle state name (to have continuous chain of GUI) -#empty strings from id 24180 to 24990 +#. The minimum version a dependency must meet. This is set in the <requires> tag of the dependee +#. {3:s} reserved for an empty string or the " (optional)" optional string. see #24184 +#: xbmc/addons/GUIDialogAddonInfo.cpp +msgctxt "#24180" +msgid "Minimum: {0:s}{3:s}" +msgstr "" + +#. The minimum version, plus the version going to be installed +#. {3:s} reserved for an empty string or the " (optional)" optional string. see #24184 +#: xbmc/addons/gui/GUIDialogAddonInfo.cpp +msgctxt "#24181" +msgid "Minimum: {0:s} => Install: {2:s}{3:s}" +msgstr "" + +#. The minimum version, plus the currently installed version +#. {3:s} reserved for an empty string or the " (optional)" optional string. see #24184 +#: xbmc/addons/gui/GUIDialogAddonInfo.cpp +msgctxt "#24182" +msgid "Minimum: {0:s} / Installed: {1:s}{3:s}" +msgstr "" + +#. The minimum version, the currently installed, plus the updated version we're going to install +#. {3:s} reserved for an empty string or the " (optional)" optional string. see #24184 +#: xbmc/addons/gui/GUIDialogAddonInfo.cpp +msgctxt "#24183" +msgid "Minimum: {0:s} / Installed: {1:s} => Update to: {2:s}{3:s}" +msgstr "" + +#. used in #24180 - #24183 as {3:s} +#: xbmc/addons/gui/GUIDialogAddonInfo.cpp +msgctxt "#24184" +msgid " (optional)" +msgstr "" + +#empty strings from id 24185 to 24990 #. Used as error message in add-on browser when add-on repository data could not be downloaded #: xbmc/filesystem/AddonsDirectory.cpp diff --git a/addons/skin.estuary/xml/DialogSeekBar.xml b/addons/skin.estuary/xml/DialogSeekBar.xml index eb96b586e8..0eb1b90a59 100644 --- a/addons/skin.estuary/xml/DialogSeekBar.xml +++ b/addons/skin.estuary/xml/DialogSeekBar.xml @@ -143,32 +143,6 @@ </include> </control> </control> - <control type="label"> - <centertop>145</centertop> - <right>20</right> - <width>400</width> - <height>100</height> - <align>right</align> - <aligny>center</aligny> - <font>font13</font> - <wrapmultiline>true</wrapmultiline> - <animation effect="fade" time="200">VisibleChange</animation> - <label>$INFO[Player.TimeRemaining,[COLOR button_focus]$LOCALIZE[31134]:[CR][/COLOR]]</label> - <visible>![Player.ShowInfo | Window.IsVisible(playerprocessinfo) | VideoPlayer.HasEpg] + !Window.IsActive(fullscreeninfo)</visible> - </control> - <control type="label"> - <centertop>125</centertop> - <right>20</right> - <width>400</width> - <height>100</height> - <align>right</align> - <aligny>center</aligny> - <font>font13</font> - <wrapmultiline>true</wrapmultiline> - <animation effect="fade" time="200">VisibleChange</animation> - <label>$INFO[PVR.EpgEventRemainingTime,[COLOR button_focus]$LOCALIZE[31134]:[CR][/COLOR]]</label> - <visible>![Player.ShowInfo | Window.IsVisible(playerprocessinfo)] + VideoPlayer.HasEpg + !Window.IsActive(fullscreeninfo)</visible> - </control> </control> <control type="label"> <centerleft>50%</centerleft> diff --git a/addons/skin.estuary/xml/Includes_DialogSelect.xml b/addons/skin.estuary/xml/Includes_DialogSelect.xml index 3cc6d7d76d..72197556cb 100644 --- a/addons/skin.estuary/xml/Includes_DialogSelect.xml +++ b/addons/skin.estuary/xml/Includes_DialogSelect.xml @@ -66,9 +66,9 @@ </control> <control type="textbox"> <left>135</left> - <top>52</top> + <top>50</top> <right>20</right> - <height>65</height> + <height>67</height> <font>font12</font> <textcolor>grey</textcolor> <label>$INFO[ListItem.Label2]</label> @@ -103,9 +103,9 @@ </control> <control type="textbox"> <left>135</left> - <top>52</top> + <top>50</top> <right>20</right> - <height>65</height> + <height>67</height> <font>font12</font> <label>$INFO[ListItem.Label2]</label> </control> diff --git a/addons/skin.estuary/xml/MusicVisualisation.xml b/addons/skin.estuary/xml/MusicVisualisation.xml index e19dc3d48f..23a2da5411 100644 --- a/addons/skin.estuary/xml/MusicVisualisation.xml +++ b/addons/skin.estuary/xml/MusicVisualisation.xml @@ -44,7 +44,7 @@ <bottom>0</bottom> <control type="image"> <left>0</left> - <width>100%</width> + <width>120%</width> <height>280</height> <texture colordiffuse="80FFFFFF">dialogs/dialog-bg-nobo.png</texture> </control> diff --git a/cmake/scripts/darwin_embedded/Install.cmake b/cmake/scripts/darwin_embedded/Install.cmake index af18277a5e..02464eef9f 100644 --- a/cmake/scripts/darwin_embedded/Install.cmake +++ b/cmake/scripts/darwin_embedded/Install.cmake @@ -122,11 +122,6 @@ endif() set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..) configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in ${CMAKE_BINARY_DIR}/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh @ONLY) - -if(CORE_PLATFORM_NAME_LC STREQUAL ios) - configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh.in - ${CMAKE_BINARY_DIR}/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh @ONLY) -endif() add_custom_target(deb COMMAND sh ./mkdeb-darwin_embedded.sh ${CORE_BUILD_CONFIG} diff --git a/system/keymaps/keyboard.xml b/system/keymaps/keyboard.xml index 694b6b10cc..89523629ca 100644 --- a/system/keymaps/keyboard.xml +++ b/system/keymaps/keyboard.xml @@ -442,6 +442,8 @@ <d mod="ctrl">Back</d> <m>OSD</m> <menu>OSD</menu> + <return mod="longpress">PlayPause</return> + <enter mod="longpress">PlayPause</enter> </keyboard> </FullscreenInfo> <PlayerControls> diff --git a/system/shaders/GL/1.5/gl_tonemap.glsl b/system/shaders/GL/1.5/gl_tonemap.glsl index bcec4e6550..a70dca2f97 100644 --- a/system/shaders/GL/1.5/gl_tonemap.glsl +++ b/system/shaders/GL/1.5/gl_tonemap.glsl @@ -1,4 +1,50 @@ -float tonemap(float val) +#if (defined(KODI_TONE_MAPPING_REINHARD) || defined(KODI_TONE_MAPPING_ACES) || defined(KODI_TONE_MAPPING_HABLE)) +const float ST2084_m1 = 2610.0 / (4096.0 * 4.0); +const float ST2084_m2 = (2523.0 / 4096.0) * 128.0; +const float ST2084_c1 = 3424.0 / 4096.0; +const float ST2084_c2 = (2413.0 / 4096.0) * 32.0; +const float ST2084_c3 = (2392.0 / 4096.0) * 32.0; +#endif + +#if defined(KODI_TONE_MAPPING_REINHARD) +float reinhard(float x) { - return val * (1 + val/(m_toneP1*m_toneP1))/(1 + val); + return x * (1.0 + x / (m_toneP1 * m_toneP1)) / (1.0 + x); } +#endif + +#if defined(KODI_TONE_MAPPING_ACES) +vec3 aces(vec3 x) +{ + float A = 2.51; + float B = 0.03; + float C = 2.43; + float D = 0.59; + float E = 0.14; + return (x * (A * x + B)) / (x * (C * x + D) + E); +} +#endif + +#if defined(KODI_TONE_MAPPING_HABLE) +vec3 hable(vec3 x) +{ + float A = 0.15; + float B = 0.5; + float C = 0.1; + float D = 0.2; + float E = 0.02; + float F = 0.3; + return ((x * (A * x + C * B) + D * E) / (x * (A * x + B) + D * F)) - E / F; +} +#endif + +#if (defined(KODI_TONE_MAPPING_ACES) || defined(KODI_TONE_MAPPING_HABLE)) +vec3 inversePQ(vec3 x) +{ + x = pow(max(x, 0.0), vec3(1.0 / ST2084_m2)); + x = max(x - ST2084_c1, 0.0) / (ST2084_c2 - ST2084_c3 * x); + x = pow(x, vec3(1.0 / ST2084_m1)); + return x; +} +#endif + diff --git a/system/shaders/GL/1.5/gl_yuv2rgb_basic.glsl b/system/shaders/GL/1.5/gl_yuv2rgb_basic.glsl index 5bd2565ac2..7d5605c9cd 100644 --- a/system/shaders/GL/1.5/gl_yuv2rgb_basic.glsl +++ b/system/shaders/GL/1.5/gl_yuv2rgb_basic.glsl @@ -16,6 +16,7 @@ uniform mat3 m_primMat; uniform float m_gammaDstInv; uniform float m_gammaSrc; uniform float m_toneP1; +uniform float m_luminance; uniform vec3 m_coefsDst; in vec2 m_cordY; in vec2 m_cordU; @@ -97,9 +98,23 @@ vec4 process() rgb.rgb = max(vec3(0), m_primMat * rgb.rgb); rgb.rgb = pow(rgb.rgb, vec3(m_gammaDstInv)); -#if defined(XBMC_TONE_MAPPING) +#if defined(KODI_TONE_MAPPING_REINHARD) float luma = dot(rgb.rgb, m_coefsDst); - rgb.rgb *= tonemap(luma) / luma; + rgb.rgb *= reinhard(luma) / luma; + +#elif defined(KODI_TONE_MAPPING_ACES) + rgb.rgb = inversePQ(rgb.rgb); + rgb.rgb *= (10000.0 / m_luminance) * (2.0 / m_toneP1); + rgb.rgb = aces(rgb.rgb); + rgb.rgb *= (1.24 / m_toneP1); + rgb.rgb = pow(rgb.rgb, vec3(0.27)); + +#elif defined(KODI_TONE_MAPPING_HABLE) + rgb.rgb = inversePQ(rgb.rgb); + rgb.rgb *= m_toneP1; + float wp = m_luminance / 100.0; + rgb.rgb = hable(rgb.rgb * wp) / hable(vec3(wp)); + rgb.rgb = pow(rgb.rgb, vec3(1.0 / 2.2)); #endif #endif diff --git a/system/shaders/output_d3d.fx b/system/shaders/output_d3d.fx index 6a251b0723..9e4f250850 100644 --- a/system/shaders/output_d3d.fx +++ b/system/shaders/output_d3d.fx @@ -42,16 +42,15 @@ SamplerState DitherSampler : IMMUTABLE }; #endif #if (defined(KODI_TONE_MAPPING_ACES) || defined(KODI_TONE_MAPPING_HABLE) || defined(KODI_HLG_TO_PQ)) -const float ST2084_m1 = 2610.0f / (4096.0f * 4.0f); -const float ST2084_m2 = (2523.0f / 4096.0f) * 128.0f; -const float ST2084_c1 = 3424.0f / 4096.0f; -const float ST2084_c2 = (2413.0f / 4096.0f) * 32.0f; -const float ST2084_c3 = (2392.0f / 4096.0f) * 32.0f; +static const float ST2084_m1 = 2610.0f / (4096.0f * 4.0f); +static const float ST2084_m2 = (2523.0f / 4096.0f) * 128.0f; +static const float ST2084_c1 = 3424.0f / 4096.0f; +static const float ST2084_c2 = (2413.0f / 4096.0f) * 32.0f; +static const float ST2084_c3 = (2392.0f / 4096.0f) * 32.0f; #endif #if defined(KODI_TONE_MAPPING_REINHARD) float g_toneP1; float3 g_coefsDst; -float g_luminance; float reinhard(float x) { @@ -73,8 +72,8 @@ float3 aces(float3 x) } #endif #if defined(KODI_TONE_MAPPING_HABLE) -float g_luminance; float g_toneP1; +float g_toneP2; float3 hable(float3 x) { @@ -136,8 +135,7 @@ float4 output4(float4 color, float2 uv) #if defined(KODI_TONE_MAPPING_HABLE) color.rgb = inversePQ(color.rgb); color.rgb *= g_toneP1; - float wp = g_luminance / 100.0f; - color.rgb = hable(color.rgb * wp) / hable(wp); + color.rgb = hable(color.rgb * g_toneP2) / hable(g_toneP2); color.rgb = pow(color.rgb, 1.0f / 2.2f); #endif #if defined(KODI_HLG_TO_PQ) diff --git a/tools/Linux/kodi.sh.in b/tools/Linux/kodi.sh.in index 6899a47c1e..aaf2f4ff7f 100644 --- a/tools/Linux/kodi.sh.in +++ b/tools/Linux/kodi.sh.in @@ -59,18 +59,6 @@ fi APPORT_CORE="/var/crash/$(echo -n ${KODI_BINARY}|tr / _).$(id -u).crash" -migrate_home() -{ - [ "$(basename $0)" = "xbmc" ] && echo "WARNING: Running ${bin_name} as "xbmc" is deprecated and will be removed in later versions, please switch to using the ${bin_name} binary" - - #check if data migration is needed - if [ -d "${HOME}/.xbmc" ] && [ ! -d "${KODI_DATA}" ]; then - echo "INFO: migrating userdata folder. Renaming ${HOME}/.xbmc to $KODI_DATA" - mv ${HOME}/.xbmc $KODI_DATA - touch ${KODI_DATA}/.kodi_data_was_migrated - fi -} - command_exists() { command -pv $1 >/dev/null 2>&1 @@ -172,8 +160,6 @@ propagate_sigterm() { trap propagate_sigterm TERM -migrate_home - if command_exists gdb; then # Output warning in case ulimit is unsupported by shell eval ulimit -c unlimited diff --git a/tools/android/packaging/xbmc/AndroidManifest.xml.in b/tools/android/packaging/xbmc/AndroidManifest.xml.in index 2f5bf76023..51cbf5210f 100644 --- a/tools/android/packaging/xbmc/AndroidManifest.xml.in +++ b/tools/android/packaging/xbmc/AndroidManifest.xml.in @@ -7,7 +7,7 @@ <uses-sdk android:minSdkVersion="21" - android:targetSdkVersion="26" /> + android:targetSdkVersion="29" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.INTERNET" /> @@ -49,6 +49,7 @@ android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:logo="@drawable/banner"> + android:requestLegacyExternalStorage="true"> <activity android:name=".Splash" android:configChanges="orientation|keyboard|keyboardHidden|navigation|touchscreen|screenLayout|screenSize|colorMode" diff --git a/tools/android/packaging/xbmc/build.gradle.in b/tools/android/packaging/xbmc/build.gradle.in index 6b64c424b0..3554caf159 100644 --- a/tools/android/packaging/xbmc/build.gradle.in +++ b/tools/android/packaging/xbmc/build.gradle.in @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 28 - buildToolsVersion "28.0.3" + compileSdkVersion 29 + buildToolsVersion "29.0.3" defaultConfig { applicationId "@APP_PACKAGE@" minSdkVersion 21 - targetSdkVersion 28 + targetSdkVersion 29 versionCode @APP_VERSION_CODE_ANDROID@ versionName "@APP_VERSION@" } diff --git a/tools/android/packaging/xbmc/src/Splash.java.in b/tools/android/packaging/xbmc/src/Splash.java.in index 4cbe9ca6a7..66dca26f24 100644 --- a/tools/android/packaging/xbmc/src/Splash.java.in +++ b/tools/android/packaging/xbmc/src/Splash.java.in @@ -196,7 +196,6 @@ public class Splash extends Activity else { SetupEnvironment(); - MigrateUserData(); if (mState == InError) { @@ -626,55 +625,6 @@ public class Splash extends Activity } } - private void MigrateUserData() - { - String sOldUserDir; - File fOldUserDir; - try - { - sOldUserDir = getExternalFilesDir(null).getParentFile().getParentFile() + "/org.xbmc.xbmc/files/.xbmc"; - fOldUserDir = new File(sOldUserDir); - if (!fOldUserDir.exists()) - return; - } - catch (Exception e) - { - return; - } - - File fNewUserDir = new File(getExternalFilesDir(null), ".@APP_NAME_LC@"); - String s@APP_NAME@Migrated = fNewUserDir.getAbsolutePath() + "/.@APP_NAME_LC@_data_was_migrated"; - File f@APP_NAME@Migrated = new File(s@APP_NAME@Migrated); - - Log.d(TAG, "External_dir = " + fOldUserDir); - if (fOldUserDir.exists() && !fNewUserDir.exists()) - { - Log.d(TAG, "XBMC user data detected at " + fOldUserDir.getAbsolutePath() + ", migrating to " + fNewUserDir.getAbsolutePath()); - if (!fNewUserDir.getParentFile().exists() && !fNewUserDir.getParentFile().mkdirs()) - { - Log.d(TAG, "Error creating " + fNewUserDir.getParentFile().getAbsolutePath()); - return; - } - if (fOldUserDir.renameTo(fNewUserDir)) - { - try - { - new FileOutputStream(f@APP_NAME@Migrated).close(); - } - catch (IOException e1) - { - e1.printStackTrace(); - } - Log.d(TAG, "XBMC user data migrated to @APP_NAME@ successfully"); - } - else - { - Log.d(TAG, "Error migrating XBMC user data"); - } - } - } - - private boolean ParseCpuFeature() { ProcessBuilder cmd; @@ -951,7 +901,6 @@ public class Splash extends Activity mState = ChecksDone; SetupEnvironment(); - MigrateUserData(); if ((mState != DownloadingObb && mState != InError) && fXbmcHome.exists() && fXbmcHome.lastModified() >= fPackagePath.lastModified() && !mInstallLibs) { diff --git a/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh.in b/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh.in deleted file mode 100644 index be9155fa8c..0000000000 --- a/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh.in +++ /dev/null @@ -1,30 +0,0 @@ -APP_NAME=@APP_NAME@ -XBMC_HOME="/var/mobile/Library/Preferences/XBMC" -APP_HOME="/var/mobile/Library/Preferences/@APP_NAME@" - - -function needs_kodi_migration () { - #check if there is an old XBMC folder to migrate - if test -d "$XBMC_HOME" && test ! -d "$APP_HOME" - then - return "1"; - else - return "0"; - fi -} - -function migrate_to_kodi () { - echo "moving settings from $XBMC_HOME to $APP_HOME" - mv $XBMC_HOME $APP_HOME - chown -R mobile.mobile $APP_HOME - echo "Migration complete" - touch $APP_HOME/.kodi_data_was_migrated -} - -needs_kodi_migration -NEEDS_MIGRATION=$? -if [ "$NEEDS_MIGRATION" == "1" ] -then - echo "This is the first time you install @APP_NAME@ and we detected that you have an old XBMC configuration. Your XBMC configuration will now be migrated to @APP_NAME@ by moving the settings folder. If you ever want to go back to XBMC please backup /var/mobile/Library/Preferences/@APP_NAME@ after this installation has finished and rename it to XBMC in case you downgrade to XBMC." - migrate_to_kodi -fi diff --git a/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in b/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in index 78cb87aada..0d318be595 100644 --- a/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in +++ b/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in @@ -96,9 +96,6 @@ chmod +x $DIRNAME/$PACKAGE/DEBIAN/prerm # postinst: nothing for now. echo "#!/bin/sh" > $DIRNAME/$PACKAGE/DEBIAN/postinst echo "chown -R mobile:mobile /Applications/@APP_NAME@.app" >> $DIRNAME/$PACKAGE/DEBIAN/postinst -if [ "@PLATFORM@" != "appletvos" ]; then - cat $DIRNAME/migrate_to_kodi.sh >> $DIRNAME/$PACKAGE/DEBIAN/postinst -fi echo "/usr/bin/uicache" >> $DIRNAME/$PACKAGE/DEBIAN/postinst echo "echo 'finish:respringing ...'" >> $DIRNAME/$PACKAGE/DEBIAN/postinst chmod +x $DIRNAME/$PACKAGE/DEBIAN/postinst diff --git a/tools/darwin/runtime/preflight b/tools/darwin/runtime/preflight index e30336630a..d9311f5d1e 100755 --- a/tools/darwin/runtime/preflight +++ b/tools/darwin/runtime/preflight @@ -16,19 +16,6 @@ sub get_extras { return; } -sub get_xbmc_home { - my $os = get_os(); - my $home = get_home(); - return if !defined $home; - if ( $os eq "osx" ) { - return $home."/Library/Application Support/XBMC"; - } - elsif ( $os eq "linux" ) { - return $home."/.xbmc"; - } - return; -} - sub get_app_home { my $os = get_os(); my $home = get_home(); @@ -161,16 +148,6 @@ sub first_app_version_run() { return; } -sub needs_kodi_migration() { - my $xbmchome = get_xbmc_home(); - my $apphome = get_app_home(); - #check if there is an old XBMC folder to migrate - if ( -d "$xbmchome" && ! -d "$apphome" ) { - return 1; - } - return; -} - sub setup_default_app() { my $extras = get_extras(); my $apphome = get_app_home(); @@ -196,19 +173,6 @@ sub setup_version_app() { #TODO } -#migration from XBMC to Kodi -sub migrate_to_kodi() { - my $xbmchome = get_xbmc_home(); - my $apphome = get_app_home(); - print "mv $xbmchome $apphome"; - `mv "$xbmchome" "$apphome"`; - `touch -f "$apphome/.kodi_data_was_migrated"`; -} - -if (needs_kodi_migration()) { - migrate_to_kodi(); -} - if (first_app_run()) { setup_default_app(); } diff --git a/tools/depends/target/darwin-embedded-entitlements/darwin_embedded_entitlements.xml b/tools/depends/target/darwin-embedded-entitlements/darwin_embedded_entitlements.xml index ca7826950b..9b60556849 100644 --- a/tools/depends/target/darwin-embedded-entitlements/darwin_embedded_entitlements.xml +++ b/tools/depends/target/darwin-embedded-entitlements/darwin_embedded_entitlements.xml @@ -28,5 +28,11 @@ <string>com.apple.identities</string> <string>com.apple.mobilesafari</string> </array> + <key>com.apple.security.iokit-user-client-class</key> + <array> + <string>AGXDeviceUserClient</string> + <string>IOHDIXControllerUserClient</string> + <string>IOSurfaceRootUserClient</string> + </array> </dict> </plist> diff --git a/tools/depends/target/ffmpeg/FFMPEG-VERSION b/tools/depends/target/ffmpeg/FFMPEG-VERSION index ae224efe31..9017251829 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.3.1-Matrix-Alpha1-2 +VERSION=4.3.1-Matrix-Beta1 ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index fb4978c27c..35de935a74 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -93,6 +93,8 @@ #include "windowing/WinSystem.h" #include "windowing/WindowSystemFactory.h" +#include <cmath> + #ifdef HAS_UPNP #include "network/upnp/UPnP.h" #include "filesystem/UPnPDirectory.h" @@ -2885,7 +2887,7 @@ bool CApplication::PlayFile(CFileItem item, const std::string& player, bool bRes CVideoDatabase dbs; dbs.Open(); - std::string path = item.GetPath(); + std::string path = item.GetDynPath(); std::string videoInfoTagPath(item.GetVideoInfoTag()->m_strFileNameAndPath); if (videoInfoTagPath.find("removable://") == 0) path = videoInfoTagPath; @@ -4449,7 +4451,7 @@ float CApplication::GetVolumeRatio() const void CApplication::VolumeChanged() { CVariant data(CVariant::VariantTypeObject); - data["volume"] = GetVolumePercent(); + data["volume"] = static_cast<int>(std::lroundf(GetVolumePercent())); data["muted"] = m_muted; CServiceBroker::GetAnnouncementManager()->Announce(ANNOUNCEMENT::Application, "OnVolumeChanged", data); diff --git a/xbmc/addons/AddonInstaller.cpp b/xbmc/addons/AddonInstaller.cpp index 5f2cbc45e9..6db0160e6a 100644 --- a/xbmc/addons/AddonInstaller.cpp +++ b/xbmc/addons/AddonInstaller.cpp @@ -196,14 +196,15 @@ bool CAddonInstaller::InstallOrUpdate(const std::string& addonID, if (!CAddonInstallJob::GetAddon(addonID, repo, addon)) return false; - return DoInstall(addon, repo, background, modal, AutoUpdateJob::NO, DependencyJob::NO); + return DoInstall(addon, repo, background, modal, AutoUpdateJob::NO, DependencyJob::NO, + AllowCheckForUpdates::YES); } bool CAddonInstaller::InstallOrUpdateDependency(const ADDON::AddonPtr& dependsId, const ADDON::RepositoryPtr& repo) { return DoInstall(dependsId, repo, BackgroundJob::NO, ModalJob::NO, AutoUpdateJob::NO, - DependencyJob::YES); + DependencyJob::YES, AllowCheckForUpdates::YES); } bool CAddonInstaller::Install(const std::string& addonId, @@ -224,7 +225,7 @@ bool CAddonInstaller::Install(const std::string& addonId, return false; return DoInstall(addon, std::static_pointer_cast<CRepository>(repo), BackgroundJob::YES, - ModalJob::NO, AutoUpdateJob::NO, DependencyJob::NO); + ModalJob::NO, AutoUpdateJob::NO, DependencyJob::NO, AllowCheckForUpdates::YES); } bool CAddonInstaller::DoInstall(const AddonPtr& addon, @@ -232,7 +233,8 @@ bool CAddonInstaller::DoInstall(const AddonPtr& addon, BackgroundJob background, ModalJob modal, AutoUpdateJob autoUpdate, - DependencyJob dependsInstall) + DependencyJob dependsInstall, + AllowCheckForUpdates allowCheckForUpdates) { // check whether we already have the addon installing CSingleLock lock(m_critSection); @@ -256,6 +258,7 @@ bool CAddonInstaller::DoInstall(const AddonPtr& addon, lock.Leave(); installJob->SetDependsInstall(dependsInstall); + installJob->SetAllowCheckForUpdates(allowCheckForUpdates); bool result = false; if (modal == ModalJob::YES) @@ -297,7 +300,7 @@ bool CAddonInstaller::InstallFromZip(const std::string &path) AddonPtr addon; if (CServiceBroker::GetAddonMgr().LoadAddonDescription(items[0]->GetPath(), addon)) return DoInstall(addon, RepositoryPtr(), BackgroundJob::YES, ModalJob::NO, AutoUpdateJob::NO, - DependencyJob::NO); + DependencyJob::NO, AllowCheckForUpdates::YES); CServiceBroker::GetEventLog().AddWithNotification(EventPtr(new CNotificationEvent(24045, StringUtils::Format(g_localizeStrings.Get(24143).c_str(), path.c_str()), @@ -440,7 +443,9 @@ void CAddonInstaller::PrunePackageCache() } } -void CAddonInstaller::InstallAddons(const VECADDONS& addons, bool wait) +void CAddonInstaller::InstallAddons(const VECADDONS& addons, + bool wait, + AllowCheckForUpdates allowCheckForUpdates) { for (const auto& addon : addons) { @@ -448,7 +453,7 @@ void CAddonInstaller::InstallAddons(const VECADDONS& addons, bool wait) RepositoryPtr repo; if (CAddonInstallJob::GetAddon(addon->ID(), repo, toInstall)) DoInstall(toInstall, repo, BackgroundJob::NO, ModalJob::NO, AutoUpdateJob::YES, - DependencyJob::NO); + DependencyJob::NO, allowCheckForUpdates); } if (wait) { @@ -678,9 +683,24 @@ bool CAddonInstallJob::DoWork() else if (m_addon->HasMainType(ADDON_REPOSITORY)) { origin = m_addon->ID(); // use own id as origin if repository - if (m_isUpdate) - CServiceBroker::GetRepositoryUpdater().CheckForUpdates( - std::static_pointer_cast<CRepository>(m_addon), false); + + // if a repository is updated during the add-on migration process, we need to skip + // calling CheckForUpdates() on the repo to prevent deadlock issues during migration + + if (m_allowCheckForUpdates == AllowCheckForUpdates::YES) + { + if (m_isUpdate) + { + CLog::Log(LOGDEBUG, "ADDONS: repository [{}] updated. now checking for content updates.", + m_addon->ID()); + CServiceBroker::GetRepositoryUpdater().CheckForUpdates( + std::static_pointer_cast<CRepository>(m_addon), false); + } + } + else + { + CLog::Log(LOGDEBUG, "ADDONS: skipping CheckForUpdates() on repository [{}].", m_addon->ID()); + } } else if (m_repo) { @@ -743,7 +763,7 @@ bool CAddonInstallJob::DoWork() bool notify = (CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool( CSettings::SETTING_ADDONS_NOTIFICATIONS) || m_isAutoUpdate == AutoUpdateJob::NO) && - !IsModal(); + !IsModal() && m_dependsInstall == DependencyJob::NO; CServiceBroker::GetEventLog().Add( EventPtr(new CAddonManagementEvent(m_addon, m_isUpdate ? 24065 : 24084)), notify, false); diff --git a/xbmc/addons/AddonInstaller.h b/xbmc/addons/AddonInstaller.h index 0b7f502599..28c7e551de 100644 --- a/xbmc/addons/AddonInstaller.h +++ b/xbmc/addons/AddonInstaller.h @@ -56,6 +56,12 @@ enum class InstallModalPrompt NO_PROMPT, }; +enum class AllowCheckForUpdates +{ + YES, + NO, +}; + class CAddonInstaller : public IJobCallback { public: @@ -96,11 +102,15 @@ public: const ADDON::RepositoryPtr& repo); /*! \brief Installs a vector of addons - \param addons the list of addons to install - \param wait if the method should wait for all the DoInstall jobs to finish or if it should return right away - \sa DoInstall + * \param addons the list of addons to install + * \param wait if the method should wait for all the DoInstall jobs to finish or if it should return right away + * \param allowCheckForUpdates indicates if content update checks are allowed + * after installation of a repository addon from the vector + * \sa DoInstall */ - void InstallAddons(const ADDON::VECADDONS& addons, bool wait); + void InstallAddons(const ADDON::VECADDONS& addons, + bool wait, + AllowCheckForUpdates allowCheckForUpdates); /*! \brief Install an addon from the given zip path \param path the zip file to install from @@ -162,17 +172,24 @@ private: ~CAddonInstaller() override; /*! \brief Install an addon from a repository or zip - \param addon the AddonPtr describing the addon - \param repo the repository to install addon from - \param background whether to install in the background or not. - \return true on successful install, false on failure. + * \param addon the AddonPtr describing the addon + * \param repo the repository to install addon from + * \param background whether to install in the background or not. + * \param modal whether to install in modal mode or not. + * \param autoUpdate whether the addon is installed in auto update mode. + * (i.e. no notification) + * \param dependsInstall whether this is the installation of a dependency addon + * \param allowCheckForUpdates whether content update check after installation of + * a repository addon is allowed + * \return true on successful install, false on failure. */ bool DoInstall(const ADDON::AddonPtr& addon, const ADDON::RepositoryPtr& repo, BackgroundJob background, ModalJob modal, AutoUpdateJob autoUpdate, - DependencyJob dependsInstall); + DependencyJob dependsInstall, + AllowCheckForUpdates allowCheckForUpdates); /*! \brief Check whether dependencies of an addon exist or are installable. Iterates through the addon's dependencies, checking they're installed or installable. @@ -221,6 +238,10 @@ public: static bool GetAddon(const std::string& addonID, ADDON::RepositoryPtr& repo, ADDON::AddonPtr& addon); void SetDependsInstall(DependencyJob dependsInstall) { m_dependsInstall = dependsInstall; }; + void SetAllowCheckForUpdates(AllowCheckForUpdates allowCheckForUpdates) + { + m_allowCheckForUpdates = allowCheckForUpdates; + }; private: void OnPreInstall(); @@ -242,6 +263,7 @@ private: bool m_isUpdate; AutoUpdateJob m_isAutoUpdate; DependencyJob m_dependsInstall = DependencyJob::NO; + AllowCheckForUpdates m_allowCheckForUpdates = AllowCheckForUpdates::YES; const char* m_currentType = TYPE_DOWNLOAD; }; diff --git a/xbmc/addons/AddonManager.cpp b/xbmc/addons/AddonManager.cpp index 4a68eab7c0..7606c6f95e 100644 --- a/xbmc/addons/AddonManager.cpp +++ b/xbmc/addons/AddonManager.cpp @@ -458,7 +458,7 @@ std::vector<AddonInfoPtr> CAddonMgr::MigrateAddons() CLog::Log(LOGINFO, "ADDON: waiting for add-ons to update..."); VECADDONS updates; GetAddonUpdateCandidates(updates); - InstallAddonUpdates(updates, true); + InstallAddonUpdates(updates, true, AllowCheckForUpdates::NO); // get addons that became incompatible and disable them std::vector<AddonInfoPtr> incompatible; @@ -497,7 +497,7 @@ void CAddonMgr::CheckAndInstallAddonUpdates(bool wait) const std::lock_guard<std::mutex> lock(m_installAddonsMutex); VECADDONS updates; GetAddonUpdateCandidates(updates); - InstallAddonUpdates(updates, wait); + InstallAddonUpdates(updates, wait, AllowCheckForUpdates::YES); } bool CAddonMgr::GetAddonUpdateCandidates(VECADDONS& updates) const @@ -556,11 +556,13 @@ void CAddonMgr::SortByDependencies(VECADDONS& updates) const updates = sorted; } -void CAddonMgr::InstallAddonUpdates(VECADDONS& updates, bool wait) const +void CAddonMgr::InstallAddonUpdates(VECADDONS& updates, + bool wait, + AllowCheckForUpdates allowCheckForUpdates) const { // sort addons by dependencies (ensure install order) and install all SortByDependencies(updates); - CAddonInstaller::GetInstance().InstallAddons(updates, wait); + CAddonInstaller::GetInstance().InstallAddons(updates, wait, allowCheckForUpdates); } bool CAddonMgr::GetAddon(const std::string& str, diff --git a/xbmc/addons/AddonManager.h b/xbmc/addons/AddonManager.h index dfce76af4a..a7efdfac58 100644 --- a/xbmc/addons/AddonManager.h +++ b/xbmc/addons/AddonManager.h @@ -26,6 +26,8 @@ namespace ADDON const std::string ADDON_PYTHON_EXT = "*.py"; + enum class AllowCheckForUpdates; + enum class AddonCheckType { OUTDATED_ADDONS, @@ -556,8 +558,12 @@ namespace ADDON * Install the list of addon updates via AddonInstaller * \param[in,out] updates the vector of addons to install (will be sorted) * \param wait if the process should wait for all addons to install + * \param allowCheckForUpdates indicates if content update checks are allowed + * after installation of a repository addon from the list */ - void InstallAddonUpdates(VECADDONS& updates, bool wait) const; + void InstallAddonUpdates(VECADDONS& updates, + bool wait, + AllowCheckForUpdates allowCheckForUpdates) const; // This guards the addon installation process to make sure // addon updates are not installed concurrently diff --git a/xbmc/addons/gui/GUIDialogAddonInfo.cpp b/xbmc/addons/gui/GUIDialogAddonInfo.cpp index a51947d060..9fe4a0d66e 100644 --- a/xbmc/addons/gui/GUIDialogAddonInfo.cpp +++ b/xbmc/addons/gui/GUIDialogAddonInfo.cpp @@ -16,6 +16,7 @@ #include "addons/AddonInstaller.h" #include "addons/AddonManager.h" #include "addons/AddonSystemSettings.h" +#include "addons/IAddon.h" #include "addons/gui/GUIDialogAddonSettings.h" #include "addons/gui/GUIHelpers.h" #include "dialogs/GUIDialogContextMenu.h" @@ -112,8 +113,7 @@ bool CGUIDialogAddonInfo::OnMessage(CGUIMessage& message) } else if (iControl == CONTROL_BTN_DEPENDENCIES) { - auto deps = CServiceBroker::GetAddonMgr().GetDepsRecursive(m_item->GetAddonInfo()->ID()); - ShowDependencyList(deps, true); + ShowDependencyList(Reactivate::YES, EntryPoint::SHOW_DEPENDENCIES); return true; } else if (iControl == CONTROL_BTN_AUTOUPDATE) @@ -160,10 +160,11 @@ bool CGUIDialogAddonInfo::OnAction(const CAction& action) void CGUIDialogAddonInfo::OnInitWindow() { CGUIDialog::OnInitWindow(); - UpdateControls(); + BuildDependencyList(); + UpdateControls(PerformButtonFocus::YES); } -void CGUIDialogAddonInfo::UpdateControls() +void CGUIDialogAddonInfo::UpdateControls(PerformButtonFocus performButtonFocus) { if (!m_item) return; @@ -202,7 +203,7 @@ void CGUIDialogAddonInfo::UpdateControls() } CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_INSTALL, canInstall); - if (canInstall) + if (canInstall && performButtonFocus == PerformButtonFocus::YES) { SET_CONTROL_FOCUS(CONTROL_BTN_INSTALL, 0); } @@ -244,13 +245,12 @@ void CGUIDialogAddonInfo::UpdateControls() SET_CONTROL_LABEL(CONTROL_BTN_SELECT, CanUse() ? 21480 : (CanOpen() ? 21478 : 21479)); CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_SETTINGS, isInstalled && m_localAddon->HasSettings()); - if (isInstalled && m_localAddon->HasSettings()) + if (isInstalled && m_localAddon->HasSettings() && performButtonFocus == PerformButtonFocus::YES) { SET_CONTROL_FOCUS(CONTROL_BTN_SETTINGS, 0); } - auto deps = CServiceBroker::GetAddonMgr().GetDepsRecursive(m_item->GetAddonInfo()->ID()); - CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_DEPENDENCIES, !deps.empty()); + CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_DEPENDENCIES, !m_depsInstalledWithAvailable.empty()); CFileItemList items; for (const auto& screenshot : m_item->GetAddonInfo()->Screenshots()) @@ -311,8 +311,8 @@ void CGUIDialogAddonInfo::OnUpdate() static_cast<AddonVersion>(m_item->GetProperty("Addon.ValidUpdateVersion").asString()); Close(); - const auto& deps = CServiceBroker::GetAddonMgr().GetDepsRecursive(addonId); - if (!deps.empty() && !ShowDependencyList(deps, false)) + if (!m_depsInstalledWithAvailable.empty() && + !ShowDependencyList(Reactivate::NO, EntryPoint::UPDATE)) return; CAddonInstaller::GetInstance().Install(addonId, version, origin); @@ -320,20 +320,11 @@ void CGUIDialogAddonInfo::OnUpdate() void CGUIDialogAddonInfo::OnSelectVersion() { - std::string processAddonId; + if (!m_item->HasAddonInfo()) + return; - if (m_localAddon) - { - processAddonId = m_localAddon->ID(); // we're doing an update as usual - } - else if (m_item->HasAddonInfo()) - { - processAddonId = m_item->GetAddonInfo()->ID(); // we're doing an install - } - else - { - return; // none of the above - } + const std::string& processAddonId = m_item->GetAddonInfo()->ID(); + EntryPoint entryPoint = m_localAddon ? EntryPoint::UPDATE : EntryPoint::INSTALL; std::vector<std::shared_ptr<IAddon>> compatibleVersions; std::vector<std::pair<AddonVersion, std::string>> versions; @@ -384,12 +375,19 @@ void CGUIDialogAddonInfo::OnSelectVersion() Close(); if (versions[i].second == LOCAL_CACHE) + { CAddonInstaller::GetInstance().InstallFromZip( StringUtils::Format("special://home/addons/packages/%s-%s.zip", processAddonId.c_str(), versions[i].first.asString().c_str())); + } else + { + if (!m_depsInstalledWithAvailable.empty() && + !ShowDependencyList(Reactivate::NO, entryPoint)) + return; CAddonInstaller::GetInstance().Install(processAddonId, versions[i].first, versions[i].second); + } } } } @@ -460,8 +458,8 @@ void CGUIDialogAddonInfo::OnInstall() const AddonVersion& version = itemAddonInfo->Version(); Close(); - const auto& deps = CServiceBroker::GetAddonMgr().GetDepsRecursive(addonId); - if (!deps.empty() && !ShowDependencyList(deps, false)) + if (!m_depsInstalledWithAvailable.empty() && + !ShowDependencyList(Reactivate::NO, EntryPoint::INSTALL)) return; CAddonInstaller::GetInstance().Install(addonId, version, origin); @@ -586,7 +584,7 @@ void CGUIDialogAddonInfo::OnEnableDisable() CServiceBroker::GetAddonMgr().EnableAddon(m_localAddon->ID()); } - UpdateControls(); + UpdateControls(PerformButtonFocus::NO); } void CGUIDialogAddonInfo::OnSettings() @@ -594,90 +592,109 @@ void CGUIDialogAddonInfo::OnSettings() CGUIDialogAddonSettings::ShowForAddon(m_localAddon); } -bool CGUIDialogAddonInfo::ShowDependencyList(const std::vector<ADDON::DependencyInfo>& deps, - bool reactivate) +bool CGUIDialogAddonInfo::ShowDependencyList(Reactivate reactivate, EntryPoint entryPoint) { - auto pDialog = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogSelect>( - WINDOW_DIALOG_SELECT); - CFileItemList items; - for (auto& it : deps) + if (entryPoint != EntryPoint::INSTALL || + (entryPoint == EntryPoint::INSTALL && !m_allDepsInstalled)) { - AddonPtr dep_addon, local_addon, info_addon; - // Find add-on in repositories - CServiceBroker::GetAddonMgr().FindInstallableById(it.id, dep_addon); - // Find add-on in local installation - CServiceBroker::GetAddonMgr().GetAddon(it.id, local_addon); + auto pDialog = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogSelect>( + WINDOW_DIALOG_SELECT); + CFileItemList items; - // All combinations of dep_addon and local_addon validity are possible and information - // must be displayed even when there is no dep_addon. - // info_addon is the add-on to take the information to display (name, icon) from. The - // version in the repository is preferred because it might contain more recent data. - info_addon = dep_addon ? dep_addon : local_addon; - - if (info_addon) - { - CFileItemPtr item(new CFileItem(info_addon->Name())); - std::stringstream str; - str << it.id << " " << it.versionMin.asString() << " -> " << it.version.asString(); - if ((it.optional && !local_addon) || (!it.optional && local_addon)) - str << " " - << StringUtils::Format(g_localizeStrings.Get(39022).c_str(), - local_addon ? g_localizeStrings.Get(39019).c_str() - : g_localizeStrings.Get(39018).c_str()); - else if (it.optional && local_addon) - str << " " - << StringUtils::Format(g_localizeStrings.Get(39023).c_str(), - g_localizeStrings.Get(39019).c_str(), - g_localizeStrings.Get(39018).c_str()); - - item->SetLabel2(str.str()); - item->SetArt("icon", info_addon->Icon()); - item->SetProperty("addon_id", it.id); - items.Add(item); - } - else + for (const auto& it : m_depsInstalledWithAvailable) { - CFileItemPtr item(new CFileItem(it.id)); - item->SetLabel2(g_localizeStrings.Get(10005)); // Not available - items.Add(item); - } - } + // All combinations of depAddon and localAddon validity are possible and information + // must be displayed even when there is no depAddon. + // info_addon is the add-on to take the information to display (name, icon) from. The + // version in the repository is preferred because it might contain more recent data. - CFileItemPtr backup_item = GetCurrentListItem(); - while (true) - { - pDialog->Reset(); - pDialog->SetHeading(reactivate ? 39024 : 39020); - pDialog->SetUseDetails(true); - for (auto& it : items) - pDialog->Add(*it); - pDialog->EnableButton(!reactivate, 186); - pDialog->SetButtonFocus(true); - pDialog->Open(); - - if (pDialog->IsButtonPressed()) - return true; + std::shared_ptr<IAddon> infoAddon = it.m_available ? it.m_available : it.m_installed; - if (pDialog->IsConfirmed()) - { + if (infoAddon) + { + if (entryPoint != EntryPoint::UPDATE || + (entryPoint == EntryPoint::UPDATE && !it.m_isInstalledUpToDate())) + { + const CFileItemPtr item = std::make_shared<CFileItem>(infoAddon->Name()); + int messageId = 24180; // minversion only + + // dep not installed locally, but it is available from a repo! + if (!it.m_installed) + { + if (entryPoint != EntryPoint::SHOW_DEPENDENCIES) + { + messageId = 24181; // => install + } + } + else // dep is installed locally + { + messageId = 24182; // => installed + + if (!it.m_isInstalledUpToDate()) + { + messageId = 24183; // => update to + } + } - const CFileItemPtr& item = pDialog->GetSelectedFileItem(); - std::string addon_id = item->GetProperty("addon_id").asString(); - AddonPtr dep_addon; - if (CServiceBroker::GetAddonMgr().FindInstallableById(addon_id, dep_addon)) + item->SetLabel2(StringUtils::Format( + g_localizeStrings.Get(messageId).c_str(), it.m_depInfo.versionMin.asString().c_str(), + it.m_installed ? it.m_installed->Version().asString().c_str() : "", + it.m_available ? it.m_available->Version().asString().c_str() : "", + it.m_depInfo.optional ? g_localizeStrings.Get(24184).c_str() : "")); + + item->SetArt("icon", infoAddon->Icon()); + item->SetProperty("addon_id", it.m_depInfo.id); + items.Add(item); + } + } + else { - Close(); - ShowForItem(CFileItemPtr(new CFileItem(dep_addon))); + const CFileItemPtr item = std::make_shared<CFileItem>(it.m_depInfo.id); + item->SetLabel2(g_localizeStrings.Get(10005)); // Not available + items.Add(item); } } - else - break; + + if (!items.IsEmpty()) + { + CFileItemPtr backup_item = GetCurrentListItem(); + while (true) + { + pDialog->Reset(); + pDialog->SetHeading(reactivate == Reactivate::YES ? 39024 : 39020); + pDialog->SetUseDetails(true); + for (auto& it : items) + pDialog->Add(*it); + pDialog->EnableButton(reactivate == Reactivate::NO, 186); + pDialog->SetButtonFocus(true); + pDialog->Open(); + + if (pDialog->IsButtonPressed()) + return true; + + if (pDialog->IsConfirmed()) + { + const CFileItemPtr& item = pDialog->GetSelectedFileItem(); + std::string addon_id = item->GetProperty("addon_id").asString(); + std::shared_ptr<IAddon> depAddon; + if (CServiceBroker::GetAddonMgr().FindInstallableById(addon_id, depAddon)) + { + Close(); + ShowForItem(std::make_shared<CFileItem>(depAddon)); + } + } + else + break; + } + SetItem(backup_item); + if (reactivate == Reactivate::YES) + Open(); + + return false; + } } - SetItem(backup_item); - if (reactivate) - Open(); - return false; + return true; } bool CGUIDialogAddonInfo::ShowForItem(const CFileItemPtr& item) @@ -708,3 +725,49 @@ bool CGUIDialogAddonInfo::SetItem(const CFileItemPtr& item) false); return true; } + +void CGUIDialogAddonInfo::BuildDependencyList() +{ + if (!m_item) + return; + + m_allDepsInstalled = true; + m_depsInstalledWithAvailable.clear(); + m_deps = CServiceBroker::GetAddonMgr().GetDepsRecursive(m_item->GetAddonInfo()->ID()); + + for (const auto& dep : m_deps) + { + std::shared_ptr<IAddon> addonInstalled; + std::shared_ptr<IAddon> addonAvailable; + + // Find add-on in local installation + if (!CServiceBroker::GetAddonMgr().GetAddon(dep.id, addonInstalled)) + { + addonInstalled = nullptr; + m_allDepsInstalled = false; + } + + // Find add-on in repositories + if (!CServiceBroker::GetAddonMgr().FindInstallableById(dep.id, addonAvailable)) + { + addonAvailable = nullptr; + } + + // AddonType ADDON_SCRIPT_MODULE needs to be filtered as these low-level add-ons + // should be hidden to the user in the dependency select dialog + + if ((addonInstalled && addonInstalled->MainType() != ADDON_SCRIPT_MODULE) || + (addonAvailable && addonAvailable->MainType() != ADDON_SCRIPT_MODULE) || + (!addonAvailable && !addonInstalled)) + { + m_depsInstalledWithAvailable.emplace_back( + CInstalledWithAvailable{dep, addonInstalled, addonAvailable}); + } + + // sort optional add-ons to top of the list + + std::sort( + m_depsInstalledWithAvailable.begin(), m_depsInstalledWithAvailable.end(), + [](const auto& a, const auto& b) { return a.m_depInfo.optional > b.m_depInfo.optional; }); + } +} diff --git a/xbmc/addons/gui/GUIDialogAddonInfo.h b/xbmc/addons/gui/GUIDialogAddonInfo.h index 1740560dfa..1f9fdfc12e 100644 --- a/xbmc/addons/gui/GUIDialogAddonInfo.h +++ b/xbmc/addons/gui/GUIDialogAddonInfo.h @@ -11,10 +11,42 @@ #include "addons/IAddon.h" #include "guilib/GUIDialog.h" +#include <memory> #include <string> #include <utility> #include <vector> +enum class Reactivate +{ + YES, + NO, +}; + +enum class PerformButtonFocus +{ + YES, + NO, +}; + +enum class EntryPoint +{ + INSTALL, + UPDATE, + SHOW_DEPENDENCIES, +}; + +struct CInstalledWithAvailable +{ + ADDON::DependencyInfo m_depInfo; + std::shared_ptr<ADDON::IAddon> m_installed; + std::shared_ptr<ADDON::IAddon> m_available; + bool m_isInstalledUpToDate() const + { + return ((m_installed && m_available) && (m_installed->Version() == m_available->Version())) || + (m_installed && !m_available); + }; +}; + class CGUIDialogAddonInfo : public CGUIDialog { public: @@ -38,7 +70,7 @@ private: * @return true if we can display information, false otherwise */ bool SetItem(const CFileItemPtr& item); - void UpdateControls(); + void UpdateControls(PerformButtonFocus performButtonFocus); void OnUpdate(); void OnSelectVersion(); @@ -78,11 +110,16 @@ private: /*! * @brief Show a dialog with the addon's dependencies. * - * @param[in] deps List of dependencies * @param[in] reactivate If true, reactivate info dialog when done + * @param[in] entryPoint INSTALL, UPDATE or SHOW_DEPENDENCIES * @return True if okay was selected, false otherwise */ - bool ShowDependencyList(const std::vector<ADDON::DependencyInfo>& deps, bool reactivate); + bool ShowDependencyList(Reactivate reactivate, EntryPoint entryPoint); + + /*! + * @brief Used to build up the dependency list shown by @ref ShowDependencyList() + */ + void BuildDependencyList(); CFileItemPtr m_item; ADDON::AddonPtr m_localAddon; @@ -93,4 +130,8 @@ private: * be removed before installing a new version. */ bool m_silentUninstall = false; + + bool m_allDepsInstalled = true; + std::vector<ADDON::DependencyInfo> m_deps; + std::vector<CInstalledWithAvailable> m_depsInstalledWithAvailable; }; diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream.h index b291c2f87f..1b3a735564 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream.h @@ -19,7 +19,7 @@ #include <time.h> // Increment this level always if you add features which can lead to compile failures in the addon -#define INPUTSTREAM_VERSION_LEVEL 3 +#define INPUTSTREAM_VERSION_LEVEL 4 #define INPUTSTREAM_MAX_INFO_COUNT 8 #define INPUTSTREAM_MAX_STREAM_COUNT 256 @@ -219,34 +219,34 @@ extern "C" enum INPUTSTREAM_FLAGS { /// @brief **0000 0000 0000 0000 :** Empty to set if nothing is used - INPUTSTREAM_FLAG_NONE = (1 << 0), + INPUTSTREAM_FLAG_NONE = 0, /// @brief **0000 0000 0000 0001 :** Default - INPUTSTREAM_FLAG_DEFAULT = (1 << 1), + INPUTSTREAM_FLAG_DEFAULT = (1 << 0), /// @brief **0000 0000 0000 0010 :** Dub - INPUTSTREAM_FLAG_DUB = (1 << 2), + INPUTSTREAM_FLAG_DUB = (1 << 1), /// @brief **0000 0000 0000 0100 :** Original - INPUTSTREAM_FLAG_ORIGINAL = (1 << 3), + INPUTSTREAM_FLAG_ORIGINAL = (1 << 2), /// @brief **0000 0000 0000 1000 :** Comment - INPUTSTREAM_FLAG_COMMENT = (1 << 4), + INPUTSTREAM_FLAG_COMMENT = (1 << 3), /// @brief **0000 0000 0001 0000 :** Lyrics - INPUTSTREAM_FLAG_LYRICS = (1 << 5), + INPUTSTREAM_FLAG_LYRICS = (1 << 4), /// @brief **0000 0000 0010 0000 :** Karaoke - INPUTSTREAM_FLAG_KARAOKE = (1 << 6), + INPUTSTREAM_FLAG_KARAOKE = (1 << 5), /// @brief **0000 0000 0100 0000 :** Forced - INPUTSTREAM_FLAG_FORCED = (1 << 7), + INPUTSTREAM_FLAG_FORCED = (1 << 6), /// @brief **0000 0000 1000 0000 :** Hearing impaired - INPUTSTREAM_FLAG_HEARING_IMPAIRED = (1 << 8), + INPUTSTREAM_FLAG_HEARING_IMPAIRED = (1 << 7), /// @brief **0000 0001 0000 0000 :** Visual impaired - INPUTSTREAM_FLAG_VISUAL_IMPAIRED = (1 << 9), + INPUTSTREAM_FLAG_VISUAL_IMPAIRED = (1 << 8), }; ///@} //---------------------------------------------------------------------------- diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/versions.h b/xbmc/addons/kodi-dev-kit/include/kodi/versions.h index e5c52d78fb..5808e1ab38 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/versions.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/versions.h @@ -107,8 +107,8 @@ #define ADDON_INSTANCE_VERSION_IMAGEDECODER_XML_ID "kodi.binary.instance.imagedecoder" #define ADDON_INSTANCE_VERSION_IMAGEDECODER_DEPENDS "addon-instance/ImageDecoder.h" -#define ADDON_INSTANCE_VERSION_INPUTSTREAM "3.0.0" -#define ADDON_INSTANCE_VERSION_INPUTSTREAM_MIN "3.0.0" +#define ADDON_INSTANCE_VERSION_INPUTSTREAM "3.0.1" +#define ADDON_INSTANCE_VERSION_INPUTSTREAM_MIN "3.0.1" #define ADDON_INSTANCE_VERSION_INPUTSTREAM_XML_ID "kodi.binary.instance.inputstream" #define ADDON_INSTANCE_VERSION_INPUTSTREAM_DEPENDS "c-api/addon-instance/inputstream.h" \ "c-api/addon-instance/inputstream/demux_packet.h" \ @@ -172,8 +172,8 @@ #define ADDON_INSTANCE_VERSION_VISUALIZATION_DEPENDS "addon-instance/Visualization.h" \ "c-api/addon-instance/visualization.h" -#define ADDON_INSTANCE_VERSION_VIDEOCODEC "2.0.0" -#define ADDON_INSTANCE_VERSION_VIDEOCODEC_MIN "2.0.0" +#define ADDON_INSTANCE_VERSION_VIDEOCODEC "2.0.1" +#define ADDON_INSTANCE_VERSION_VIDEOCODEC_MIN "2.0.1" #define ADDON_INSTANCE_VERSION_VIDEOCODEC_XML_ID "kodi.binary.instance.videocodec" #define ADDON_INSTANCE_VERSION_VIDEOCODEC_DEPENDS "c-api/addon-instance/video_codec.h" \ "c-api/addon-instance/inputstream/stream_codec.h" \ diff --git a/xbmc/cores/VideoPlayer/DVDSubtitles/DVDFactorySubtitle.cpp b/xbmc/cores/VideoPlayer/DVDSubtitles/DVDFactorySubtitle.cpp index 9088308e93..3b35bac7ce 100644 --- a/xbmc/cores/VideoPlayer/DVDSubtitles/DVDFactorySubtitle.cpp +++ b/xbmc/cores/VideoPlayer/DVDSubtitles/DVDFactorySubtitle.cpp @@ -51,7 +51,8 @@ CDVDSubtitleParser* CDVDFactorySubtitle::CreateParser(std::string& strFile) { return new CDVDSubtitleParserVplayer(std::move(pStream), strFile.c_str()); } - else if ((!memcmp(line, "Dialogue: Marked", 16)) || (!memcmp(line, "Dialogue: ", 10))) + else if ((!memcmp(line, "Dialogue: Marked", 16)) || (!memcmp(line, "Dialogue: ", 10)) || + (!memcmp(line, "[Events]", 8))) { return new CDVDSubtitleParserSSA(std::move(pStream), strFile.c_str()); } diff --git a/xbmc/cores/VideoPlayer/DVDSubtitles/DVDSubtitlesLibass.cpp b/xbmc/cores/VideoPlayer/DVDSubtitles/DVDSubtitlesLibass.cpp index ac37f0b4bc..41c824969f 100644 --- a/xbmc/cores/VideoPlayer/DVDSubtitles/DVDSubtitlesLibass.cpp +++ b/xbmc/cores/VideoPlayer/DVDSubtitles/DVDSubtitlesLibass.cpp @@ -20,6 +20,35 @@ #include "utils/log.h" #include "windowing/GraphicContext.h" +namespace +{ +void AppendFont(const std::string& font) +{ + std::string finalFontPath = URIUtils::AddFileToFolder("special://temp/fonts/", font); + if (XFILE::CFile::Exists(finalFontPath)) + { + CLog::Log(LOGDEBUG, + "CDVDSubtitlesLibass: Skipping copy of {} to special://temp/fonts/ (already exists)", + font); + return; + } + + std::string fontSources[]{"special://home/media/Fonts/", "special://xbmc/media/Fonts/"}; + + for (const auto& path : fontSources) + { + auto fontPath = URIUtils::AddFileToFolder(path, font); + if (XFILE::CFile::Exists(fontPath)) + { + XFILE::CFile::Copy(fontPath, finalFontPath); + CLog::Log(LOGDEBUG, "CDVDSubtitlesLibass: Copied {} to {}", fontPath, finalFontPath); + return; + } + CLog::Log(LOGDEBUG, "CDVDSubtitlesLibass: Could not find font {} in font sources", font); + } +} +} // namespace + static void libass_log(int level, const char *fmt, va_list args, void *data) { if(level >= 5) @@ -40,6 +69,13 @@ CDVDSubtitlesLibass::CDVDSubtitlesLibass() ass_set_message_cb(m_library, libass_log, this); + // Add configured subtitle font to special://temp/fonts/. This needs to be done before + // ass_set_fonts_dir. If fontconfig fails it will use the default font. + const std::shared_ptr<CSettings> settings = CServiceBroker::GetSettingsComponent()->GetSettings(); + std::string forcedFont = settings->GetString(CSettings::SETTING_SUBTITLES_FONT); + AppendFont(forcedFont); + strPath = URIUtils::AddFileToFolder(strPath, forcedFont); + CLog::Log(LOGINFO, "CDVDSubtitlesLibass: Initializing ASS library font settings"); // libass uses fontconfig (system lib) which is not wrapped // so translate the path before calling into libass @@ -54,23 +90,17 @@ CDVDSubtitlesLibass::CDVDSubtitlesLibass() if(!m_renderer) return; - //Setting default font to the Arial in \media\fonts (used if FontConfig fails) - const std::shared_ptr<CSettings> settings = CServiceBroker::GetSettingsComponent()->GetSettings(); - strPath = URIUtils::AddFileToFolder("special://home/media/Fonts/", settings->GetString(CSettings::SETTING_SUBTITLES_FONT)); - if (!XFILE::CFile::Exists(strPath)) - strPath = URIUtils::AddFileToFolder("special://xbmc/media/Fonts/", settings->GetString(CSettings::SETTING_SUBTITLES_FONT)); - int fc = !settings->GetBool(CSettings::SETTING_SUBTITLES_OVERRIDEASSFONTS); - ass_set_margins(m_renderer, 0, 0, 0, 0); ass_set_use_margins(m_renderer, 0); ass_set_font_scale(m_renderer, 1); + int fontconfig = settings->GetBool(CSettings::SETTING_SUBTITLES_OVERRIDEASSFONTS) ? 0 : 1; // libass uses fontconfig (system lib) which is not wrapped // so translate the path before calling into libass - ass_set_fonts(m_renderer, CSpecialProtocol::TranslatePath(strPath).c_str(), "Arial", fc, NULL, 1); + ass_set_fonts(m_renderer, CSpecialProtocol::TranslatePath(strPath).c_str(), "Arial", fontconfig, + nullptr, 1); } - CDVDSubtitlesLibass::~CDVDSubtitlesLibass() { if(m_track) @@ -168,4 +198,3 @@ int CDVDSubtitlesLibass::GetNrOfEvents() return 0; return m_track->n_events; } - diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp index 5141635350..777909f22b 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.cpp @@ -886,6 +886,7 @@ void CLinuxRendererGL::LoadShaders(int field) // if single pass, create GLSLOutput helper and pass it to YUV2RGB shader EShaderFormat shaderFormat = GetShaderFormat(); std::shared_ptr<GLSLOutput> out; + m_toneMapMethod = m_videoSettings.m_ToneMapMethod; if (m_renderQuality == RQ_SINGLEPASS) { out = std::make_shared<GLSLOutput>(GLSLOutput(4, m_useDithering, m_ditherDepth, @@ -899,6 +900,7 @@ void CLinuxRendererGL::LoadShaders(int field) shaderFormat, m_nonLinStretch, AVColorPrimaries::AVCOL_PRI_BT709, m_srcPrimaries, m_toneMap, + m_toneMapMethod, m_scalingMethod, out); if (!m_cmsOn) m_pYUVShader->SetConvertFullColorRange(m_fullRange); @@ -923,7 +925,7 @@ void CLinuxRendererGL::LoadShaders(int field) { m_pYUVShader = new YUV2RGBProgressiveShader(m_textureTarget == GL_TEXTURE_RECTANGLE, shaderFormat, m_nonLinStretch && m_renderQuality == RQ_SINGLEPASS, - AVColorPrimaries::AVCOL_PRI_BT709, m_srcPrimaries, m_toneMap, out); + AVColorPrimaries::AVCOL_PRI_BT709, m_srcPrimaries, m_toneMap, m_toneMapMethod, out); if (!m_cmsOn) m_pYUVShader->SetConvertFullColorRange(m_fullRange); @@ -1025,26 +1027,11 @@ void CLinuxRendererGL::RenderSinglePass(int index, int field) CPictureBuffer &buf = m_buffers[index]; CYuvPlane (&planes)[YuvImage::MAX_PLANES] = m_buffers[index].fields[field]; - AVColorPrimaries srcPrim = GetSrcPrimaries(buf.m_srcPrimaries, buf.image.width, buf.image.height); - if (srcPrim != m_srcPrimaries) - { - m_srcPrimaries = srcPrim; - m_reloadShaders = true; - } - - bool toneMap = false; - if (m_videoSettings.m_ToneMapMethod != VS_TONEMAPMETHOD_OFF) - { - if (buf.hasLightMetadata || (buf.hasDisplayMetadata && buf.displayMetadata.has_luminance)) - toneMap = true; - } - - if (toneMap != m_toneMap) - m_reloadShaders = true; - m_toneMap = toneMap; + CheckVideoParameters(index); if (m_reloadShaders) { + m_reloadShaders = 0; LoadShaders(field); } @@ -1072,7 +1059,7 @@ void CLinuxRendererGL::RenderSinglePass(int index, int field) m_pYUVShader->SetColParams(buf.m_srcColSpace, buf.m_srcBits, !buf.m_srcFullRange, buf.m_srcTextureBits); m_pYUVShader->SetDisplayMetadata(buf.hasDisplayMetadata, buf.displayMetadata, buf.hasLightMetadata, buf.lightMetadata); - m_pYUVShader->SetToneMapParam(m_videoSettings.m_ToneMapParam); + m_pYUVShader->SetToneMapParam(m_toneMapMethod, m_videoSettings.m_ToneMapParam); //disable non-linear stretch when a dvd menu is shown, parts of the menu are rendered through the overlay renderer //having non-linear stretch on breaks the alignment @@ -1195,23 +1182,7 @@ void CLinuxRendererGL::RenderToFBO(int index, int field, bool weave /*= false*/) CPictureBuffer &buf = m_buffers[index]; CYuvPlane (&planes)[YuvImage::MAX_PLANES] = m_buffers[index].fields[field]; - AVColorPrimaries srcPrim = GetSrcPrimaries(buf.m_srcPrimaries, buf.image.width, buf.image.height); - if (srcPrim != m_srcPrimaries) - { - m_srcPrimaries = srcPrim; - m_reloadShaders = true; - } - - bool toneMap = false; - if (m_videoSettings.m_ToneMapMethod != VS_TONEMAPMETHOD_OFF) - { - if (buf.hasLightMetadata || (buf.hasDisplayMetadata && buf.displayMetadata.has_luminance)) - toneMap = true; - } - - if (toneMap != m_toneMap) - m_reloadShaders = true; - m_toneMap = toneMap; + CheckVideoParameters(index); if (m_reloadShaders) { @@ -1272,7 +1243,7 @@ void CLinuxRendererGL::RenderToFBO(int index, int field, bool weave /*= false*/) m_pYUVShader->SetColParams(buf.m_srcColSpace, buf.m_srcBits, !buf.m_srcFullRange, buf.m_srcTextureBits); m_pYUVShader->SetDisplayMetadata(buf.hasDisplayMetadata, buf.displayMetadata, buf.hasLightMetadata, buf.lightMetadata); - m_pYUVShader->SetToneMapParam(m_videoSettings.m_ToneMapParam); + m_pYUVShader->SetToneMapParam(m_toneMapMethod, m_videoSettings.m_ToneMapParam); if (field == FIELD_TOP) m_pYUVShader->SetField(1); @@ -2732,6 +2703,35 @@ void CLinuxRendererGL::DeleteCLUT() } } +void CLinuxRendererGL::CheckVideoParameters(int index) +{ + CPictureBuffer &buf = m_buffers[index]; + int method = m_videoSettings.m_ToneMapMethod; + + AVColorPrimaries srcPrim = GetSrcPrimaries(buf.m_srcPrimaries, buf.image.width, buf.image.height); + if (srcPrim != m_srcPrimaries) + { + m_srcPrimaries = srcPrim; + m_reloadShaders = true; + } + + bool toneMap = false; + if (method != VS_TONEMAPMETHOD_OFF) + { + if (buf.hasLightMetadata || (buf.hasDisplayMetadata && buf.displayMetadata.has_luminance)) + { + toneMap = true; + } + } + + if (toneMap != m_toneMap || (m_toneMapMethod != method)) + { + m_reloadShaders = true; + } + m_toneMap = toneMap; + m_toneMapMethod = method; +} + AVColorPrimaries CLinuxRendererGL::GetSrcPrimaries(AVColorPrimaries srcPrimaries, unsigned int width, unsigned int height) { AVColorPrimaries ret = srcPrimaries; diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.h b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.h index 43b08052ea..91a7d7344a 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.h +++ b/xbmc/cores/VideoPlayer/VideoRenderers/LinuxRendererGL.h @@ -103,6 +103,7 @@ protected: virtual void LoadShaders(int field=FIELD_FULL); void SetTextureFilter(GLenum method); void UpdateVideoFilter(); + void CheckVideoParameters(int index); AVColorPrimaries GetSrcPrimaries(AVColorPrimaries srcPrimaries, unsigned int width, unsigned int height); // textures @@ -219,6 +220,7 @@ protected: bool m_fullRange; AVColorPrimaries m_srcPrimaries; bool m_toneMap = false; + int m_toneMapMethod = 0; float m_clearColour = 0.0f; bool m_pboSupported = true; bool m_pboUsed = false; diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/WinVideoFilter.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/WinVideoFilter.cpp index 3c2d472ab8..3b8a906bc5 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/WinVideoFilter.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/WinVideoFilter.cpp @@ -216,9 +216,10 @@ void COutputShader::ApplyEffectParameters(CD3DEffect &effect, unsigned sourceWid else if (m_toneMapping && m_toneMappingMethod == VS_TONEMAPMETHOD_HABLE) { float lumin = GetLuminanceValue(); - float param = (10000.0f / lumin) * (2.0f / m_toneMappingParam); - effect.SetScalar("g_luminance", lumin); - effect.SetScalar("g_toneP1", param); + float lumin_factor = (10000.0f / lumin) * (2.0f / m_toneMappingParam); + float lumin_div100 = lumin / (100.0f * m_toneMappingParam); + effect.SetScalar("g_toneP1", lumin_factor); + effect.SetScalar("g_toneP2", lumin_div100); } } diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/WinVideoFilter.h b/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/WinVideoFilter.h index 2864d8310f..647f5ffbe6 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/WinVideoFilter.h +++ b/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/WinVideoFilter.h @@ -96,7 +96,7 @@ private: unsigned m_sourceHeight = 0; int m_lutSize = 0; int m_ditherDepth = 0; - int m_toneMappingMethod = VS_TONEMAPMETHOD_REINHARD; + int m_toneMappingMethod = 0; float m_toneMappingParam = 1.0f; CRect m_sourceRect = {}; diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/YUV2RGBShaderGL.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/YUV2RGBShaderGL.cpp index cff71f037f..7ef9e8ef10 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/YUV2RGBShaderGL.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/YUV2RGBShaderGL.cpp @@ -31,6 +31,7 @@ using namespace Shaders; BaseYUV2RGBGLSLShader::BaseYUV2RGBGLSLShader(bool rect, EShaderFormat format, bool stretch, AVColorPrimaries dstPrimaries, AVColorPrimaries srcPrimaries, bool toneMap, + int toneMapMethod, std::shared_ptr<GLSLOutput> output) { m_width = 1; @@ -90,7 +91,14 @@ BaseYUV2RGBGLSLShader::BaseYUV2RGBGLSLShader(bool rect, EShaderFormat format, bo if (toneMap) { m_toneMapping = true; + m_toneMappingMethod = toneMapMethod; m_defines += "#define XBMC_TONE_MAPPING\n"; + if (toneMapMethod == VS_TONEMAPMETHOD_REINHARD) + m_defines += "#define KODI_TONE_MAPPING_REINHARD\n"; + else if (toneMapMethod == VS_TONEMAPMETHOD_ACES) + m_defines += "#define KODI_TONE_MAPPING_ACES\n"; + else if (toneMapMethod == VS_TONEMAPMETHOD_HABLE) + m_defines += "#define KODI_TONE_MAPPING_HABLE\n"; } VertexShader()->LoadSource("gl_yuv2rgb_vertex.glsl", m_defines); @@ -127,6 +135,7 @@ void BaseYUV2RGBGLSLShader::OnCompiledAndLinked() m_hGammaDstInv = glGetUniformLocation(ProgramHandle(), "m_gammaDstInv"); m_hCoefsDst = glGetUniformLocation(ProgramHandle(), "m_coefsDst"); m_hToneP1 = glGetUniformLocation(ProgramHandle(), "m_toneP1"); + m_hLuminance = glGetUniformLocation(ProgramHandle(), "m_luminance"); VerifyGLState(); if (m_glslOutput) @@ -161,22 +170,37 @@ bool BaseYUV2RGBGLSLShader::OnEnabled() if (m_toneMapping) { - float param = 0.7; - if (m_hasLightMetadata) - param = log10(100) / log10(m_lightMetadata.MaxCLL); - else if (m_hasDisplayMetadata && m_displayMetadata.has_luminance) - param = log10(100) / log10(m_displayMetadata.max_luminance.num/m_displayMetadata.max_luminance.den); - - // Sanity check - if (param < 0.1f || param > 5.0f) - param = 0.7f; - - param *= m_toneMappingParam; - - float coefs[3]; - CConvertMatrix::GetRGBYuvCoefs(AVColorSpace::AVCOL_SPC_BT709, coefs); - glUniform3f(m_hCoefsDst, coefs[0], coefs[1], coefs[2]); - glUniform1f(m_hToneP1, param); + if (m_toneMappingMethod == VS_TONEMAPMETHOD_REINHARD) + { + float param = 0.7; + if (m_hasLightMetadata) + param = log10(100) / log10(m_lightMetadata.MaxCLL); + else if (m_hasDisplayMetadata && m_displayMetadata.has_luminance) + param = log10(100) / log10(m_displayMetadata.max_luminance.num/m_displayMetadata.max_luminance.den); + + // Sanity check + if (param < 0.1f || param > 5.0f) + param = 0.7f; + + param *= m_toneMappingParam; + + float coefs[3]; + CConvertMatrix::GetRGBYuvCoefs(AVColorSpace::AVCOL_SPC_BT709, coefs); + glUniform3f(m_hCoefsDst, coefs[0], coefs[1], coefs[2]); + glUniform1f(m_hToneP1, param); + } + else if (m_toneMapping && m_toneMappingMethod == VS_TONEMAPMETHOD_ACES) + { + glUniform1f(m_hLuminance, GetLuminanceValue()); + glUniform1f(m_hToneP1, m_toneMappingParam); + } + else if (m_toneMapping && m_toneMappingMethod == VS_TONEMAPMETHOD_HABLE) + { + float lumin = GetLuminanceValue(); + float param = (10000.0f / lumin) * (2.0f / m_toneMappingParam); + glUniform1f(m_hLuminance, lumin); + glUniform1f(m_hToneP1, param); + } } VerifyGLState(); @@ -219,6 +243,44 @@ void BaseYUV2RGBGLSLShader::SetDisplayMetadata(bool hasDisplayMetadata, AVMaster m_lightMetadata = lightMetadata; } + +void BaseYUV2RGBGLSLShader::SetToneMapParam(int method, float param) +{ + m_toneMappingMethod = method; + m_toneMappingParam = param; +} + +float BaseYUV2RGBGLSLShader::GetLuminanceValue() const //Maybe move this to linuxrenderer?! same as in baserenderer +{ + float lum1 = 400.0f; // default for bad quality HDR-PQ sources (with no metadata) + float lum2 = lum1; + float lum3 = lum1; + + if (m_hasLightMetadata) + { + uint16_t lum = m_displayMetadata.max_luminance.num / m_displayMetadata.max_luminance.den; + if (m_lightMetadata.MaxCLL >= lum) + { + lum1 = static_cast<float>(lum); + lum2 = static_cast<float>(m_lightMetadata.MaxCLL); + } + else + { + lum1 = static_cast<float>(m_lightMetadata.MaxCLL); + lum2 = static_cast<float>(lum); + } + lum3 = static_cast<float>(m_lightMetadata.MaxFALL); + lum1 = (lum1 * 0.5f) + (lum2 * 0.2f) + (lum3 * 0.3f); + } + else if (m_hasDisplayMetadata && m_displayMetadata.has_luminance) + { + uint16_t lum = m_displayMetadata.max_luminance.num / m_displayMetadata.max_luminance.den; + lum1 = static_cast<float>(lum); + } + + return lum1; +} + ////////////////////////////////////////////////////////////////////// // YUV2RGBProgressiveShader - YUV2RGB with no deinterlacing // Use for weave deinterlacing / progressive @@ -230,9 +292,10 @@ YUV2RGBProgressiveShader::YUV2RGBProgressiveShader(bool rect, AVColorPrimaries dstPrimaries, AVColorPrimaries srcPrimaries, bool toneMap, + int toneMapMethod, std::shared_ptr<GLSLOutput> output) : BaseYUV2RGBGLSLShader( - rect, format, stretch, dstPrimaries, srcPrimaries, toneMap, std::move(output)) + rect, format, stretch, dstPrimaries, srcPrimaries, toneMap, toneMapMethod, std::move(output)) { PixelShader()->LoadSource("gl_yuv2rgb_basic.glsl", m_defines); PixelShader()->AppendSource("gl_output.glsl"); @@ -250,10 +313,11 @@ YUV2RGBFilterShader4::YUV2RGBFilterShader4(bool rect, AVColorPrimaries dstPrimaries, AVColorPrimaries srcPrimaries, bool toneMap, + int toneMapMethod, ESCALINGMETHOD method, std::shared_ptr<GLSLOutput> output) : BaseYUV2RGBGLSLShader( - rect, format, stretch, dstPrimaries, srcPrimaries, toneMap, std::move(output)) + rect, format, stretch, dstPrimaries, srcPrimaries, toneMap, toneMapMethod, std::move(output)) { m_scaling = method; PixelShader()->LoadSource("gl_yuv2rgb_filter4.glsl", m_defines); diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/YUV2RGBShaderGL.h b/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/YUV2RGBShaderGL.h index c2af6c4e4f..e898278203 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/YUV2RGBShaderGL.h +++ b/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/YUV2RGBShaderGL.h @@ -31,6 +31,7 @@ public: BaseYUV2RGBGLSLShader(bool rect, EShaderFormat format, bool stretch, AVColorPrimaries dst, AVColorPrimaries src, bool toneMap, + int toneMapMethod, std::shared_ptr<GLSLOutput> output); ~BaseYUV2RGBGLSLShader() override; @@ -44,7 +45,8 @@ public: void SetNonLinStretch(float stretch) { m_stretch = stretch; } void SetDisplayMetadata(bool hasDisplayMetadata, AVMasteringDisplayMetadata displayMetadata, bool hasLightMetadata, AVContentLightMetadata lightMetadata); - void SetToneMapParam(float param) { m_toneMappingParam = param; } + void SetToneMapParam(int method, float param); + float GetLuminanceValue() const; void SetConvertFullColorRange(bool convertFullRange) { m_convertFullRange = convertFullRange; } @@ -73,6 +75,7 @@ protected: bool m_hasLightMetadata = false; AVContentLightMetadata m_lightMetadata; bool m_toneMapping = false; + int m_toneMappingMethod = VS_TONEMAPMETHOD_REINHARD; float m_toneMappingParam = 1.0; float m_black; @@ -100,6 +103,7 @@ protected: GLint m_hPrimMat = -1; GLint m_hToneP1 = -1; GLint m_hCoefsDst = -1; + GLint m_hLuminance = -1; // vertex shader attribute handles GLint m_hVertex = -1; @@ -119,6 +123,7 @@ public: bool stretch, AVColorPrimaries dstPrimaries, AVColorPrimaries srcPrimaries, bool toneMap, + int toneMapMethod, std::shared_ptr<GLSLOutput> output); }; @@ -130,6 +135,7 @@ public: bool stretch, AVColorPrimaries dstPrimaries, AVColorPrimaries srcPrimaries, bool toneMap, + int toneMapMethod, ESCALINGMETHOD method, std::shared_ptr<GLSLOutput> output); ~YUV2RGBFilterShader4() override; diff --git a/xbmc/cores/VideoSettings.cpp b/xbmc/cores/VideoSettings.cpp index 9f18508c31..20b287a5c6 100644 --- a/xbmc/cores/VideoSettings.cpp +++ b/xbmc/cores/VideoSettings.cpp @@ -36,6 +36,10 @@ CVideoSettings::CVideoSettings() m_StereoMode = 0; m_StereoInvert = false; m_VideoStream = -1; + m_ToneMapMethod = VS_TONEMAPMETHOD_REINHARD; + m_ToneMapParam = 1.0f; + m_Orientation = 0; + m_CenterMixLevel = 0; } bool CVideoSettings::operator!=(const CVideoSettings &right) const diff --git a/xbmc/cores/VideoSettings.h b/xbmc/cores/VideoSettings.h index ba7efeb797..4e2007a8a6 100644 --- a/xbmc/cores/VideoSettings.h +++ b/xbmc/cores/VideoSettings.h @@ -90,8 +90,8 @@ public: bool operator!=(const CVideoSettings &right) const; EINTERLACEMETHOD m_InterlaceMethod; - ESCALINGMETHOD m_ScalingMethod; - int m_ViewMode; // current view mode + ESCALINGMETHOD m_ScalingMethod; + int m_ViewMode; // current view mode float m_CustomZoomAmount; // custom setting zoom amount float m_CustomPixelRatio; // custom setting pixel ratio float m_CustomVerticalShift; // custom setting vertical shift @@ -113,10 +113,10 @@ public: int m_StereoMode; bool m_StereoInvert; int m_VideoStream; - int m_ToneMapMethod = VS_TONEMAPMETHOD_REINHARD; - float m_ToneMapParam = 1.0; - int m_Orientation = 0; - int m_CenterMixLevel = 0; // relative to metadata or default + int m_ToneMapMethod; + float m_ToneMapParam; + int m_Orientation; + int m_CenterMixLevel; // relative to metadata or default }; class CCriticalSection; diff --git a/xbmc/dialogs/GUIDialogKaiToast.cpp b/xbmc/dialogs/GUIDialogKaiToast.cpp index 239afaca31..68d1f4823e 100644 --- a/xbmc/dialogs/GUIDialogKaiToast.cpp +++ b/xbmc/dialogs/GUIDialogKaiToast.cpp @@ -72,6 +72,14 @@ void CGUIDialogKaiToast::AddToQueue(const std::string& aImageFile, const eMessag { CSingleLock lock(m_critical); + if (!m_notifications.empty()) + { + const auto& last = m_notifications.back(); + if (last.eType == eType && last.imagefile == aImageFile && last.caption == aCaption && + last.description == aDescription) + return; // avoid duplicates in a row. + } + Notification toast; toast.eType = eType; toast.imagefile = aImageFile; diff --git a/xbmc/filesystem/PluginDirectory.cpp b/xbmc/filesystem/PluginDirectory.cpp index 16c1188900..eae290391f 100644 --- a/xbmc/filesystem/PluginDirectory.cpp +++ b/xbmc/filesystem/PluginDirectory.cpp @@ -267,13 +267,13 @@ void CPluginDirectory::AddSortMethod(int handle, SORT_METHOD sortMethod, const s case SORT_METHOD_LABEL: case SORT_METHOD_LABEL_IGNORE_THE: { - dir->m_listItems->AddSortMethod(SortByLabel, 551, LABEL_MASKS(labelMask, label2Mask), CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_FILELISTS_IGNORETHEWHENSORTING) ? SortAttributeIgnoreArticle : SortAttributeNone); + dir->m_listItems->AddSortMethod(SortByLabel, 551, LABEL_MASKS(labelMask, label2Mask, labelMask, label2Mask), CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_FILELISTS_IGNORETHEWHENSORTING) ? SortAttributeIgnoreArticle : SortAttributeNone); break; } case SORT_METHOD_TITLE: case SORT_METHOD_TITLE_IGNORE_THE: { - dir->m_listItems->AddSortMethod(SortByTitle, 556, LABEL_MASKS(labelMask, label2Mask), CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_FILELISTS_IGNORETHEWHENSORTING) ? SortAttributeIgnoreArticle : SortAttributeNone); + dir->m_listItems->AddSortMethod(SortByTitle, 556, LABEL_MASKS(labelMask, label2Mask, labelMask, label2Mask), CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_FILELISTS_IGNORETHEWHENSORTING) ? SortAttributeIgnoreArticle : SortAttributeNone); break; } case SORT_METHOD_ARTIST: @@ -369,12 +369,12 @@ void CPluginDirectory::AddSortMethod(int handle, SORT_METHOD sortMethod, const s } case SORT_METHOD_UNSORTED: { - dir->m_listItems->AddSortMethod(SortByNone, 571, LABEL_MASKS(labelMask, label2Mask)); + dir->m_listItems->AddSortMethod(SortByNone, 571, LABEL_MASKS(labelMask, label2Mask, labelMask, label2Mask)); break; } case SORT_METHOD_NONE: { - dir->m_listItems->AddSortMethod(SortByNone, 552, LABEL_MASKS(labelMask, label2Mask)); + dir->m_listItems->AddSortMethod(SortByNone, 552, LABEL_MASKS(labelMask, label2Mask, labelMask, label2Mask)); break; } case SORT_METHOD_DRIVE_TYPE: @@ -411,12 +411,12 @@ void CPluginDirectory::AddSortMethod(int handle, SORT_METHOD sortMethod, const s } case SORT_METHOD_FULLPATH: { - dir->m_listItems->AddSortMethod(SortByPath, 573, LABEL_MASKS(labelMask, label2Mask)); + dir->m_listItems->AddSortMethod(SortByPath, 573, LABEL_MASKS(labelMask, label2Mask, labelMask, label2Mask)); break; } case SORT_METHOD_LABEL_IGNORE_FOLDERS: { - dir->m_listItems->AddSortMethod(SortByLabel, SortAttributeIgnoreFolders, 551, LABEL_MASKS(labelMask, label2Mask)); + dir->m_listItems->AddSortMethod(SortByLabel, SortAttributeIgnoreFolders, 551, LABEL_MASKS(labelMask, label2Mask, labelMask, label2Mask)); break; } case SORT_METHOD_LASTPLAYED: @@ -431,7 +431,7 @@ void CPluginDirectory::AddSortMethod(int handle, SORT_METHOD sortMethod, const s } case SORT_METHOD_CHANNEL: { - dir->m_listItems->AddSortMethod(SortByChannel, 19029, LABEL_MASKS(labelMask, label2Mask)); + dir->m_listItems->AddSortMethod(SortByChannel, 19029, LABEL_MASKS(labelMask, label2Mask, labelMask, label2Mask)); break; } diff --git a/xbmc/interfaces/json-rpc/ApplicationOperations.cpp b/xbmc/interfaces/json-rpc/ApplicationOperations.cpp index cdf158db55..f878a1321b 100644 --- a/xbmc/interfaces/json-rpc/ApplicationOperations.cpp +++ b/xbmc/interfaces/json-rpc/ApplicationOperations.cpp @@ -20,6 +20,7 @@ #include "utils/Variant.h" #include "utils/log.h" +#include <cmath> #include <string.h> using namespace JSONRPC; @@ -104,7 +105,7 @@ JSONRPC_STATUS CApplicationOperations::Quit(const std::string &method, ITranspor JSONRPC_STATUS CApplicationOperations::GetPropertyValue(const std::string &property, CVariant &result) { if (property == "volume") - result = static_cast<int>(g_application.GetVolumePercent()); + result = static_cast<int>(std::lroundf(g_application.GetVolumePercent())); else if (property == "muted") result = g_application.IsMuted(); else if (property == "name") diff --git a/xbmc/interfaces/json-rpc/schema/types.json b/xbmc/interfaces/json-rpc/schema/types.json index c4d40317e1..29dc585108 100644 --- a/xbmc/interfaces/json-rpc/schema/types.json +++ b/xbmc/interfaces/json-rpc/schema/types.json @@ -25,8 +25,9 @@ }, "Global.Time": { "type": "object", + "description": "A duration.", "properties": { - "hours": { "type": "integer", "required": true, "minimum": 0, "maximum": 23 }, + "hours": { "type": "integer", "required": true, "minimum": 0 }, "minutes": { "type": "integer", "required": true, "minimum": 0, "maximum": 59 }, "seconds": { "type": "integer", "required": true, "minimum": 0, "maximum": 59 }, "milliseconds": { "type": "integer", "required": true, "minimum": 0, "maximum": 999 } @@ -180,9 +181,10 @@ }, "Player.Position.Time": { "type": "object", + "description": "A position in duration.", "additionalProperties": false, "properties": { - "hours": { "type": "integer", "minimum": 0, "maximum": 23, "default": 0 }, + "hours": { "type": "integer", "minimum": 0, "default": 0 }, "minutes": { "type": "integer", "minimum": 0, "maximum": 59, "default": 0 }, "seconds": { "type": "integer", "minimum": 0, "maximum": 59, "default": 0 }, "milliseconds": { "type": "integer", "minimum": 0, "maximum": 999, "default": 0 } diff --git a/xbmc/interfaces/json-rpc/schema/version.txt b/xbmc/interfaces/json-rpc/schema/version.txt index 651cf58459..74c82f7af3 100644 --- a/xbmc/interfaces/json-rpc/schema/version.txt +++ b/xbmc/interfaces/json-rpc/schema/version.txt @@ -1 +1 @@ -JSONRPC_VERSION 11.19.1 +JSONRPC_VERSION 11.20.0 diff --git a/xbmc/music/MusicDatabase.cpp b/xbmc/music/MusicDatabase.cpp index 7623ca447b..76e5eeb2a2 100644 --- a/xbmc/music/MusicDatabase.cpp +++ b/xbmc/music/MusicDatabase.cpp @@ -1399,6 +1399,14 @@ int CMusicDatabase::UpdateAlbum(int idAlbum, if (idAlbum < 0) return -1; + // Art URLs limited on MySQL databases to 65535 characters (TEXT field) + // Truncate value cleaning up xml when URLs exceeds this + std::string strImageURLs = strImage; + if (StringUtils::EqualsNoCase( + CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_databaseMusic.type, + "mysql")) + TrimImageURLs(strImageURLs, 65535); + std::string strSQL; strSQL = PrepareSQL("UPDATE album SET " " strAlbum = '%s', strArtistDisp = '%s', strGenres = '%s', " @@ -1411,7 +1419,7 @@ int CMusicDatabase::UpdateAlbum(int idAlbum, " lastScraped = '%s', bScrapedMBID = %i", strAlbum.c_str(), strArtist.c_str(), strGenre.c_str(), strMoods.c_str(), strStyles.c_str(), strThemes.c_str(), - strReview.c_str(), strImage.c_str(), strLabel.c_str(), + strReview.c_str(), strImageURLs.c_str(), strLabel.c_str(), strType.c_str(), fRating, iUserrating, iVotes, strReleaseDate.c_str(), strOrigReleaseDate.c_str(), bBoxedSet, bCompilation, @@ -1811,6 +1819,14 @@ int CMusicDatabase::UpdateArtist(int idArtist, isScrapedMBID = false; } + // Art URLs limited on MySQL databases to 65535 characters (TEXT field) + // Truncate value cleaning up xml when URLs exceeds this + std::string strImageURLs = strImage; + if (StringUtils::EqualsNoCase( + CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_databaseMusic.type, + "mysql")) + TrimImageURLs(strImageURLs, 65535); + std::string strSQL; strSQL = PrepareSQL("UPDATE artist SET " " strArtist = '%s', " @@ -1827,7 +1843,7 @@ int CMusicDatabase::UpdateArtist(int idArtist, strBorn.c_str(), strFormed.c_str(), strGenres.c_str(), strMoods.c_str(), strStyles.c_str(), strInstruments.c_str(), strBiography.c_str(), strDied.c_str(), strDisbanded.c_str(), - strYearsActive.c_str(), strImage.c_str(), + strYearsActive.c_str(), strImageURLs.c_str(), CDateTime::GetUTCDateTime().GetAsDBDateTime().c_str(), isScrapedMBID); if (useMBIDNull) strSQL += PrepareSQL(", strMusicBrainzArtistID = NULL"); @@ -4232,6 +4248,20 @@ error: return ret; } +bool CMusicDatabase::TrimImageURLs(std::string& strImage, const size_t space) +{ + if (strImage.length() > space) + { + strImage = strImage.substr(0, space); + // Tidy to last </thumb> tag + size_t iPos = strImage.rfind("</thumb>"); + if (iPos == std::string::npos) + return false; + strImage = strImage.substr(0, iPos + 8); + } + return true; +} + bool CMusicDatabase::LookupCDDBInfo(bool bRequery/*=false*/) { #ifdef HAS_DVD_DRIVE @@ -8583,6 +8613,42 @@ void CMusicDatabase::UpdateTables(int version) m_pDS->exec("UPDATE artist SET strFanart = REPLACE(strFanart, '</fanart>', '')"); m_pDS->exec("UPDATE artist SET strFanart = REPLACE(strFanart, 'thumb preview', 'thumb " "aspect=\"fanart\" preview')"); + // Art URLs limited on MySQL databases to 65535 characters (TEXT field) + // Truncate the fanart when total URLs exceeds this + bool bisMySQL = StringUtils::EqualsNoCase( + CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_databaseMusic.type, + "mysql"); + if (bisMySQL) + { + std::string strSQL = "SELECT idArtist, strFanart, strImage FROM artist " + "WHERE LENGTH(strImage) + LENGTH(strFanart) > 65535"; + if (m_pDS->query(strSQL)) + { + while (!m_pDS->eof()) + { + int idArtist = m_pDS->fv("idArtist").get_asInt(); + std::string strFanart = m_pDS->fv("strFanart").get_asString(); + std::string strImage = m_pDS->fv("strImage").get_asString(); + size_t space = 65535; + // Trim strImage to allow arbitrary half space for fanart + if (!TrimImageURLs(strImage, space / 2)) + strImage.clear(); // </thumb> not found, empty field + space = space - strImage.length(); + // Trim fanart to fit remaining space + if (!TrimImageURLs(strFanart, space)) + strFanart.clear(); // </thumb> not found, empty field + + strSQL = PrepareSQL("UPDATE artist SET strFanart = '%s', strImage = '%s' " + "WHERE idArtist = %i", + strFanart.c_str(), strImage.c_str(), idArtist); + m_pDS2->exec(strSQL); // Use other dataset to update while looping result set + + m_pDS->next(); + } + m_pDS->close(); + } + } + // Remove strFanart column from artist table m_pDS->exec("CREATE TABLE artist_new (idArtist INTEGER PRIMARY KEY, " "strArtist varchar(256), strMusicBrainzArtistID text, " diff --git a/xbmc/music/MusicDatabase.h b/xbmc/music/MusicDatabase.h index 191dc983d1..697c475da1 100644 --- a/xbmc/music/MusicDatabase.h +++ b/xbmc/music/MusicDatabase.h @@ -754,6 +754,7 @@ private: bool SearchSongs(const std::string& strSearch, CFileItemList &songs); int GetSongIDFromPath(const std::string &filePath); void NormaliseSongDates(std::string& strRelease, std::string& strOriginal); + bool TrimImageURLs(std::string& strImage, const size_t space); /*! \brief Build SQL for sort subquery from ignore article token list \param strField original name or title field that articles could be removed from diff --git a/xbmc/music/infoscanner/MusicInfoScanner.cpp b/xbmc/music/infoscanner/MusicInfoScanner.cpp index 12aaab1d26..b8eafbb1ef 100644 --- a/xbmc/music/infoscanner/MusicInfoScanner.cpp +++ b/xbmc/music/infoscanner/MusicInfoScanner.cpp @@ -1931,7 +1931,7 @@ void CMusicInfoScanner::ScannerWait(unsigned int milliseconds) m_StopEvent.WaitMSec(milliseconds); } else - XbmcThreads::ThreadSleep(milliseconds); + std::this_thread::sleep_for(std::chrono::milliseconds(milliseconds)); } bool CMusicInfoScanner::AddArtistArtwork(CArtist& artist, const std::string& artfolder) diff --git a/xbmc/network/upnp/UPnPRenderer.cpp b/xbmc/network/upnp/UPnPRenderer.cpp index 2997d75cef..871209f502 100644 --- a/xbmc/network/upnp/UPnPRenderer.cpp +++ b/xbmc/network/upnp/UPnPRenderer.cpp @@ -109,6 +109,7 @@ CUPnPRenderer::SetupServices() ",http-get:*:audio/RED:*" ",http-get:*:audio/VDVI:*" ",http-get:*:audio/ac3:*" + ",http-get:*:audio/webm:*" ",http-get:*:audio/vorbis:*" ",http-get:*:audio/speex:*" ",http-get:*:audio/flac:*" @@ -128,6 +129,7 @@ CUPnPRenderer::SetupServices() ",http-get:*:image/ief:*" ",http-get:*:image/png:*" ",http-get:*:image/tiff:*" + ",http-get:*:image/webp:*" ",http-get:*:video/avi:*" ",http-get:*:video/divx:*" ",http-get:*:video/mpeg:*" @@ -151,6 +153,7 @@ CUPnPRenderer::SetupServices() ",http-get:*:video/MP1S:*" ",http-get:*:video/MP2P:*" ",http-get:*:video/BMPEG:*" + ",http-get:*:video/webm:*" ",http-get:*:video/xvid:*" ",http-get:*:video/x-divx:*" ",http-get:*:video/x-matroska:*" diff --git a/xbmc/platform/darwin/tvos/XBMCController.h b/xbmc/platform/darwin/tvos/XBMCController.h index 85f2db72cc..ec26fb3d72 100644 --- a/xbmc/platform/darwin/tvos/XBMCController.h +++ b/xbmc/platform/darwin/tvos/XBMCController.h @@ -24,8 +24,7 @@ class CFileItem; @interface XBMCController : UIViewController { BOOL m_isPlayingBeforeInactive; - UIBackgroundTaskIdentifier m_bgTask; - BOOL m_bgTaskActive; + UIBackgroundTaskIdentifier m_enterBackgroundTaskId; bool m_nativeKeyboardActive; BOOL m_pause; BOOL m_animating; @@ -54,8 +53,8 @@ class CFileItem; - (void)deactivateKeyboard:(UIView*)view; - (void)nativeKeyboardActive:(bool)active; -- (UIBackgroundTaskIdentifier)enableBackGroundTask; -- (void)disableBackGroundTask:(UIBackgroundTaskIdentifier)bgTaskID; +- (void)beginEnterBackgroundTask; +- (void)endEnterBackgroundTask; - (void)disableScreenSaver; - (void)enableScreenSaver; diff --git a/xbmc/platform/darwin/tvos/XBMCController.mm b/xbmc/platform/darwin/tvos/XBMCController.mm index 998f9f5ff7..5eb73951b7 100644 --- a/xbmc/platform/darwin/tvos/XBMCController.mm +++ b/xbmc/platform/darwin/tvos/XBMCController.mm @@ -174,20 +174,22 @@ XBMCController* g_xbmcController; #pragma mark - BackgroundTask -- (UIBackgroundTaskIdentifier)enableBackGroundTask; +- (void)beginEnterBackgroundTask; { - CLog::Log(LOGDEBUG, "%s: enableBackgroundTask created", __PRETTY_FUNCTION__); + CLog::Log(LOGDEBUG, "%s", __PRETTY_FUNCTION__); // we have to alloc the background task for keep network working after screen lock and dark. - return [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:nil]; + if (m_enterBackgroundTaskId == UIBackgroundTaskInvalid) + m_enterBackgroundTaskId = + [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:nil]; } -- (void)disableBackGroundTask:(UIBackgroundTaskIdentifier)bgTaskID; +- (void)endEnterBackgroundTask; { - if (bgTaskID != UIBackgroundTaskInvalid) + CLog::Log(LOGDEBUG, "%s", __PRETTY_FUNCTION__); + if (m_enterBackgroundTaskId != UIBackgroundTaskInvalid) { - CLog::Log(LOGDEBUG, "%s: endBackgroundTask closed", __PRETTY_FUNCTION__); - [[UIApplication sharedApplication] endBackgroundTask:bgTaskID]; - bgTaskID = UIBackgroundTaskInvalid; + [[UIApplication sharedApplication] endBackgroundTask:m_enterBackgroundTaskId]; + m_enterBackgroundTaskId = UIBackgroundTaskInvalid; } } @@ -196,22 +198,19 @@ XBMCController* g_xbmcController; - (void)enterBackground { CLog::Log(LOGDEBUG, "%s", __PRETTY_FUNCTION__); - - m_bgTask = [self enableBackGroundTask]; - m_bgTaskActive = YES; + [self beginEnterBackgroundTask]; // We need this hack, without it we stay stuck forever in // CPowerManager::OnSleep() // CApplication::StopPlaying() // CGUIWindowManager::ProcessRenderLoop + //TODO: Understand why we need this hack and fix the bug to remove this hack if (CServiceBroker::GetGUI()->GetWindowManager().GetActiveWindow() == WINDOW_SLIDESHOW || CServiceBroker::GetGUI()->GetWindowManager().GetActiveWindow() == WINDOW_FULLSCREEN_VIDEO || CServiceBroker::GetGUI()->GetWindowManager().GetActiveWindow() == WINDOW_FULLSCREEN_GAME || CServiceBroker::GetGUI()->GetWindowManager().GetActiveWindow() == WINDOW_VISUALISATION) CServiceBroker::GetGUI()->GetWindowManager().PreviousWindow(); - CServiceBroker::GetNetwork().GetServices().Stop(true); - dynamic_cast<CTVOSPowerSyscall*>(CServiceBroker::GetPowerManager().GetPowerSyscall()) ->SetOnPause(); CServiceBroker::GetPowerManager().ProcessEvents(); @@ -219,41 +218,23 @@ XBMCController* g_xbmcController; CWinSystemTVOS* winSystem = dynamic_cast<CWinSystemTVOS*>(CServiceBroker::GetWinSystem()); winSystem->OnAppFocusChange(false); - m_bgTaskActive = NO; - [self disableBackGroundTask:m_bgTask]; + CServiceBroker::GetNetwork().GetServices().Stop(true); + + [self endEnterBackgroundTask]; } - (void)enterForeground { CLog::Log(LOGDEBUG, "%s", __PRETTY_FUNCTION__); - // stop background task (if running) - if (m_bgTaskActive) + + // If enterBackground task is still running, wait + while (m_enterBackgroundTaskId != UIBackgroundTaskInvalid) { - CLog::Log(LOGDEBUG, "%s: bgTask already running, closing", __PRETTY_FUNCTION__); - [self disableBackGroundTask:m_bgTask]; + CLog::Log(LOGDEBUG, "%s: enterBackground task still running, wait", __PRETTY_FUNCTION__); + usleep(50 * 1000); } - [NSThread detachNewThreadSelector:@selector(enterForegroundDelayed:) - toTarget:self - withObject:nil]; -} - -- (void)enterForegroundDelayed:(id)arg -{ - - __block BOOL appstate = YES; - dispatch_async(dispatch_get_main_queue(), ^{ - if ([UIApplication sharedApplication].applicationState != UIApplicationStateActive) - appstate = NO; - }); - - if (!appstate) - return; - - // g_application.IsInitialized is only true if - // we were running and got moved to background - while (!g_application.IsInitialized()) - usleep(50 * 1000); + CServiceBroker::GetNetwork().GetServices().Start(); CWinSystemTVOS* winSystem = dynamic_cast<CWinSystemTVOS*>(CServiceBroker::GetWinSystem()); winSystem->OnAppFocusChange(true); @@ -261,7 +242,6 @@ XBMCController* g_xbmcController; dynamic_cast<CTVOSPowerSyscall*>(CServiceBroker::GetPowerManager().GetPowerSyscall()) ->SetOnResume(); CServiceBroker::GetPowerManager().ProcessEvents(); - CServiceBroker::GetNetwork().GetServices().Start(); // this handles what to do if we got pushed // into foreground by a topshelf item select/play @@ -492,7 +472,7 @@ int KODI_Run(bool renderGUI) { [displayManager removeModeSwitchObserver]; // stop background task (if running) - [self disableBackGroundTask:m_bgTask]; + [self endEnterBackgroundTask]; [self stopAnimation]; } @@ -508,8 +488,7 @@ int KODI_Run(bool renderGUI) m_animating = NO; m_isPlayingBeforeInactive = NO; - m_bgTaskActive = NO; - m_bgTask = UIBackgroundTaskInvalid; + m_enterBackgroundTaskId = UIBackgroundTaskInvalid; [self enableScreenSaver]; diff --git a/xbmc/platform/linux/input/LIRC.cpp b/xbmc/platform/linux/input/LIRC.cpp index 8dabfefaa4..c04c50cbb4 100644 --- a/xbmc/platform/linux/input/LIRC.cpp +++ b/xbmc/platform/linux/input/LIRC.cpp @@ -12,6 +12,7 @@ #include "ServiceBroker.h" #include "profiles/ProfileManager.h" #include "settings/AdvancedSettings.h" +#include "settings/Settings.h" #include "settings/SettingsComponent.h" #include "utils/log.h" @@ -42,7 +43,18 @@ void CLirc::Start() void CLirc::Process() { - m_profileId = CServiceBroker::GetSettingsComponent()->GetProfileManager()->GetCurrentProfileId(); + auto settingsComponent = CServiceBroker::GetSettingsComponent(); + if (!settingsComponent) + throw std::runtime_error("CSettingsComponent needs to exist before starting CLirc"); + + auto settings = settingsComponent->GetSettings(); + if (!settings) + throw std::runtime_error("CSettings needs to exist before starting CLirc"); + + while (!settings->IsLoaded()) + CThread::Sleep(1000); + + m_profileId = settingsComponent->GetProfileManager()->GetCurrentProfileId(); m_irTranslator.Load("Lircmap.xml"); // make sure work-around (CheckDaemon) uses the same socket path as lirc_init @@ -85,7 +97,7 @@ void CLirc::Process() } if (code != nullptr) { - int profileId = CServiceBroker::GetSettingsComponent()->GetProfileManager()->GetCurrentProfileId(); + int profileId = settingsComponent->GetProfileManager()->GetCurrentProfileId(); if (m_profileId != profileId) { m_profileId = profileId; diff --git a/xbmc/pvr/PVRDatabase.cpp b/xbmc/pvr/PVRDatabase.cpp index afba3956b5..62094e0976 100644 --- a/xbmc/pvr/PVRDatabase.cpp +++ b/xbmc/pvr/PVRDatabase.cpp @@ -75,6 +75,16 @@ void CPVRDatabase::Close() CDatabase::Close(); } +void CPVRDatabase::Lock() +{ + m_critSection.lock(); +} + +void CPVRDatabase::Unlock() +{ + m_critSection.unlock(); +} + void CPVRDatabase::CreateTables() { CSingleLock lock(m_critSection); @@ -289,19 +299,23 @@ bool CPVRDatabase::DeleteChannels() return DeleteValues("channels"); } -bool CPVRDatabase::Delete(const CPVRChannel& channel) +bool CPVRDatabase::QueueDeleteQuery(const CPVRChannel& channel) { /* invalid channel */ if (channel.ChannelID() <= 0) return false; - CLog::LogFC(LOGDEBUG, LOGPVR, "Deleting channel '{}' from the database", channel.ChannelName()); + CLog::LogFC(LOGDEBUG, LOGPVR, "Queueing delete for channel '{}' from the database", + channel.ChannelName()); Filter filter; filter.AppendWhere(PrepareSQL("idChannel = %u", channel.ChannelID())); - CSingleLock lock(m_critSection); - return DeleteValues("channels", filter); + std::string strQuery; + if (BuildSQL(PrepareSQL("DELETE FROM %s ", "channels"), filter, strQuery)) + return CDatabase::QueueDeleteQuery(strQuery); + + return false; } int CPVRDatabase::Get(CPVRChannelGroup& results, bool bCompressDB) diff --git a/xbmc/pvr/PVRDatabase.h b/xbmc/pvr/PVRDatabase.h index d0cb5cc879..f5d23db0a6 100644 --- a/xbmc/pvr/PVRDatabase.h +++ b/xbmc/pvr/PVRDatabase.h @@ -25,6 +25,8 @@ namespace PVR /** The PVR database */ + static constexpr int CHANNEL_COMMIT_QUERY_COUNT_LIMIT = 10000; + class CPVRDatabase : public CDatabase { public: @@ -46,6 +48,16 @@ namespace PVR void Close() override; /*! + * @brief Lock the database. + */ + void Lock(); + + /*! + * @brief Unlock the database. + */ + void Unlock(); + + /*! * @brief Get the minimal database version that is required to operate correctly. * @return The minimal database version. */ @@ -109,7 +121,7 @@ namespace PVR * @param channel The channel to remove. * @return True if the channel was removed, false otherwise. */ - bool Delete(const CPVRChannel& channel); + bool QueueDeleteQuery(const CPVRChannel& channel); /*! * @brief Get the list of channels from the database diff --git a/xbmc/pvr/channels/PVRChannel.cpp b/xbmc/pvr/channels/PVRChannel.cpp index 5187b1647d..7798653929 100644 --- a/xbmc/pvr/channels/PVRChannel.cpp +++ b/xbmc/pvr/channels/PVRChannel.cpp @@ -101,7 +101,7 @@ void CPVRChannel::Serialize(CVariant& value) const /********** XBMC related channel methods **********/ -bool CPVRChannel::Delete() +bool CPVRChannel::QueueDelete() { bool bReturn = false; const std::shared_ptr<CPVRDatabase> database = CServiceBroker::GetPVRManager().GetTVDatabase(); @@ -111,13 +111,13 @@ bool CPVRChannel::Delete() const std::shared_ptr<CPVREpg> epg = GetEPG(); if (epg) { - CServiceBroker::GetPVRManager().EpgContainer().DeleteEpg(epg); + CServiceBroker::GetPVRManager().EpgContainer().QueueDeleteEpg(epg); CSingleLock lock(m_critSection); m_epg.reset(); } - bReturn = database->Delete(*this); + bReturn = database->QueueDeleteQuery(*this); return bReturn; } diff --git a/xbmc/pvr/channels/PVRChannel.h b/xbmc/pvr/channels/PVRChannel.h index f678ed4661..ff489197f6 100644 --- a/xbmc/pvr/channels/PVRChannel.h +++ b/xbmc/pvr/channels/PVRChannel.h @@ -50,7 +50,7 @@ namespace PVR * @brief Delete this channel from the database and delete the corresponding EPG table if it exists. * @return True if it was deleted successfully, false otherwise. */ - bool Delete(); + bool QueueDelete(); /*! * @brief Update this channel tag with the data of the given channel tag. diff --git a/xbmc/pvr/channels/PVRChannelGroupInternal.cpp b/xbmc/pvr/channels/PVRChannelGroupInternal.cpp index 96e065d9dd..fe21c30975 100644 --- a/xbmc/pvr/channels/PVRChannelGroupInternal.cpp +++ b/xbmc/pvr/channels/PVRChannelGroupInternal.cpp @@ -17,6 +17,7 @@ #include "pvr/addons/PVRClients.h" #include "pvr/channels/PVRChannel.h" #include "pvr/epg/EpgContainer.h" +#include "pvr/epg/EpgDatabase.h" #include "utils/Variant.h" #include "utils/log.h" @@ -282,10 +283,43 @@ std::vector<std::shared_ptr<CPVRChannel>> CPVRChannelGroupInternal::RemoveDelete { std::vector<std::shared_ptr<CPVRChannel>> removedChannels = CPVRChannelGroup::RemoveDeletedChannels(channels); - for (const auto& channel : removedChannels) + bool channelsDeleted = false; + + const std::shared_ptr<CPVRDatabase> database = CServiceBroker::GetPVRManager().GetTVDatabase(); + const std::shared_ptr<CPVREpgDatabase> epgDatabase = + CServiceBroker::GetPVRManager().EpgContainer().GetEpgDatabase(); + if (!database || !epgDatabase) + { + CLog::LogF(LOGERROR, "No TV or EPG database"); + } + else { - // since channel was not found in the internal group, it was deleted from the backend - channel->Delete(); + // Note: We must lock the dbs the whole time, otherwise races may occur. + database->Lock(); + epgDatabase->Lock(); + + for (const auto& channel : removedChannels) + { + // since channel was not found in the internal group, it was deleted from the backend + channelsDeleted |= channel->QueueDelete(); + + size_t queryCount = epgDatabase->GetDeleteQueriesCount(); + if (queryCount > EPG_COMMIT_QUERY_COUNT_LIMIT) + epgDatabase->CommitDeleteQueries(); + + queryCount = database->GetDeleteQueriesCount(); + if (queryCount > CHANNEL_COMMIT_QUERY_COUNT_LIMIT) + database->CommitDeleteQueries(); + } + + if (channelsDeleted) + { + epgDatabase->CommitDeleteQueries(); + database->CommitDeleteQueries(); + } + + epgDatabase->Unlock(); + database->Unlock(); } return removedChannels; diff --git a/xbmc/pvr/epg/Epg.cpp b/xbmc/pvr/epg/Epg.cpp index 8fce752b2c..1c8972994c 100644 --- a/xbmc/pvr/epg/Epg.cpp +++ b/xbmc/pvr/epg/Epg.cpp @@ -330,7 +330,7 @@ bool CPVREpg::QueuePersistQuery(const std::shared_ptr<CPVREpgDatabase>& database return true; } -bool CPVREpg::Delete(const std::shared_ptr<CPVREpgDatabase>& database) +bool CPVREpg::QueueDeleteQueries(const std::shared_ptr<CPVREpgDatabase>& database) { if (!database) { @@ -339,10 +339,10 @@ bool CPVREpg::Delete(const std::shared_ptr<CPVREpgDatabase>& database) } // delete own epg db entry - database->Delete(*this); + database->QueueDeleteEpgQuery(*this); // delete all tags for this epg from db - m_tags.Delete(); + m_tags.QueueDelete(); Clear(); diff --git a/xbmc/pvr/epg/Epg.h b/xbmc/pvr/epg/Epg.h index 09577c378f..6b3f18da64 100644 --- a/xbmc/pvr/epg/Epg.h +++ b/xbmc/pvr/epg/Epg.h @@ -217,11 +217,11 @@ namespace PVR bool QueuePersistQuery(const std::shared_ptr<CPVREpgDatabase>& database); /*! - * @brief Delete this table from the given database + * @brief Write the delete queries into the given database's queue * @param database The database. - * @return True if the table was deleted, false otherwise. + * @return True on success, false otherwise. */ - bool Delete(const std::shared_ptr<CPVREpgDatabase>& database); + bool QueueDeleteQueries(const std::shared_ptr<CPVREpgDatabase>& database); /*! * @brief Get the start time of the first entry in this table. diff --git a/xbmc/pvr/epg/EpgContainer.cpp b/xbmc/pvr/epg/EpgContainer.cpp index 5aff3f3df3..2ffac5b268 100644 --- a/xbmc/pvr/epg/EpgContainer.cpp +++ b/xbmc/pvr/epg/EpgContainer.cpp @@ -319,7 +319,7 @@ bool CPVREpgContainer::PersistAll(unsigned int iMaxTimeslice) const bReturn &= epg->QueuePersistQuery(database); size_t queryCount = database->GetInsertQueriesCount() + database->GetDeleteQueriesCount(); - if (queryCount > 10000) + if (queryCount > EPG_COMMIT_QUERY_COUNT_LIMIT) { CLog::LogFC(LOGDEBUG, LOGEPG, "EPG Container: committing {} queries in loop.", queryCount); @@ -626,11 +626,18 @@ bool CPVREpgContainer::RemoveOldEntries() return true; } -bool CPVREpgContainer::DeleteEpg(const std::shared_ptr<CPVREpg>& epg) +bool CPVREpgContainer::QueueDeleteEpg(const std::shared_ptr<CPVREpg>& epg) { if (!epg || epg->EpgID() < 0) return false; + const std::shared_ptr<CPVREpgDatabase> database = GetEpgDatabase(); + if (!database) + { + CLog::LogF(LOGERROR, "No EPG database"); + return false; + } + std::shared_ptr<CPVREpg> epgToDelete; { CSingleLock lock(m_critSection); @@ -645,8 +652,7 @@ bool CPVREpgContainer::DeleteEpg(const std::shared_ptr<CPVREpg>& epg) m_channelUidToEpgMap.erase(epgEntry1); CLog::LogFC(LOGDEBUG, LOGEPG, "Deleting EPG table {} ({})", epg->Name(), epg->EpgID()); - - epgEntry->second->Delete(GetEpgDatabase()); + epgEntry->second->QueueDeleteQueries(database); epgToDelete = epgEntry->second; m_epgIdToEpgMap.erase(epgEntry); @@ -749,8 +755,17 @@ bool CPVREpgContainer::UpdateEPG(bool bOnlyPending /* = false */) if (bShowProgress && !bOnlyPending) progressHandler->DestroyProgress(); + database->Lock(); for (const auto& epg : invalidTables) - DeleteEpg(epg); + { + QueueDeleteEpg(epg); + + size_t queryCount = database->GetDeleteQueriesCount(); + if (queryCount > EPG_COMMIT_QUERY_COUNT_LIMIT) + database->CommitDeleteQueries(); + } + database->CommitDeleteQueries(); + database->Unlock(); if (bInterrupted) { diff --git a/xbmc/pvr/epg/EpgContainer.h b/xbmc/pvr/epg/EpgContainer.h index edfc48c4e6..c997b963ce 100644 --- a/xbmc/pvr/epg/EpgContainer.h +++ b/xbmc/pvr/epg/EpgContainer.h @@ -86,11 +86,11 @@ namespace PVR bool IsStarted() const; /*! - * @brief Delete an EPG table from this container. + * @brief Queue the deletion of an EPG table from this container. * @param epg The table to delete. * @return True on success, false otherwise. */ - bool DeleteEpg(const std::shared_ptr<CPVREpg>& epg); + bool QueueDeleteEpg(const std::shared_ptr<CPVREpg>& epg); /*! * @brief CEventStream callback for PVR events. diff --git a/xbmc/pvr/epg/EpgDatabase.cpp b/xbmc/pvr/epg/EpgDatabase.cpp index 383872d6a1..b0e10e8baa 100644 --- a/xbmc/pvr/epg/EpgDatabase.cpp +++ b/xbmc/pvr/epg/EpgDatabase.cpp @@ -274,7 +274,7 @@ bool CPVREpgDatabase::DeleteEpg() return bReturn; } -bool CPVREpgDatabase::Delete(const CPVREpg& table) +bool CPVREpgDatabase::QueueDeleteEpgQuery(const CPVREpg& table) { /* invalid channel */ if (table.EpgID() <= 0) @@ -287,7 +287,12 @@ bool CPVREpgDatabase::Delete(const CPVREpg& table) CSingleLock lock(m_critSection); filter.AppendWhere(PrepareSQL("idEpg = %u", table.EpgID())); - return DeleteValues("epg", filter); + + std::string strQuery; + if (BuildSQL(PrepareSQL("DELETE FROM %s ", "epg"), filter, strQuery)) + return QueueDeleteQuery(strQuery); + + return false; } bool CPVREpgDatabase::QueueDeleteTagQuery(const CPVREpgInfoTag& tag) @@ -941,8 +946,10 @@ bool CPVREpgDatabase::QueueDeleteEpgTagsByMinEndMaxStartTimeQuery(int iEpgID, static_cast<unsigned int>(maxStart))); std::string strQuery; - BuildSQL("DELETE FROM epgtags", filter, strQuery); - return QueueDeleteQuery(strQuery); + if (BuildSQL("DELETE FROM epgtags", filter, strQuery)) + return QueueDeleteQuery(strQuery); + + return false; } std::vector<std::shared_ptr<CPVREpgInfoTag>> CPVREpgDatabase::GetAllEpgTags(int iEpgID) @@ -1052,6 +1059,18 @@ bool CPVREpgDatabase::DeleteEpgTags(int iEpgId) return DeleteValues("epgtags", filter); } +bool CPVREpgDatabase::QueueDeleteEpgTags(int iEpgId) +{ + Filter filter; + + CSingleLock lock(m_critSection); + filter.AppendWhere(PrepareSQL("idEpg = %u", iEpgId)); + + std::string strQuery; + BuildSQL(PrepareSQL("DELETE FROM %s ", "epg"), filter, strQuery); + return QueueDeleteQuery(strQuery); +} + bool CPVREpgDatabase::QueuePersistQuery(const CPVREpgInfoTag& tag) { if (tag.EpgID() <= 0) diff --git a/xbmc/pvr/epg/EpgDatabase.h b/xbmc/pvr/epg/EpgDatabase.h index 1e02e6f90b..a0ab972d59 100644 --- a/xbmc/pvr/epg/EpgDatabase.h +++ b/xbmc/pvr/epg/EpgDatabase.h @@ -25,6 +25,8 @@ namespace PVR /** The EPG database */ + static constexpr int EPG_COMMIT_QUERY_COUNT_LIMIT = 10000; + class CPVREpgDatabase : public CDatabase, public std::enable_shared_from_this<CPVREpgDatabase> { public: @@ -81,11 +83,11 @@ namespace PVR bool DeleteEpg(); /*! - * @brief Delete an EPG table. - * @param table The table to remove. - * @return True if the table was removed successfully, false otherwise. + * @brief Queue deletionof an EPG table. + * @param tag The table to queue for deletion. + * @return True on success, false otherwise. */ - bool Delete(const CPVREpg& table); + bool QueueDeleteEpgQuery(const CPVREpg& table); /*! * @brief Write the query to delete the given EPG tag to db query queue. @@ -258,6 +260,13 @@ namespace PVR bool DeleteEpgTags(int iEpgId); /*! + * @brief Queue the erase all EPG tags with the given epg ID. + * @param iEpgId The ID of the EPG. + * @return True if the entries were queued successfully, false otherwise. + */ + bool QueueDeleteEpgTags(int iEpgId); + + /*! * @brief Write the query to persist the given EPG tag to db query queue. * @param tag The tag to persist. * @return True on success, false otherwise. diff --git a/xbmc/pvr/epg/EpgTagsContainer.cpp b/xbmc/pvr/epg/EpgTagsContainer.cpp index 797f0c10c7..c1a8123959 100644 --- a/xbmc/pvr/epg/EpgTagsContainer.cpp +++ b/xbmc/pvr/epg/EpgTagsContainer.cpp @@ -643,10 +643,10 @@ void CPVREpgTagsContainer::QueuePersistQuery() } } -void CPVREpgTagsContainer::Delete() +void CPVREpgTagsContainer::QueueDelete() { if (m_database) - m_database->DeleteEpgTags(m_iEpgID); + m_database->QueueDeleteEpgTags(m_iEpgID); Clear(); } diff --git a/xbmc/pvr/epg/EpgTagsContainer.h b/xbmc/pvr/epg/EpgTagsContainer.h index 75ed5029b9..99b06b946f 100644 --- a/xbmc/pvr/epg/EpgTagsContainer.h +++ b/xbmc/pvr/epg/EpgTagsContainer.h @@ -171,9 +171,9 @@ public: void QueuePersistQuery(); /*! - * @brief Delete this container from its database. + * @brief Queue the deletion of this container from its database. */ - void Delete(); + void QueueDelete(); private: /*! diff --git a/xbmc/pvr/timers/PVRTimerInfoTag.cpp b/xbmc/pvr/timers/PVRTimerInfoTag.cpp index e733a402c1..b4540e9501 100644 --- a/xbmc/pvr/timers/PVRTimerInfoTag.cpp +++ b/xbmc/pvr/timers/PVRTimerInfoTag.cpp @@ -1123,7 +1123,7 @@ void CPVRTimerInfoTag::SetFirstDayFromLocalTime(const CDateTime& firstDay) m_FirstDay = ConvertLocalTimeToUTC(firstDay); } -void CPVRTimerInfoTag::GetNotificationText(std::string& strText) const +std::string CPVRTimerInfoTag::GetNotificationText() const { CSingleLock lock(m_critSection); @@ -1160,8 +1160,11 @@ void CPVRTimerInfoTag::GetNotificationText(std::string& strText) const default: break; } + if (stringID != 0) - strText = StringUtils::Format("%s: '%s'", g_localizeStrings.Get(stringID).c_str(), m_strTitle.c_str()); + return StringUtils::Format("%s: '%s'", g_localizeStrings.Get(stringID).c_str(), m_strTitle.c_str()); + + return {}; } std::string CPVRTimerInfoTag::GetDeletedNotificationText() const diff --git a/xbmc/pvr/timers/PVRTimerInfoTag.h b/xbmc/pvr/timers/PVRTimerInfoTag.h index 75380be8d4..d8b603329a 100644 --- a/xbmc/pvr/timers/PVRTimerInfoTag.h +++ b/xbmc/pvr/timers/PVRTimerInfoTag.h @@ -250,13 +250,12 @@ namespace PVR /*! * @brief Get the text for the notification. - * @param strText The notification. */ - void GetNotificationText(std::string& strText) const; + std::string GetNotificationText() const; /*! - * @brief Get the text for the notification when a timer has been deleted - */ + * @brief Get the text for the notification when a timer has been deleted + */ std::string GetDeletedNotificationText() const; const std::string& Title() const; diff --git a/xbmc/pvr/timers/PVRTimers.cpp b/xbmc/pvr/timers/PVRTimers.cpp index 06d1bfcc75..62b3f220b7 100644 --- a/xbmc/pvr/timers/PVRTimers.cpp +++ b/xbmc/pvr/timers/PVRTimers.cpp @@ -200,6 +200,23 @@ void CPVRTimers::RemoveEntry(const std::shared_ptr<CPVRTimerInfoTag>& tag) } } +bool CPVRTimers::CheckAndAppendTimerNotification( + std::vector<std::pair<int, std::string>>& timerNotifications, + const std::shared_ptr<CPVRTimerInfoTag>& tag, + bool bDeleted) const +{ + // no notification on first update or if previous update failed for tag's client. + if (!m_bFirstUpdate && std::find(m_failedClients.cbegin(), m_failedClients.cend(), + tag->m_iClientId) == m_failedClients.cend()) + { + const std::string strMessage = + bDeleted ? tag->GetDeletedNotificationText() : tag->GetNotificationText(); + timerNotifications.emplace_back(std::make_pair(tag->m_iClientId, strMessage)); + return true; + } + return false; +} + bool CPVRTimers::UpdateEntries(const CPVRTimersContainer& timers, const std::vector<int>& failedClients) { bool bChanged(false); @@ -225,11 +242,7 @@ bool CPVRTimers::UpdateEntries(const CPVRTimersContainer& timers, const std::vec existingTimer->ResetChildState(); if (bStateChanged) - { - std::string strMessage; - existingTimer->GetNotificationText(strMessage); - timerNotifications.emplace_back(std::make_pair((*timerIt)->m_iClientId, strMessage)); - } + CheckAndAppendTimerNotification(timerNotifications, existingTimer, false); CLog::LogFC(LOGDEBUG, LOGPVR, "Updated timer {} on client {}", (*timerIt)->m_iClientIndex, (*timerIt)->m_iClientId); @@ -246,9 +259,7 @@ bool CPVRTimers::UpdateEntries(const CPVRTimersContainer& timers, const std::vec bChanged = true; bAddedOrDeleted = true; - std::string strMessage; - newTimer->GetNotificationText(strMessage); - timerNotifications.emplace_back(newTimer->m_iClientId, strMessage); + CheckAndAppendTimerNotification(timerNotifications, newTimer, false); CLog::LogFC(LOGDEBUG, LOGPVR, "Added timer {} on client {}", (*timerIt)->m_iClientIndex, (*timerIt)->m_iClientId); @@ -290,7 +301,7 @@ bool CPVRTimers::UpdateEntries(const CPVRTimersContainer& timers, const std::vec CLog::LogFC(LOGDEBUG, LOGPVR, "Deleted timer {} on client {}", timer->m_iClientIndex, timer->m_iClientId); - timerNotifications.emplace_back(timer->m_iClientId, timer->GetDeletedNotificationText()); + CheckAndAppendTimerNotification(timerNotifications, timer, true); it2 = it->second.erase(it2); @@ -347,7 +358,10 @@ bool CPVRTimers::UpdateEntries(const CPVRTimersContainer& timers, const std::vec } } + m_failedClients = failedClients; + m_bFirstUpdate = false; m_bIsUpdating = false; + if (bChanged) { UpdateChannels(); @@ -355,7 +369,7 @@ bool CPVRTimers::UpdateEntries(const CPVRTimersContainer& timers, const std::vec NotifyTimersEvent(bAddedOrDeleted); - if (!timerNotifications.empty() && CServiceBroker::GetPVRManager().IsStarted()) + if (!timerNotifications.empty()) { CPVREventLogJob* job = new CPVREventLogJob; diff --git a/xbmc/pvr/timers/PVRTimers.h b/xbmc/pvr/timers/PVRTimers.h index d51b7c1fbf..8d259b7edb 100644 --- a/xbmc/pvr/timers/PVRTimers.h +++ b/xbmc/pvr/timers/PVRTimers.h @@ -285,9 +285,17 @@ namespace PVR std::vector<std::shared_ptr<CPVRTimerInfoTag>> GetActiveRecordings(const TimerKind& eKind) const; int AmountActiveRecordings(const TimerKind& eKind) const; + bool CheckAndAppendTimerNotification( + std::vector<std::pair<int, std::string>>& timerNotifications, + const std::shared_ptr<CPVRTimerInfoTag>& tag, + bool bDeleted) const; + bool m_bIsUpdating = false; CPVRSettings m_settings; std::queue<std::shared_ptr<CPVRTimerInfoTag>> m_remindersToAnnounce; bool m_bReminderRulesUpdatePending = false; + + bool m_bFirstUpdate = true; + std::vector<int> m_failedClients; }; } diff --git a/xbmc/settings/MediaSettings.cpp b/xbmc/settings/MediaSettings.cpp index 27c5ac7bea..37d653e999 100644 --- a/xbmc/settings/MediaSettings.cpp +++ b/xbmc/settings/MediaSettings.cpp @@ -114,10 +114,11 @@ bool CMediaSettings::Load(const TiXmlNode *settings) m_defaultVideoSettings.m_StereoMode = 0; if (!XMLUtils::GetInt(pElement, "centermixlevel", m_defaultVideoSettings.m_CenterMixLevel)) m_defaultVideoSettings.m_CenterMixLevel = 0; - - m_defaultVideoSettings.m_ToneMapMethod = 1; - m_defaultVideoSettings.m_ToneMapParam = 1.0f; m_defaultVideoSettings.m_SubtitleCached = false; + if (!XMLUtils::GetInt(pElement, "tonemapmethod", m_defaultVideoSettings.m_ToneMapMethod)) + m_defaultVideoSettings.m_ToneMapMethod = VS_TONEMAPMETHOD_REINHARD; + if (!XMLUtils::GetFloat(pElement, "tonemapparam", m_defaultVideoSettings.m_ToneMapParam, 0.1f, 5.0f)) + m_defaultVideoSettings.m_ToneMapParam = 1.0f; } m_defaultGameSettings.Reset(); @@ -220,6 +221,8 @@ bool CMediaSettings::Save(TiXmlNode *settings) const XMLUtils::SetBoolean(pNode, "nonlinstretch", m_defaultVideoSettings.m_CustomNonLinStretch); XMLUtils::SetInt(pNode, "stereomode", m_defaultVideoSettings.m_StereoMode); XMLUtils::SetInt(pNode, "centermixlevel", m_defaultVideoSettings.m_CenterMixLevel); + XMLUtils::SetInt(pNode, "tonemapmethod", m_defaultVideoSettings.m_ToneMapMethod); + XMLUtils::SetFloat(pNode, "tonemapparam", m_defaultVideoSettings.m_ToneMapParam); // default audio settings for dsp addons TiXmlElement audioSettingsNode("defaultaudiosettings"); diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp index 1d2e681965..d4bd941376 100644 --- a/xbmc/settings/Settings.cpp +++ b/xbmc/settings/Settings.cpp @@ -60,388 +60,379 @@ using namespace KODI; using namespace XFILE; -const std::string CSettings::SETTING_LOOKANDFEEL_SKIN = "lookandfeel.skin"; -const std::string CSettings::SETTING_LOOKANDFEEL_SKINSETTINGS = "lookandfeel.skinsettings"; -const std::string CSettings::SETTING_LOOKANDFEEL_SKINTHEME = "lookandfeel.skintheme"; -const std::string CSettings::SETTING_LOOKANDFEEL_SKINCOLORS = "lookandfeel.skincolors"; -const std::string CSettings::SETTING_LOOKANDFEEL_FONT = "lookandfeel.font"; -const std::string CSettings::SETTING_LOOKANDFEEL_SKINZOOM = "lookandfeel.skinzoom"; -const std::string CSettings::SETTING_LOOKANDFEEL_STARTUPACTION = "lookandfeel.startupaction"; -const std::string CSettings::SETTING_LOOKANDFEEL_STARTUPWINDOW = "lookandfeel.startupwindow"; -const std::string CSettings::SETTING_LOOKANDFEEL_SOUNDSKIN = "lookandfeel.soundskin"; -const std::string CSettings::SETTING_LOOKANDFEEL_ENABLERSSFEEDS = "lookandfeel.enablerssfeeds"; -const std::string CSettings::SETTING_LOOKANDFEEL_RSSEDIT = "lookandfeel.rssedit"; -const std::string CSettings::SETTING_LOOKANDFEEL_STEREOSTRENGTH = "lookandfeel.stereostrength"; -const std::string CSettings::SETTING_LOCALE_LANGUAGE = "locale.language"; -const std::string CSettings::SETTING_LOCALE_COUNTRY = "locale.country"; -const std::string CSettings::SETTING_LOCALE_CHARSET = "locale.charset"; -const std::string CSettings::SETTING_LOCALE_KEYBOARDLAYOUTS = "locale.keyboardlayouts"; -const std::string CSettings::SETTING_LOCALE_ACTIVEKEYBOARDLAYOUT = "locale.activekeyboardlayout"; -const std::string CSettings::SETTING_LOCALE_TIMEZONECOUNTRY = "locale.timezonecountry"; -const std::string CSettings::SETTING_LOCALE_TIMEZONE = "locale.timezone"; -const std::string CSettings::SETTING_LOCALE_SHORTDATEFORMAT = "locale.shortdateformat"; -const std::string CSettings::SETTING_LOCALE_LONGDATEFORMAT = "locale.longdateformat"; -const std::string CSettings::SETTING_LOCALE_TIMEFORMAT = "locale.timeformat"; -const std::string CSettings::SETTING_LOCALE_USE24HOURCLOCK = "locale.use24hourclock"; -const std::string CSettings::SETTING_LOCALE_TEMPERATUREUNIT = "locale.temperatureunit"; -const std::string CSettings::SETTING_LOCALE_SPEEDUNIT = "locale.speedunit"; -const std::string CSettings::SETTING_FILELISTS_SHOWPARENTDIRITEMS = "filelists.showparentdiritems"; -const std::string CSettings::SETTING_FILELISTS_SHOWEXTENSIONS = "filelists.showextensions"; -const std::string CSettings::SETTING_FILELISTS_IGNORETHEWHENSORTING = "filelists.ignorethewhensorting"; -const std::string CSettings::SETTING_FILELISTS_ALLOWFILEDELETION = "filelists.allowfiledeletion"; -const std::string CSettings::SETTING_FILELISTS_SHOWADDSOURCEBUTTONS = "filelists.showaddsourcebuttons"; -const std::string CSettings::SETTING_FILELISTS_SHOWHIDDEN = "filelists.showhidden"; -const std::string CSettings::SETTING_SCREENSAVER_MODE = "screensaver.mode"; -const std::string CSettings::SETTING_SCREENSAVER_SETTINGS = "screensaver.settings"; -const std::string CSettings::SETTING_SCREENSAVER_PREVIEW = "screensaver.preview"; -const std::string CSettings::SETTING_SCREENSAVER_TIME = "screensaver.time"; -const std::string CSettings::SETTING_SCREENSAVER_USEMUSICVISINSTEAD = "screensaver.usemusicvisinstead"; -const std::string CSettings::SETTING_SCREENSAVER_USEDIMONPAUSE = "screensaver.usedimonpause"; -const std::string CSettings::SETTING_WINDOW_WIDTH = "window.width"; -const std::string CSettings::SETTING_WINDOW_HEIGHT = "window.height"; -const std::string CSettings::SETTING_VIDEOLIBRARY_SHOWUNWATCHEDPLOTS = "videolibrary.showunwatchedplots"; -const std::string CSettings::SETTING_VIDEOLIBRARY_ACTORTHUMBS = "videolibrary.actorthumbs"; -const std::string CSettings::SETTING_MYVIDEOS_FLATTEN = "myvideos.flatten"; -const std::string CSettings::SETTING_VIDEOLIBRARY_FLATTENTVSHOWS = "videolibrary.flattentvshows"; -const std::string CSettings::SETTING_VIDEOLIBRARY_TVSHOWSSELECTFIRSTUNWATCHEDITEM = "videolibrary.tvshowsselectfirstunwatcheditem"; -const std::string CSettings::SETTING_VIDEOLIBRARY_TVSHOWSINCLUDEALLSEASONSANDSPECIALS = "videolibrary.tvshowsincludeallseasonsandspecials"; -const std::string CSettings::SETTING_VIDEOLIBRARY_SHOWALLITEMS = "videolibrary.showallitems"; -const std::string CSettings::SETTING_VIDEOLIBRARY_GROUPMOVIESETS = "videolibrary.groupmoviesets"; -const std::string CSettings::SETTING_VIDEOLIBRARY_GROUPSINGLEITEMSETS = "videolibrary.groupsingleitemsets"; -const std::string CSettings::SETTING_VIDEOLIBRARY_UPDATEONSTARTUP = "videolibrary.updateonstartup"; -const std::string CSettings::SETTING_VIDEOLIBRARY_BACKGROUNDUPDATE = "videolibrary.backgroundupdate"; -const std::string CSettings::SETTING_VIDEOLIBRARY_CLEANUP = "videolibrary.cleanup"; -const std::string CSettings::SETTING_VIDEOLIBRARY_EXPORT = "videolibrary.export"; -const std::string CSettings::SETTING_VIDEOLIBRARY_IMPORT = "videolibrary.import"; -const std::string CSettings::SETTING_VIDEOLIBRARY_SHOWEMPTYTVSHOWS = "videolibrary.showemptytvshows"; -const std::string CSettings::SETTING_VIDEOLIBRARY_MOVIESETSFOLDER = "videolibrary.moviesetsfolder"; -const std::string CSettings::SETTING_VIDEOLIBRARY_ARTWORK_LEVEL = - "videolibrary.artworklevel"; -const std::string CSettings::SETTING_VIDEOLIBRARY_MOVIEART_WHITELIST = - "videolibrary.movieartwhitelist"; -const std::string CSettings::SETTING_VIDEOLIBRARY_TVSHOWART_WHITELIST = - "videolibrary.tvshowartwhitelist"; -const std::string CSettings::SETTING_VIDEOLIBRARY_EPISODEART_WHITELIST = - "videolibrary.episodeartwhitelist"; -const std::string CSettings::SETTING_VIDEOLIBRARY_MUSICVIDEOART_WHITELIST = - "videolibrary.musicvideoartwhitelist"; -const std::string CSettings::SETTING_VIDEOLIBRARY_ARTSETTINGS_UPDATED = - "videolibrary.artsettingsupdated"; -const std::string CSettings::SETTING_VIDEOLIBRARY_SHOWPERFORMERS = - "videolibrary.musicvideosallperformers"; -const std::string CSettings::SETTING_LOCALE_AUDIOLANGUAGE = "locale.audiolanguage"; -const std::string CSettings::SETTING_VIDEOPLAYER_PREFERDEFAULTFLAG = "videoplayer.preferdefaultflag"; -const std::string CSettings::SETTING_VIDEOPLAYER_AUTOPLAYNEXTITEM = "videoplayer.autoplaynextitem"; -const std::string CSettings::SETTING_VIDEOPLAYER_SEEKSTEPS = "videoplayer.seeksteps"; -const std::string CSettings::SETTING_VIDEOPLAYER_SEEKDELAY = "videoplayer.seekdelay"; -const std::string CSettings::SETTING_VIDEOPLAYER_ADJUSTREFRESHRATE = "videoplayer.adjustrefreshrate"; -const std::string CSettings::SETTING_VIDEOPLAYER_USEDISPLAYASCLOCK = "videoplayer.usedisplayasclock"; -const std::string CSettings::SETTING_VIDEOPLAYER_ERRORINASPECT = "videoplayer.errorinaspect"; -const std::string CSettings::SETTING_VIDEOPLAYER_STRETCH43 = "videoplayer.stretch43"; -const std::string CSettings::SETTING_VIDEOPLAYER_TELETEXTENABLED = "videoplayer.teletextenabled"; -const std::string CSettings::SETTING_VIDEOPLAYER_TELETEXTSCALE = "videoplayer.teletextscale"; -const std::string CSettings::SETTING_VIDEOPLAYER_STEREOSCOPICPLAYBACKMODE = "videoplayer.stereoscopicplaybackmode"; -const std::string CSettings::SETTING_VIDEOPLAYER_QUITSTEREOMODEONSTOP = "videoplayer.quitstereomodeonstop"; -const std::string CSettings::SETTING_VIDEOPLAYER_RENDERMETHOD = "videoplayer.rendermethod"; -const std::string CSettings::SETTING_VIDEOPLAYER_HQSCALERS = "videoplayer.hqscalers"; -const std::string CSettings::SETTING_VIDEOPLAYER_USEMEDIACODEC = "videoplayer.usemediacodec"; -const std::string CSettings::SETTING_VIDEOPLAYER_USEMEDIACODECSURFACE = "videoplayer.usemediacodecsurface"; -const std::string CSettings::SETTING_VIDEOPLAYER_USEVDPAU = "videoplayer.usevdpau"; -const std::string CSettings::SETTING_VIDEOPLAYER_USEVDPAUMIXER = "videoplayer.usevdpaumixer"; -const std::string CSettings::SETTING_VIDEOPLAYER_USEVDPAUMPEG2 = "videoplayer.usevdpaumpeg2"; -const std::string CSettings::SETTING_VIDEOPLAYER_USEVDPAUMPEG4 = "videoplayer.usevdpaumpeg4"; -const std::string CSettings::SETTING_VIDEOPLAYER_USEVDPAUVC1 = "videoplayer.usevdpauvc1"; -const std::string CSettings::SETTING_VIDEOPLAYER_USEDXVA2 = "videoplayer.usedxva2"; -const std::string CSettings::SETTING_VIDEOPLAYER_USEVTB = "videoplayer.usevtb"; -const std::string CSettings::SETTING_VIDEOPLAYER_USEPRIMEDECODER = "videoplayer.useprimedecoder"; -const std::string CSettings::SETTING_VIDEOPLAYER_USESTAGEFRIGHT = "videoplayer.usestagefright"; -const std::string CSettings::SETTING_VIDEOPLAYER_LIMITGUIUPDATE = "videoplayer.limitguiupdate"; -const std::string CSettings::SETTING_VIDEOPLAYER_SUPPORTMVC = "videoplayer.supportmvc"; -const std::string CSettings::SETTING_MYVIDEOS_SELECTACTION = "myvideos.selectaction"; -const std::string CSettings::SETTING_MYVIDEOS_USETAGS = "myvideos.usetags"; -const std::string CSettings::SETTING_MYVIDEOS_EXTRACTFLAGS = "myvideos.extractflags"; -const std::string CSettings::SETTING_MYVIDEOS_EXTRACTCHAPTERTHUMBS = "myvideos.extractchapterthumbs"; -const std::string CSettings::SETTING_MYVIDEOS_REPLACELABELS = "myvideos.replacelabels"; -const std::string CSettings::SETTING_MYVIDEOS_EXTRACTTHUMB = "myvideos.extractthumb"; -const std::string CSettings::SETTING_MYVIDEOS_STACKVIDEOS = "myvideos.stackvideos"; -const std::string CSettings::SETTING_LOCALE_SUBTITLELANGUAGE = "locale.subtitlelanguage"; -const std::string CSettings::SETTING_SUBTITLES_PARSECAPTIONS = "subtitles.parsecaptions"; -const std::string CSettings::SETTING_SUBTITLES_ALIGN = "subtitles.align"; -const std::string CSettings::SETTING_SUBTITLES_STEREOSCOPICDEPTH = "subtitles.stereoscopicdepth"; -const std::string CSettings::SETTING_SUBTITLES_FONT = "subtitles.font"; -const std::string CSettings::SETTING_SUBTITLES_HEIGHT = "subtitles.height"; -const std::string CSettings::SETTING_SUBTITLES_STYLE = "subtitles.style"; -const std::string CSettings::SETTING_SUBTITLES_COLOR = "subtitles.color"; -const std::string CSettings::SETTING_SUBTITLES_BGCOLOR = "subtitles.bgcolor"; -const std::string CSettings::SETTING_SUBTITLES_BGOPACITY = "subtitles.bgopacity"; -const std::string CSettings::SETTING_SUBTITLES_CHARSET = "subtitles.charset"; -const std::string CSettings::SETTING_SUBTITLES_OVERRIDEASSFONTS = "subtitles.overrideassfonts"; -const std::string CSettings::SETTING_SUBTITLES_LANGUAGES = "subtitles.languages"; -const std::string CSettings::SETTING_SUBTITLES_STORAGEMODE = "subtitles.storagemode"; -const std::string CSettings::SETTING_SUBTITLES_CUSTOMPATH = "subtitles.custompath"; -const std::string CSettings::SETTING_SUBTITLES_PAUSEONSEARCH = "subtitles.pauseonsearch"; -const std::string CSettings::SETTING_SUBTITLES_DOWNLOADFIRST = "subtitles.downloadfirst"; -const std::string CSettings::SETTING_SUBTITLES_TV = "subtitles.tv"; -const std::string CSettings::SETTING_SUBTITLES_MOVIE = "subtitles.movie"; -const std::string CSettings::SETTING_DVDS_AUTORUN = "dvds.autorun"; -const std::string CSettings::SETTING_DVDS_PLAYERREGION = "dvds.playerregion"; -const std::string CSettings::SETTING_DVDS_AUTOMENU = "dvds.automenu"; -const std::string CSettings::SETTING_DISC_PLAYBACK = "disc.playback"; -const std::string CSettings::SETTING_BLURAY_PLAYERREGION = "bluray.playerregion"; -const std::string CSettings::SETTING_ACCESSIBILITY_AUDIOVISUAL = "accessibility.audiovisual"; -const std::string CSettings::SETTING_ACCESSIBILITY_AUDIOHEARING = "accessibility.audiohearing"; -const std::string CSettings::SETTING_ACCESSIBILITY_SUBHEARING = "accessibility.subhearing"; -const std::string CSettings::SETTING_SCRAPERS_MOVIESDEFAULT = "scrapers.moviesdefault"; -const std::string CSettings::SETTING_SCRAPERS_TVSHOWSDEFAULT = "scrapers.tvshowsdefault"; -const std::string CSettings::SETTING_SCRAPERS_MUSICVIDEOSDEFAULT = "scrapers.musicvideosdefault"; -const std::string CSettings::SETTING_PVRMANAGER_PRESELECTPLAYINGCHANNEL = "pvrmanager.preselectplayingchannel"; -const std::string CSettings::SETTING_PVRMANAGER_SYNCCHANNELGROUPS = "pvrmanager.syncchannelgroups"; -const std::string CSettings::SETTING_PVRMANAGER_BACKENDCHANNELORDER = "pvrmanager.backendchannelorder"; -const std::string CSettings::SETTING_PVRMANAGER_USEBACKENDCHANNELNUMBERS = "pvrmanager.usebackendchannelnumbers"; -const std::string CSettings::SETTING_PVRMANAGER_USEBACKENDCHANNELNUMBERSALWAYS = "pvrmanager.usebackendchannelnumbersalways"; -const std::string CSettings::SETTING_PVRMANAGER_STARTGROUPCHANNELNUMBERSFROMONE = "pvrmanager.startgroupchannelnumbersfromone"; -const std::string CSettings::SETTING_PVRMANAGER_CLIENTPRIORITIES = "pvrmanager.clientpriorities"; -const std::string CSettings::SETTING_PVRMANAGER_CHANNELMANAGER = "pvrmanager.channelmanager"; -const std::string CSettings::SETTING_PVRMANAGER_GROUPMANAGER = "pvrmanager.groupmanager"; -const std::string CSettings::SETTING_PVRMANAGER_CHANNELSCAN = "pvrmanager.channelscan"; -const std::string CSettings::SETTING_PVRMANAGER_RESETDB = "pvrmanager.resetdb"; -const std::string CSettings::SETTING_PVRMENU_DISPLAYCHANNELINFO = "pvrmenu.displaychannelinfo"; -const std::string CSettings::SETTING_PVRMENU_CLOSECHANNELOSDONSWITCH = "pvrmenu.closechannelosdonswitch"; -const std::string CSettings::SETTING_PVRMENU_ICONPATH = "pvrmenu.iconpath"; -const std::string CSettings::SETTING_PVRMENU_SEARCHICONS = "pvrmenu.searchicons"; -const std::string CSettings::SETTING_EPG_PAST_DAYSTODISPLAY = "epg.pastdaystodisplay"; -const std::string CSettings::SETTING_EPG_FUTURE_DAYSTODISPLAY = "epg.futuredaystodisplay"; -const std::string CSettings::SETTING_EPG_SELECTACTION = "epg.selectaction"; -const std::string CSettings::SETTING_EPG_HIDENOINFOAVAILABLE = "epg.hidenoinfoavailable"; -const std::string CSettings::SETTING_EPG_EPGUPDATE = "epg.epgupdate"; -const std::string CSettings::SETTING_EPG_PREVENTUPDATESWHILEPLAYINGTV = "epg.preventupdateswhileplayingtv"; -const std::string CSettings::SETTING_EPG_RESETEPG = "epg.resetepg"; -const std::string CSettings::SETTING_PVRPLAYBACK_SWITCHTOFULLSCREENCHANNELTYPES = "pvrplayback.switchtofullscreenchanneltypes"; -const std::string CSettings::SETTING_PVRPLAYBACK_SIGNALQUALITY = "pvrplayback.signalquality"; -const std::string CSettings::SETTING_PVRPLAYBACK_CONFIRMCHANNELSWITCH = "pvrplayback.confirmchannelswitch"; -const std::string CSettings::SETTING_PVRPLAYBACK_CHANNELENTRYTIMEOUT = "pvrplayback.channelentrytimeout"; -const std::string CSettings::SETTING_PVRPLAYBACK_DELAYMARKLASTWATCHED = "pvrplayback.delaymarklastwatched"; -const std::string CSettings::SETTING_PVRPLAYBACK_FPS = "pvrplayback.fps"; -const std::string CSettings::SETTING_PVRRECORD_INSTANTRECORDACTION = "pvrrecord.instantrecordaction"; -const std::string CSettings::SETTING_PVRRECORD_INSTANTRECORDTIME = "pvrrecord.instantrecordtime"; -const std::string CSettings::SETTING_PVRRECORD_MARGINSTART = "pvrrecord.marginstart"; -const std::string CSettings::SETTING_PVRRECORD_MARGINEND = "pvrrecord.marginend"; -const std::string CSettings::SETTING_PVRRECORD_TIMERNOTIFICATIONS = "pvrrecord.timernotifications"; -const std::string CSettings::SETTING_PVRRECORD_GROUPRECORDINGS = "pvrrecord.grouprecordings"; -const std::string CSettings::SETTING_PVRREMINDERS_AUTOCLOSEDELAY = "pvrreminders.autoclosedelay"; -const std::string CSettings::SETTING_PVRREMINDERS_AUTORECORD = "pvrreminders.autorecord"; -const std::string CSettings::SETTING_PVRREMINDERS_AUTOSWITCH = "pvrreminders.autoswitch"; -const std::string CSettings::SETTING_PVRPOWERMANAGEMENT_ENABLED = "pvrpowermanagement.enabled"; -const std::string CSettings::SETTING_PVRPOWERMANAGEMENT_BACKENDIDLETIME = "pvrpowermanagement.backendidletime"; -const std::string CSettings::SETTING_PVRPOWERMANAGEMENT_SETWAKEUPCMD = "pvrpowermanagement.setwakeupcmd"; -const std::string CSettings::SETTING_PVRPOWERMANAGEMENT_PREWAKEUP = "pvrpowermanagement.prewakeup"; -const std::string CSettings::SETTING_PVRPOWERMANAGEMENT_DAILYWAKEUP = "pvrpowermanagement.dailywakeup"; -const std::string CSettings::SETTING_PVRPOWERMANAGEMENT_DAILYWAKEUPTIME = "pvrpowermanagement.dailywakeuptime"; -const std::string CSettings::SETTING_PVRPARENTAL_ENABLED = "pvrparental.enabled"; -const std::string CSettings::SETTING_PVRPARENTAL_PIN = "pvrparental.pin"; -const std::string CSettings::SETTING_PVRPARENTAL_DURATION = "pvrparental.duration"; -const std::string CSettings::SETTING_PVRCLIENT_MENUHOOK = "pvrclient.menuhook"; -const std::string CSettings::SETTING_PVRTIMERS_HIDEDISABLEDTIMERS = "pvrtimers.hidedisabledtimers"; -const std::string CSettings::SETTING_MUSICLIBRARY_SHOWCOMPILATIONARTISTS = "musiclibrary.showcompilationartists"; -const std::string CSettings::SETTING_MUSICLIBRARY_SHOWDISCS = "musiclibrary.showdiscs"; -const std::string CSettings::SETTING_MUSICLIBRARY_USEORIGINALDATE = "musiclibrary.useoriginaldate"; -const std::string CSettings::SETTING_MUSICLIBRARY_USEARTISTSORTNAME = "musiclibrary.useartistsortname"; -const std::string CSettings::SETTING_MUSICLIBRARY_DOWNLOADINFO = "musiclibrary.downloadinfo"; -const std::string CSettings::SETTING_MUSICLIBRARY_ARTISTSFOLDER = "musiclibrary.artistsfolder"; -const std::string CSettings::SETTING_MUSICLIBRARY_PREFERONLINEALBUMART = "musiclibrary.preferonlinealbumart"; -const std::string CSettings::SETTING_MUSICLIBRARY_ARTWORKLEVEL = "musiclibrary.artworklevel"; -const std::string CSettings::SETTING_MUSICLIBRARY_USEALLLOCALART = "musiclibrary.usealllocalart"; -const std::string CSettings::SETTING_MUSICLIBRARY_USEALLREMOTEART = "musiclibrary.useallremoteart"; -const std::string CSettings::SETTING_MUSICLIBRARY_ARTISTART_WHITELIST = - "musiclibrary.artistartwhitelist"; -const std::string CSettings::SETTING_MUSICLIBRARY_ALBUMART_WHITELIST = - "musiclibrary.albumartwhitelist"; -const std::string CSettings::SETTING_MUSICLIBRARY_MUSICTHUMBS = "musiclibrary.musicthumbs"; -const std::string CSettings::SETTING_MUSICLIBRARY_ARTSETTINGS_UPDATED = "musiclibrary.artsettings"; -const std::string CSettings::SETTING_MUSICLIBRARY_ALBUMSSCRAPER = "musiclibrary.albumsscraper"; -const std::string CSettings::SETTING_MUSICLIBRARY_ARTISTSSCRAPER = "musiclibrary.artistsscraper"; -const std::string CSettings::SETTING_MUSICLIBRARY_OVERRIDETAGS = "musiclibrary.overridetags"; -const std::string CSettings::SETTING_MUSICLIBRARY_SHOWALLITEMS = "musiclibrary.showallitems"; -const std::string CSettings::SETTING_MUSICLIBRARY_UPDATEONSTARTUP = "musiclibrary.updateonstartup"; -const std::string CSettings::SETTING_MUSICLIBRARY_BACKGROUNDUPDATE = "musiclibrary.backgroundupdate"; -const std::string CSettings::SETTING_MUSICLIBRARY_CLEANUP = "musiclibrary.cleanup"; -const std::string CSettings::SETTING_MUSICLIBRARY_EXPORT = "musiclibrary.export"; -const std::string CSettings::SETTING_MUSICLIBRARY_EXPORT_FILETYPE = "musiclibrary.exportfiletype"; -const std::string CSettings::SETTING_MUSICLIBRARY_EXPORT_FOLDER = "musiclibrary.exportfolder"; -const std::string CSettings::SETTING_MUSICLIBRARY_EXPORT_ITEMS = "musiclibrary.exportitems"; -const std::string CSettings::SETTING_MUSICLIBRARY_EXPORT_UNSCRAPED = "musiclibrary.exportunscraped"; -const std::string CSettings::SETTING_MUSICLIBRARY_EXPORT_OVERWRITE = "musiclibrary.exportoverwrite"; -const std::string CSettings::SETTING_MUSICLIBRARY_EXPORT_ARTWORK = "musiclibrary.exportartwork"; -const std::string CSettings::SETTING_MUSICLIBRARY_EXPORT_SKIPNFO = "musiclibrary.exportskipnfo"; -const std::string CSettings::SETTING_MUSICLIBRARY_IMPORT = "musiclibrary.import"; -const std::string CSettings::SETTING_MUSICPLAYER_AUTOPLAYNEXTITEM = "musicplayer.autoplaynextitem"; -const std::string CSettings::SETTING_MUSICPLAYER_QUEUEBYDEFAULT = "musicplayer.queuebydefault"; -const std::string CSettings::SETTING_MUSICPLAYER_SEEKSTEPS = "musicplayer.seeksteps"; -const std::string CSettings::SETTING_MUSICPLAYER_SEEKDELAY = "musicplayer.seekdelay"; -const std::string CSettings::SETTING_MUSICPLAYER_REPLAYGAINTYPE = "musicplayer.replaygaintype"; -const std::string CSettings::SETTING_MUSICPLAYER_REPLAYGAINPREAMP = "musicplayer.replaygainpreamp"; -const std::string CSettings::SETTING_MUSICPLAYER_REPLAYGAINNOGAINPREAMP = "musicplayer.replaygainnogainpreamp"; -const std::string CSettings::SETTING_MUSICPLAYER_REPLAYGAINAVOIDCLIPPING = "musicplayer.replaygainavoidclipping"; -const std::string CSettings::SETTING_MUSICPLAYER_CROSSFADE = "musicplayer.crossfade"; -const std::string CSettings::SETTING_MUSICPLAYER_CROSSFADEALBUMTRACKS = "musicplayer.crossfadealbumtracks"; -const std::string CSettings::SETTING_MUSICPLAYER_VISUALISATION = "musicplayer.visualisation"; -const std::string CSettings::SETTING_MUSICFILES_SELECTACTION = "musicfiles.selectaction"; -const std::string CSettings::SETTING_MUSICFILES_USETAGS = "musicfiles.usetags"; -const std::string CSettings::SETTING_MUSICFILES_TRACKFORMAT = "musicfiles.trackformat"; -const std::string CSettings::SETTING_MUSICFILES_NOWPLAYINGTRACKFORMAT = "musicfiles.nowplayingtrackformat"; -const std::string CSettings::SETTING_MUSICFILES_LIBRARYTRACKFORMAT = "musicfiles.librarytrackformat"; -const std::string CSettings::SETTING_MUSICFILES_FINDREMOTETHUMBS = "musicfiles.findremotethumbs"; -const std::string CSettings::SETTING_AUDIOCDS_AUTOACTION = "audiocds.autoaction"; -const std::string CSettings::SETTING_AUDIOCDS_USECDDB = "audiocds.usecddb"; -const std::string CSettings::SETTING_AUDIOCDS_RECORDINGPATH = "audiocds.recordingpath"; -const std::string CSettings::SETTING_AUDIOCDS_TRACKPATHFORMAT = "audiocds.trackpathformat"; -const std::string CSettings::SETTING_AUDIOCDS_ENCODER = "audiocds.encoder"; -const std::string CSettings::SETTING_AUDIOCDS_SETTINGS = "audiocds.settings"; -const std::string CSettings::SETTING_AUDIOCDS_EJECTONRIP = "audiocds.ejectonrip"; -const std::string CSettings::SETTING_MYMUSIC_SONGTHUMBINVIS = "mymusic.songthumbinvis"; -const std::string CSettings::SETTING_MYMUSIC_DEFAULTLIBVIEW = "mymusic.defaultlibview"; -const std::string CSettings::SETTING_PICTURES_USETAGS = "pictures.usetags"; -const std::string CSettings::SETTING_PICTURES_GENERATETHUMBS = "pictures.generatethumbs"; -const std::string CSettings::SETTING_PICTURES_SHOWVIDEOS = "pictures.showvideos"; -const std::string CSettings::SETTING_PICTURES_DISPLAYRESOLUTION = "pictures.displayresolution"; -const std::string CSettings::SETTING_SLIDESHOW_STAYTIME = "slideshow.staytime"; -const std::string CSettings::SETTING_SLIDESHOW_DISPLAYEFFECTS = "slideshow.displayeffects"; -const std::string CSettings::SETTING_SLIDESHOW_SHUFFLE = "slideshow.shuffle"; -const std::string CSettings::SETTING_SLIDESHOW_HIGHQUALITYDOWNSCALING = "slideshow.highqualitydownscaling"; -const std::string CSettings::SETTING_WEATHER_CURRENTLOCATION = "weather.currentlocation"; -const std::string CSettings::SETTING_WEATHER_ADDON = "weather.addon"; -const std::string CSettings::SETTING_WEATHER_ADDONSETTINGS = "weather.addonsettings"; -const std::string CSettings::SETTING_SERVICES_DEVICENAME = "services.devicename"; -const std::string CSettings::SETTING_SERVICES_DEVICEUUID = "services.deviceuuid"; -const std::string CSettings::SETTING_SERVICES_UPNP = "services.upnp"; -const std::string CSettings::SETTING_SERVICES_UPNPSERVER = "services.upnpserver"; -const std::string CSettings::SETTING_SERVICES_UPNPANNOUNCE = "services.upnpannounce"; -const std::string CSettings::SETTING_SERVICES_UPNPLOOKFOREXTERNALSUBTITLES = "services.upnplookforexternalsubtitles"; -const std::string CSettings::SETTING_SERVICES_UPNPCONTROLLER = "services.upnpcontroller"; -const std::string CSettings::SETTING_SERVICES_UPNPRENDERER = "services.upnprenderer"; -const std::string CSettings::SETTING_SERVICES_WEBSERVER = "services.webserver"; -const std::string CSettings::SETTING_SERVICES_WEBSERVERPORT = "services.webserverport"; -const std::string CSettings::SETTING_SERVICES_WEBSERVERAUTHENTICATION = - "services.webserverauthentication"; -const std::string CSettings::SETTING_SERVICES_WEBSERVERUSERNAME = "services.webserverusername"; -const std::string CSettings::SETTING_SERVICES_WEBSERVERPASSWORD = "services.webserverpassword"; -const std::string CSettings::SETTING_SERVICES_WEBSERVERSSL = "services.webserverssl"; -const std::string CSettings::SETTING_SERVICES_WEBSKIN = "services.webskin"; -const std::string CSettings::SETTING_SERVICES_ESENABLED = "services.esenabled"; -const std::string CSettings::SETTING_SERVICES_ESPORT = "services.esport"; -const std::string CSettings::SETTING_SERVICES_ESPORTRANGE = "services.esportrange"; -const std::string CSettings::SETTING_SERVICES_ESMAXCLIENTS = "services.esmaxclients"; -const std::string CSettings::SETTING_SERVICES_ESALLINTERFACES = "services.esallinterfaces"; -const std::string CSettings::SETTING_SERVICES_ESINITIALDELAY = "services.esinitialdelay"; -const std::string CSettings::SETTING_SERVICES_ESCONTINUOUSDELAY = "services.escontinuousdelay"; -const std::string CSettings::SETTING_SERVICES_ZEROCONF = "services.zeroconf"; -const std::string CSettings::SETTING_SERVICES_AIRPLAY = "services.airplay"; -const std::string CSettings::SETTING_SERVICES_AIRPLAYVOLUMECONTROL = "services.airplayvolumecontrol"; -const std::string CSettings::SETTING_SERVICES_USEAIRPLAYPASSWORD = "services.useairplaypassword"; -const std::string CSettings::SETTING_SERVICES_AIRPLAYPASSWORD = "services.airplaypassword"; -const std::string CSettings::SETTING_SERVICES_AIRPLAYVIDEOSUPPORT = "services.airplayvideosupport"; -const std::string CSettings::SETTING_SMB_WINSSERVER = "smb.winsserver"; -const std::string CSettings::SETTING_SMB_WORKGROUP = "smb.workgroup"; -const std::string CSettings::SETTING_SMB_MINPROTOCOL = "smb.minprotocol"; -const std::string CSettings::SETTING_SMB_MAXPROTOCOL = "smb.maxprotocol"; -const std::string CSettings::SETTING_SMB_LEGACYSECURITY = "smb.legacysecurity"; -const std::string CSettings::SETTING_VIDEOSCREEN_MONITOR = "videoscreen.monitor"; -const std::string CSettings::SETTING_VIDEOSCREEN_SCREEN = "videoscreen.screen"; -const std::string CSettings::SETTING_VIDEOSCREEN_WHITELIST = "videoscreen.whitelist"; -const std::string CSettings::SETTING_VIDEOSCREEN_RESOLUTION = "videoscreen.resolution"; -const std::string CSettings::SETTING_VIDEOSCREEN_SCREENMODE = "videoscreen.screenmode"; -const std::string CSettings::SETTING_VIDEOSCREEN_FAKEFULLSCREEN = "videoscreen.fakefullscreen"; -const std::string CSettings::SETTING_VIDEOSCREEN_BLANKDISPLAYS = "videoscreen.blankdisplays"; -const std::string CSettings::SETTING_VIDEOSCREEN_STEREOSCOPICMODE = "videoscreen.stereoscopicmode"; -const std::string CSettings::SETTING_VIDEOSCREEN_PREFEREDSTEREOSCOPICMODE = "videoscreen.preferedstereoscopicmode"; -const std::string CSettings::SETTING_VIDEOSCREEN_NOOFBUFFERS = "videoscreen.noofbuffers"; -const std::string CSettings::SETTING_VIDEOSCREEN_3DLUT = "videoscreen.cms3dlut"; -const std::string CSettings::SETTING_VIDEOSCREEN_DISPLAYPROFILE = "videoscreen.displayprofile"; -const std::string CSettings::SETTING_VIDEOSCREEN_GUICALIBRATION = "videoscreen.guicalibration"; -const std::string CSettings::SETTING_VIDEOSCREEN_TESTPATTERN = "videoscreen.testpattern"; -const std::string CSettings::SETTING_VIDEOSCREEN_LIMITEDRANGE = "videoscreen.limitedrange"; -const std::string CSettings::SETTING_VIDEOSCREEN_FRAMEPACKING = "videoscreen.framepacking"; -const std::string CSettings::SETTING_AUDIOOUTPUT_AUDIODEVICE = "audiooutput.audiodevice"; -const std::string CSettings::SETTING_AUDIOOUTPUT_CHANNELS = "audiooutput.channels"; -const std::string CSettings::SETTING_AUDIOOUTPUT_CONFIG = "audiooutput.config"; -const std::string CSettings::SETTING_AUDIOOUTPUT_SAMPLERATE = "audiooutput.samplerate"; -const std::string CSettings::SETTING_AUDIOOUTPUT_STEREOUPMIX = "audiooutput.stereoupmix"; -const std::string CSettings::SETTING_AUDIOOUTPUT_MAINTAINORIGINALVOLUME = "audiooutput.maintainoriginalvolume"; -const std::string CSettings::SETTING_AUDIOOUTPUT_PROCESSQUALITY = "audiooutput.processquality"; -const std::string CSettings::SETTING_AUDIOOUTPUT_ATEMPOTHRESHOLD = "audiooutput.atempothreshold"; -const std::string CSettings::SETTING_AUDIOOUTPUT_STREAMSILENCE = "audiooutput.streamsilence"; -const std::string CSettings::SETTING_AUDIOOUTPUT_STREAMNOISE = "audiooutput.streamnoise"; -const std::string CSettings::SETTING_AUDIOOUTPUT_GUISOUNDMODE = "audiooutput.guisoundmode"; -const std::string CSettings::SETTING_AUDIOOUTPUT_PASSTHROUGH = "audiooutput.passthrough"; -const std::string CSettings::SETTING_AUDIOOUTPUT_PASSTHROUGHDEVICE = "audiooutput.passthroughdevice"; -const std::string CSettings::SETTING_AUDIOOUTPUT_AC3PASSTHROUGH = "audiooutput.ac3passthrough"; -const std::string CSettings::SETTING_AUDIOOUTPUT_AC3TRANSCODE = "audiooutput.ac3transcode"; -const std::string CSettings::SETTING_AUDIOOUTPUT_EAC3PASSTHROUGH = "audiooutput.eac3passthrough"; -const std::string CSettings::SETTING_AUDIOOUTPUT_DTSPASSTHROUGH = "audiooutput.dtspassthrough"; -const std::string CSettings::SETTING_AUDIOOUTPUT_TRUEHDPASSTHROUGH = "audiooutput.truehdpassthrough"; -const std::string CSettings::SETTING_AUDIOOUTPUT_DTSHDPASSTHROUGH = "audiooutput.dtshdpassthrough"; -const std::string CSettings::SETTING_AUDIOOUTPUT_VOLUMESTEPS = "audiooutput.volumesteps"; -const std::string CSettings::SETTING_INPUT_PERIPHERALS = "input.peripherals"; -const std::string CSettings::SETTING_INPUT_PERIPHERALLIBRARIES = "input.peripherallibraries"; -const std::string CSettings::SETTING_INPUT_ENABLEMOUSE = "input.enablemouse"; -const std::string CSettings::SETTING_INPUT_ASKNEWCONTROLLERS = "input.asknewcontrollers"; -const std::string CSettings::SETTING_INPUT_CONTROLLERCONFIG = "input.controllerconfig"; -const std::string CSettings::SETTING_INPUT_RUMBLENOTIFY = "input.rumblenotify"; -const std::string CSettings::SETTING_INPUT_TESTRUMBLE = "input.testrumble"; -const std::string CSettings::SETTING_INPUT_CONTROLLERPOWEROFF = "input.controllerpoweroff"; -const std::string CSettings::SETTING_INPUT_APPLEREMOTEMODE = "input.appleremotemode"; -const std::string CSettings::SETTING_INPUT_APPLEREMOTEALWAYSON = "input.appleremotealwayson"; -const std::string CSettings::SETTING_INPUT_APPLEREMOTESEQUENCETIME = "input.appleremotesequencetime"; -const std::string CSettings::SETTING_INPUT_APPLESIRI = "input.applesiri"; -const std::string CSettings::SETTING_INPUT_APPLESIRITIMEOUT = "input.applesiritimeout"; -const std::string CSettings::SETTING_INPUT_APPLESIRITIMEOUTENABLED = - "input.applesiritimeoutenabled"; -const std::string CSettings::SETTING_INPUT_APPLEUSEKODIKEYBOARD = "input.appleusekodikeyboard"; -const std::string CSettings::SETTING_NETWORK_USEHTTPPROXY = "network.usehttpproxy"; -const std::string CSettings::SETTING_NETWORK_HTTPPROXYTYPE = "network.httpproxytype"; -const std::string CSettings::SETTING_NETWORK_HTTPPROXYSERVER = "network.httpproxyserver"; -const std::string CSettings::SETTING_NETWORK_HTTPPROXYPORT = "network.httpproxyport"; -const std::string CSettings::SETTING_NETWORK_HTTPPROXYUSERNAME = "network.httpproxyusername"; -const std::string CSettings::SETTING_NETWORK_HTTPPROXYPASSWORD = "network.httpproxypassword"; -const std::string CSettings::SETTING_NETWORK_BANDWIDTH = "network.bandwidth"; -const std::string CSettings::SETTING_POWERMANAGEMENT_DISPLAYSOFF = "powermanagement.displaysoff"; -const std::string CSettings::SETTING_POWERMANAGEMENT_SHUTDOWNTIME = "powermanagement.shutdowntime"; -const std::string CSettings::SETTING_POWERMANAGEMENT_SHUTDOWNSTATE = "powermanagement.shutdownstate"; -const std::string CSettings::SETTING_POWERMANAGEMENT_WAKEONACCESS = "powermanagement.wakeonaccess"; -const std::string CSettings::SETTING_POWERMANAGEMENT_WAITFORNETWORK = "powermanagement.waitfornetwork"; -const std::string CSettings::SETTING_DEBUG_SHOWLOGINFO = "debug.showloginfo"; -const std::string CSettings::SETTING_DEBUG_EXTRALOGGING = "debug.extralogging"; -const std::string CSettings::SETTING_DEBUG_SETEXTRALOGLEVEL = "debug.setextraloglevel"; -const std::string CSettings::SETTING_DEBUG_SCREENSHOTPATH = "debug.screenshotpath"; -const std::string CSettings::SETTING_DEBUG_SHARE_LOG = "debug.sharelog"; -const std::string CSettings::SETTING_EVENTLOG_ENABLED = "eventlog.enabled"; -const std::string CSettings::SETTING_EVENTLOG_ENABLED_NOTIFICATIONS = "eventlog.enablednotifications"; -const std::string CSettings::SETTING_EVENTLOG_SHOW = "eventlog.show"; -const std::string CSettings::SETTING_MASTERLOCK_LOCKCODE = "masterlock.lockcode"; -const std::string CSettings::SETTING_MASTERLOCK_STARTUPLOCK = "masterlock.startuplock"; -const std::string CSettings::SETTING_MASTERLOCK_MAXRETRIES = "masterlock.maxretries"; -const std::string CSettings::SETTING_CACHE_HARDDISK = "cache.harddisk"; -const std::string CSettings::SETTING_CACHEVIDEO_DVDROM = "cachevideo.dvdrom"; -const std::string CSettings::SETTING_CACHEVIDEO_LAN = "cachevideo.lan"; -const std::string CSettings::SETTING_CACHEVIDEO_INTERNET = "cachevideo.internet"; -const std::string CSettings::SETTING_CACHEAUDIO_DVDROM = "cacheaudio.dvdrom"; -const std::string CSettings::SETTING_CACHEAUDIO_LAN = "cacheaudio.lan"; -const std::string CSettings::SETTING_CACHEAUDIO_INTERNET = "cacheaudio.internet"; -const std::string CSettings::SETTING_CACHEDVD_DVDROM = "cachedvd.dvdrom"; -const std::string CSettings::SETTING_CACHEDVD_LAN = "cachedvd.lan"; -const std::string CSettings::SETTING_CACHEUNKNOWN_INTERNET = "cacheunknown.internet"; -const std::string CSettings::SETTING_SYSTEM_PLAYLISTSPATH = "system.playlistspath"; -const std::string CSettings::SETTING_ADDONS_AUTOUPDATES = "general.addonupdates"; -const std::string CSettings::SETTING_ADDONS_NOTIFICATIONS = "general.addonnotifications"; -const std::string CSettings::SETTING_ADDONS_SHOW_RUNNING = "addons.showrunning"; -const std::string CSettings::SETTING_ADDONS_ALLOW_UNKNOWN_SOURCES = "addons.unknownsources"; -const std::string CSettings::SETTING_ADDONS_UPDATEMODE = "addons.updatemode"; -const std::string CSettings::SETTING_ADDONS_MANAGE_DEPENDENCIES = "addons.managedependencies"; -const std::string CSettings::SETTING_GENERAL_ADDONFOREIGNFILTER = "general.addonforeignfilter"; -const std::string CSettings::SETTING_GENERAL_ADDONBROKENFILTER = "general.addonbrokenfilter"; -const std::string CSettings::SETTING_SOURCE_VIDEOS = "source.videos"; -const std::string CSettings::SETTING_SOURCE_MUSIC = "source.music"; -const std::string CSettings::SETTING_SOURCE_PICTURES = "source.pictures"; +//! @todo: remove in c++17 +constexpr const char* CSettings::SETTING_LOOKANDFEEL_SKIN; +constexpr const char* CSettings::SETTING_LOOKANDFEEL_SKINSETTINGS; +constexpr const char* CSettings::SETTING_LOOKANDFEEL_SKINTHEME; +constexpr const char* CSettings::SETTING_LOOKANDFEEL_SKINCOLORS; +constexpr const char* CSettings::SETTING_LOOKANDFEEL_FONT; +constexpr const char* CSettings::SETTING_LOOKANDFEEL_SKINZOOM; +constexpr const char* CSettings::SETTING_LOOKANDFEEL_STARTUPACTION; +constexpr const char* CSettings::SETTING_LOOKANDFEEL_STARTUPWINDOW; +constexpr const char* CSettings::SETTING_LOOKANDFEEL_SOUNDSKIN; +constexpr const char* CSettings::SETTING_LOOKANDFEEL_ENABLERSSFEEDS; +constexpr const char* CSettings::SETTING_LOOKANDFEEL_RSSEDIT; +constexpr const char* CSettings::SETTING_LOOKANDFEEL_STEREOSTRENGTH; +constexpr const char* CSettings::SETTING_LOCALE_LANGUAGE; +constexpr const char* CSettings::SETTING_LOCALE_COUNTRY; +constexpr const char* CSettings::SETTING_LOCALE_CHARSET; +constexpr const char* CSettings::SETTING_LOCALE_KEYBOARDLAYOUTS; +constexpr const char* CSettings::SETTING_LOCALE_ACTIVEKEYBOARDLAYOUT; +constexpr const char* CSettings::SETTING_LOCALE_TIMEZONECOUNTRY; +constexpr const char* CSettings::SETTING_LOCALE_TIMEZONE; +constexpr const char* CSettings::SETTING_LOCALE_SHORTDATEFORMAT; +constexpr const char* CSettings::SETTING_LOCALE_LONGDATEFORMAT; +constexpr const char* CSettings::SETTING_LOCALE_TIMEFORMAT; +constexpr const char* CSettings::SETTING_LOCALE_USE24HOURCLOCK; +constexpr const char* CSettings::SETTING_LOCALE_TEMPERATUREUNIT; +constexpr const char* CSettings::SETTING_LOCALE_SPEEDUNIT; +constexpr const char* CSettings::SETTING_FILELISTS_SHOWPARENTDIRITEMS; +constexpr const char* CSettings::SETTING_FILELISTS_SHOWEXTENSIONS; +constexpr const char* CSettings::SETTING_FILELISTS_IGNORETHEWHENSORTING; +constexpr const char* CSettings::SETTING_FILELISTS_ALLOWFILEDELETION; +constexpr const char* CSettings::SETTING_FILELISTS_SHOWADDSOURCEBUTTONS; +constexpr const char* CSettings::SETTING_FILELISTS_SHOWHIDDEN; +constexpr const char* CSettings::SETTING_SCREENSAVER_MODE; +constexpr const char* CSettings::SETTING_SCREENSAVER_SETTINGS; +constexpr const char* CSettings::SETTING_SCREENSAVER_PREVIEW; +constexpr const char* CSettings::SETTING_SCREENSAVER_TIME; +constexpr const char* CSettings::SETTING_SCREENSAVER_USEMUSICVISINSTEAD; +constexpr const char* CSettings::SETTING_SCREENSAVER_USEDIMONPAUSE; +constexpr const char* CSettings::SETTING_WINDOW_WIDTH; +constexpr const char* CSettings::SETTING_WINDOW_HEIGHT; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_SHOWUNWATCHEDPLOTS; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_ACTORTHUMBS; +constexpr const char* CSettings::SETTING_MYVIDEOS_FLATTEN; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_FLATTENTVSHOWS; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_TVSHOWSSELECTFIRSTUNWATCHEDITEM; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_TVSHOWSINCLUDEALLSEASONSANDSPECIALS; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_SHOWALLITEMS; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_GROUPMOVIESETS; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_GROUPSINGLEITEMSETS; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_UPDATEONSTARTUP; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_BACKGROUNDUPDATE; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_CLEANUP; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_EXPORT; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_IMPORT; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_SHOWEMPTYTVSHOWS; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_MOVIESETSFOLDER; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_ARTWORK_LEVEL; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_MOVIEART_WHITELIST; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_TVSHOWART_WHITELIST; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_EPISODEART_WHITELIST; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_MUSICVIDEOART_WHITELIST; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_ARTSETTINGS_UPDATED; +constexpr const char* CSettings::SETTING_VIDEOLIBRARY_SHOWPERFORMERS; +constexpr const char* CSettings::SETTING_LOCALE_AUDIOLANGUAGE; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_PREFERDEFAULTFLAG; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_AUTOPLAYNEXTITEM; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_SEEKSTEPS; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_SEEKDELAY; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_ADJUSTREFRESHRATE; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_USEDISPLAYASCLOCK; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_ERRORINASPECT; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_STRETCH43; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_TELETEXTENABLED; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_TELETEXTSCALE; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_STEREOSCOPICPLAYBACKMODE; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_QUITSTEREOMODEONSTOP; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_RENDERMETHOD; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_HQSCALERS; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_USEMEDIACODEC; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_USEMEDIACODECSURFACE; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_USEVDPAU; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_USEVDPAUMIXER; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_USEVDPAUMPEG2; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_USEVDPAUMPEG4; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_USEVDPAUVC1; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_USEDXVA2; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_USEVTB; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_USEPRIMEDECODER; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_USESTAGEFRIGHT; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_LIMITGUIUPDATE; +constexpr const char* CSettings::SETTING_VIDEOPLAYER_SUPPORTMVC; +constexpr const char* CSettings::SETTING_MYVIDEOS_SELECTACTION; +constexpr const char* CSettings::SETTING_MYVIDEOS_USETAGS; +constexpr const char* CSettings::SETTING_MYVIDEOS_EXTRACTFLAGS; +constexpr const char* CSettings::SETTING_MYVIDEOS_EXTRACTCHAPTERTHUMBS; +constexpr const char* CSettings::SETTING_MYVIDEOS_REPLACELABELS; +constexpr const char* CSettings::SETTING_MYVIDEOS_EXTRACTTHUMB; +constexpr const char* CSettings::SETTING_MYVIDEOS_STACKVIDEOS; +constexpr const char* CSettings::SETTING_LOCALE_SUBTITLELANGUAGE; +constexpr const char* CSettings::SETTING_SUBTITLES_PARSECAPTIONS; +constexpr const char* CSettings::SETTING_SUBTITLES_ALIGN; +constexpr const char* CSettings::SETTING_SUBTITLES_STEREOSCOPICDEPTH; +constexpr const char* CSettings::SETTING_SUBTITLES_FONT; +constexpr const char* CSettings::SETTING_SUBTITLES_HEIGHT; +constexpr const char* CSettings::SETTING_SUBTITLES_STYLE; +constexpr const char* CSettings::SETTING_SUBTITLES_COLOR; +constexpr const char* CSettings::SETTING_SUBTITLES_BGCOLOR; +constexpr const char* CSettings::SETTING_SUBTITLES_BGOPACITY; +constexpr const char* CSettings::SETTING_SUBTITLES_CHARSET; +constexpr const char* CSettings::SETTING_SUBTITLES_OVERRIDEASSFONTS; +constexpr const char* CSettings::SETTING_SUBTITLES_LANGUAGES; +constexpr const char* CSettings::SETTING_SUBTITLES_STORAGEMODE; +constexpr const char* CSettings::SETTING_SUBTITLES_CUSTOMPATH; +constexpr const char* CSettings::SETTING_SUBTITLES_PAUSEONSEARCH; +constexpr const char* CSettings::SETTING_SUBTITLES_DOWNLOADFIRST; +constexpr const char* CSettings::SETTING_SUBTITLES_TV; +constexpr const char* CSettings::SETTING_SUBTITLES_MOVIE; +constexpr const char* CSettings::SETTING_DVDS_AUTORUN; +constexpr const char* CSettings::SETTING_DVDS_PLAYERREGION; +constexpr const char* CSettings::SETTING_DVDS_AUTOMENU; +constexpr const char* CSettings::SETTING_DISC_PLAYBACK; +constexpr const char* CSettings::SETTING_BLURAY_PLAYERREGION; +constexpr const char* CSettings::SETTING_ACCESSIBILITY_AUDIOVISUAL; +constexpr const char* CSettings::SETTING_ACCESSIBILITY_AUDIOHEARING; +constexpr const char* CSettings::SETTING_ACCESSIBILITY_SUBHEARING; +constexpr const char* CSettings::SETTING_SCRAPERS_MOVIESDEFAULT; +constexpr const char* CSettings::SETTING_SCRAPERS_TVSHOWSDEFAULT; +constexpr const char* CSettings::SETTING_SCRAPERS_MUSICVIDEOSDEFAULT; +constexpr const char* CSettings::SETTING_PVRMANAGER_PRESELECTPLAYINGCHANNEL; +constexpr const char* CSettings::SETTING_PVRMANAGER_SYNCCHANNELGROUPS; +constexpr const char* CSettings::SETTING_PVRMANAGER_BACKENDCHANNELORDER; +constexpr const char* CSettings::SETTING_PVRMANAGER_USEBACKENDCHANNELNUMBERS; +constexpr const char* CSettings::SETTING_PVRMANAGER_USEBACKENDCHANNELNUMBERSALWAYS; +constexpr const char* CSettings::SETTING_PVRMANAGER_STARTGROUPCHANNELNUMBERSFROMONE; +constexpr const char* CSettings::SETTING_PVRMANAGER_CLIENTPRIORITIES; +constexpr const char* CSettings::SETTING_PVRMANAGER_CHANNELMANAGER; +constexpr const char* CSettings::SETTING_PVRMANAGER_GROUPMANAGER; +constexpr const char* CSettings::SETTING_PVRMANAGER_CHANNELSCAN; +constexpr const char* CSettings::SETTING_PVRMANAGER_RESETDB; +constexpr const char* CSettings::SETTING_PVRMENU_DISPLAYCHANNELINFO; +constexpr const char* CSettings::SETTING_PVRMENU_CLOSECHANNELOSDONSWITCH; +constexpr const char* CSettings::SETTING_PVRMENU_ICONPATH; +constexpr const char* CSettings::SETTING_PVRMENU_SEARCHICONS; +constexpr const char* CSettings::SETTING_EPG_PAST_DAYSTODISPLAY; +constexpr const char* CSettings::SETTING_EPG_FUTURE_DAYSTODISPLAY; +constexpr const char* CSettings::SETTING_EPG_SELECTACTION; +constexpr const char* CSettings::SETTING_EPG_HIDENOINFOAVAILABLE; +constexpr const char* CSettings::SETTING_EPG_EPGUPDATE; +constexpr const char* CSettings::SETTING_EPG_PREVENTUPDATESWHILEPLAYINGTV; +constexpr const char* CSettings::SETTING_EPG_RESETEPG; +constexpr const char* CSettings::SETTING_PVRPLAYBACK_SWITCHTOFULLSCREENCHANNELTYPES; +constexpr const char* CSettings::SETTING_PVRPLAYBACK_SIGNALQUALITY; +constexpr const char* CSettings::SETTING_PVRPLAYBACK_CONFIRMCHANNELSWITCH; +constexpr const char* CSettings::SETTING_PVRPLAYBACK_CHANNELENTRYTIMEOUT; +constexpr const char* CSettings::SETTING_PVRPLAYBACK_DELAYMARKLASTWATCHED; +constexpr const char* CSettings::SETTING_PVRPLAYBACK_FPS; +constexpr const char* CSettings::SETTING_PVRRECORD_INSTANTRECORDACTION; +constexpr const char* CSettings::SETTING_PVRRECORD_INSTANTRECORDTIME; +constexpr const char* CSettings::SETTING_PVRRECORD_MARGINSTART; +constexpr const char* CSettings::SETTING_PVRRECORD_MARGINEND; +constexpr const char* CSettings::SETTING_PVRRECORD_TIMERNOTIFICATIONS; +constexpr const char* CSettings::SETTING_PVRRECORD_GROUPRECORDINGS; +constexpr const char* CSettings::SETTING_PVRREMINDERS_AUTOCLOSEDELAY; +constexpr const char* CSettings::SETTING_PVRREMINDERS_AUTORECORD; +constexpr const char* CSettings::SETTING_PVRREMINDERS_AUTOSWITCH; +constexpr const char* CSettings::SETTING_PVRPOWERMANAGEMENT_ENABLED; +constexpr const char* CSettings::SETTING_PVRPOWERMANAGEMENT_BACKENDIDLETIME; +constexpr const char* CSettings::SETTING_PVRPOWERMANAGEMENT_SETWAKEUPCMD; +constexpr const char* CSettings::SETTING_PVRPOWERMANAGEMENT_PREWAKEUP; +constexpr const char* CSettings::SETTING_PVRPOWERMANAGEMENT_DAILYWAKEUP; +constexpr const char* CSettings::SETTING_PVRPOWERMANAGEMENT_DAILYWAKEUPTIME; +constexpr const char* CSettings::SETTING_PVRPARENTAL_ENABLED; +constexpr const char* CSettings::SETTING_PVRPARENTAL_PIN; +constexpr const char* CSettings::SETTING_PVRPARENTAL_DURATION; +constexpr const char* CSettings::SETTING_PVRCLIENT_MENUHOOK; +constexpr const char* CSettings::SETTING_PVRTIMERS_HIDEDISABLEDTIMERS; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_SHOWCOMPILATIONARTISTS; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_SHOWDISCS; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_USEORIGINALDATE; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_USEARTISTSORTNAME; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_DOWNLOADINFO; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_ARTISTSFOLDER; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_PREFERONLINEALBUMART; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_ARTWORKLEVEL; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_USEALLLOCALART; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_USEALLREMOTEART; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_ARTISTART_WHITELIST; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_ALBUMART_WHITELIST; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_MUSICTHUMBS; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_ARTSETTINGS_UPDATED; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_ALBUMSSCRAPER; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_ARTISTSSCRAPER; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_OVERRIDETAGS; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_SHOWALLITEMS; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_UPDATEONSTARTUP; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_BACKGROUNDUPDATE; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_CLEANUP; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_EXPORT; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_EXPORT_FILETYPE; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_EXPORT_FOLDER; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_EXPORT_ITEMS; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_EXPORT_UNSCRAPED; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_EXPORT_OVERWRITE; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_EXPORT_ARTWORK; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_EXPORT_SKIPNFO; +constexpr const char* CSettings::SETTING_MUSICLIBRARY_IMPORT; +constexpr const char* CSettings::SETTING_MUSICPLAYER_AUTOPLAYNEXTITEM; +constexpr const char* CSettings::SETTING_MUSICPLAYER_QUEUEBYDEFAULT; +constexpr const char* CSettings::SETTING_MUSICPLAYER_SEEKSTEPS; +constexpr const char* CSettings::SETTING_MUSICPLAYER_SEEKDELAY; +constexpr const char* CSettings::SETTING_MUSICPLAYER_REPLAYGAINTYPE; +constexpr const char* CSettings::SETTING_MUSICPLAYER_REPLAYGAINPREAMP; +constexpr const char* CSettings::SETTING_MUSICPLAYER_REPLAYGAINNOGAINPREAMP; +constexpr const char* CSettings::SETTING_MUSICPLAYER_REPLAYGAINAVOIDCLIPPING; +constexpr const char* CSettings::SETTING_MUSICPLAYER_CROSSFADE; +constexpr const char* CSettings::SETTING_MUSICPLAYER_CROSSFADEALBUMTRACKS; +constexpr const char* CSettings::SETTING_MUSICPLAYER_VISUALISATION; +constexpr const char* CSettings::SETTING_MUSICFILES_SELECTACTION; +constexpr const char* CSettings::SETTING_MUSICFILES_USETAGS; +constexpr const char* CSettings::SETTING_MUSICFILES_TRACKFORMAT; +constexpr const char* CSettings::SETTING_MUSICFILES_NOWPLAYINGTRACKFORMAT; +constexpr const char* CSettings::SETTING_MUSICFILES_LIBRARYTRACKFORMAT; +constexpr const char* CSettings::SETTING_MUSICFILES_FINDREMOTETHUMBS; +constexpr const char* CSettings::SETTING_AUDIOCDS_AUTOACTION; +constexpr const char* CSettings::SETTING_AUDIOCDS_USECDDB; +constexpr const char* CSettings::SETTING_AUDIOCDS_RECORDINGPATH; +constexpr const char* CSettings::SETTING_AUDIOCDS_TRACKPATHFORMAT; +constexpr const char* CSettings::SETTING_AUDIOCDS_ENCODER; +constexpr const char* CSettings::SETTING_AUDIOCDS_SETTINGS; +constexpr const char* CSettings::SETTING_AUDIOCDS_EJECTONRIP; +constexpr const char* CSettings::SETTING_MYMUSIC_SONGTHUMBINVIS; +constexpr const char* CSettings::SETTING_MYMUSIC_DEFAULTLIBVIEW; +constexpr const char* CSettings::SETTING_PICTURES_USETAGS; +constexpr const char* CSettings::SETTING_PICTURES_GENERATETHUMBS; +constexpr const char* CSettings::SETTING_PICTURES_SHOWVIDEOS; +constexpr const char* CSettings::SETTING_PICTURES_DISPLAYRESOLUTION; +constexpr const char* CSettings::SETTING_SLIDESHOW_STAYTIME; +constexpr const char* CSettings::SETTING_SLIDESHOW_DISPLAYEFFECTS; +constexpr const char* CSettings::SETTING_SLIDESHOW_SHUFFLE; +constexpr const char* CSettings::SETTING_SLIDESHOW_HIGHQUALITYDOWNSCALING; +constexpr const char* CSettings::SETTING_WEATHER_CURRENTLOCATION; +constexpr const char* CSettings::SETTING_WEATHER_ADDON; +constexpr const char* CSettings::SETTING_WEATHER_ADDONSETTINGS; +constexpr const char* CSettings::SETTING_SERVICES_DEVICENAME; +constexpr const char* CSettings::SETTING_SERVICES_DEVICEUUID; +constexpr const char* CSettings::SETTING_SERVICES_UPNP; +constexpr const char* CSettings::SETTING_SERVICES_UPNPSERVER; +constexpr const char* CSettings::SETTING_SERVICES_UPNPANNOUNCE; +constexpr const char* CSettings::SETTING_SERVICES_UPNPLOOKFOREXTERNALSUBTITLES; +constexpr const char* CSettings::SETTING_SERVICES_UPNPCONTROLLER; +constexpr const char* CSettings::SETTING_SERVICES_UPNPRENDERER; +constexpr const char* CSettings::SETTING_SERVICES_WEBSERVER; +constexpr const char* CSettings::SETTING_SERVICES_WEBSERVERPORT; +constexpr const char* CSettings::SETTING_SERVICES_WEBSERVERAUTHENTICATION; +constexpr const char* CSettings::SETTING_SERVICES_WEBSERVERUSERNAME; +constexpr const char* CSettings::SETTING_SERVICES_WEBSERVERPASSWORD; +constexpr const char* CSettings::SETTING_SERVICES_WEBSERVERSSL; +constexpr const char* CSettings::SETTING_SERVICES_WEBSKIN; +constexpr const char* CSettings::SETTING_SERVICES_ESENABLED; +constexpr const char* CSettings::SETTING_SERVICES_ESPORT; +constexpr const char* CSettings::SETTING_SERVICES_ESPORTRANGE; +constexpr const char* CSettings::SETTING_SERVICES_ESMAXCLIENTS; +constexpr const char* CSettings::SETTING_SERVICES_ESALLINTERFACES; +constexpr const char* CSettings::SETTING_SERVICES_ESINITIALDELAY; +constexpr const char* CSettings::SETTING_SERVICES_ESCONTINUOUSDELAY; +constexpr const char* CSettings::SETTING_SERVICES_ZEROCONF; +constexpr const char* CSettings::SETTING_SERVICES_AIRPLAY; +constexpr const char* CSettings::SETTING_SERVICES_AIRPLAYVOLUMECONTROL; +constexpr const char* CSettings::SETTING_SERVICES_USEAIRPLAYPASSWORD; +constexpr const char* CSettings::SETTING_SERVICES_AIRPLAYPASSWORD; +constexpr const char* CSettings::SETTING_SERVICES_AIRPLAYVIDEOSUPPORT; +constexpr const char* CSettings::SETTING_SMB_WINSSERVER; +constexpr const char* CSettings::SETTING_SMB_WORKGROUP; +constexpr const char* CSettings::SETTING_SMB_MINPROTOCOL; +constexpr const char* CSettings::SETTING_SMB_MAXPROTOCOL; +constexpr const char* CSettings::SETTING_SMB_LEGACYSECURITY; +constexpr const char* CSettings::SETTING_VIDEOSCREEN_MONITOR; +constexpr const char* CSettings::SETTING_VIDEOSCREEN_SCREEN; +constexpr const char* CSettings::SETTING_VIDEOSCREEN_WHITELIST; +constexpr const char* CSettings::SETTING_VIDEOSCREEN_RESOLUTION; +constexpr const char* CSettings::SETTING_VIDEOSCREEN_SCREENMODE; +constexpr const char* CSettings::SETTING_VIDEOSCREEN_FAKEFULLSCREEN; +constexpr const char* CSettings::SETTING_VIDEOSCREEN_BLANKDISPLAYS; +constexpr const char* CSettings::SETTING_VIDEOSCREEN_STEREOSCOPICMODE; +constexpr const char* CSettings::SETTING_VIDEOSCREEN_PREFEREDSTEREOSCOPICMODE; +constexpr const char* CSettings::SETTING_VIDEOSCREEN_NOOFBUFFERS; +constexpr const char* CSettings::SETTING_VIDEOSCREEN_3DLUT; +constexpr const char* CSettings::SETTING_VIDEOSCREEN_DISPLAYPROFILE; +constexpr const char* CSettings::SETTING_VIDEOSCREEN_GUICALIBRATION; +constexpr const char* CSettings::SETTING_VIDEOSCREEN_TESTPATTERN; +constexpr const char* CSettings::SETTING_VIDEOSCREEN_LIMITEDRANGE; +constexpr const char* CSettings::SETTING_VIDEOSCREEN_FRAMEPACKING; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_AUDIODEVICE; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_CHANNELS; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_CONFIG; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_SAMPLERATE; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_STEREOUPMIX; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_MAINTAINORIGINALVOLUME; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_PROCESSQUALITY; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_ATEMPOTHRESHOLD; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_STREAMSILENCE; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_STREAMNOISE; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_GUISOUNDMODE; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_PASSTHROUGH; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_PASSTHROUGHDEVICE; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_AC3PASSTHROUGH; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_AC3TRANSCODE; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_EAC3PASSTHROUGH; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_DTSPASSTHROUGH; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_TRUEHDPASSTHROUGH; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_DTSHDPASSTHROUGH; +constexpr const char* CSettings::SETTING_AUDIOOUTPUT_VOLUMESTEPS; +constexpr const char* CSettings::SETTING_INPUT_PERIPHERALS; +constexpr const char* CSettings::SETTING_INPUT_PERIPHERALLIBRARIES; +constexpr const char* CSettings::SETTING_INPUT_ENABLEMOUSE; +constexpr const char* CSettings::SETTING_INPUT_ASKNEWCONTROLLERS; +constexpr const char* CSettings::SETTING_INPUT_CONTROLLERCONFIG; +constexpr const char* CSettings::SETTING_INPUT_RUMBLENOTIFY; +constexpr const char* CSettings::SETTING_INPUT_TESTRUMBLE; +constexpr const char* CSettings::SETTING_INPUT_CONTROLLERPOWEROFF; +constexpr const char* CSettings::SETTING_INPUT_APPLEREMOTEMODE; +constexpr const char* CSettings::SETTING_INPUT_APPLEREMOTEALWAYSON; +constexpr const char* CSettings::SETTING_INPUT_APPLEREMOTESEQUENCETIME; +constexpr const char* CSettings::SETTING_INPUT_APPLESIRI; +constexpr const char* CSettings::SETTING_INPUT_APPLESIRITIMEOUT; +constexpr const char* CSettings::SETTING_INPUT_APPLESIRITIMEOUTENABLED; +constexpr const char* CSettings::SETTING_INPUT_APPLEUSEKODIKEYBOARD; +constexpr const char* CSettings::SETTING_NETWORK_USEHTTPPROXY; +constexpr const char* CSettings::SETTING_NETWORK_HTTPPROXYTYPE; +constexpr const char* CSettings::SETTING_NETWORK_HTTPPROXYSERVER; +constexpr const char* CSettings::SETTING_NETWORK_HTTPPROXYPORT; +constexpr const char* CSettings::SETTING_NETWORK_HTTPPROXYUSERNAME; +constexpr const char* CSettings::SETTING_NETWORK_HTTPPROXYPASSWORD; +constexpr const char* CSettings::SETTING_NETWORK_BANDWIDTH; +constexpr const char* CSettings::SETTING_POWERMANAGEMENT_DISPLAYSOFF; +constexpr const char* CSettings::SETTING_POWERMANAGEMENT_SHUTDOWNTIME; +constexpr const char* CSettings::SETTING_POWERMANAGEMENT_SHUTDOWNSTATE; +constexpr const char* CSettings::SETTING_POWERMANAGEMENT_WAKEONACCESS; +constexpr const char* CSettings::SETTING_POWERMANAGEMENT_WAITFORNETWORK; +constexpr const char* CSettings::SETTING_DEBUG_SHOWLOGINFO; +constexpr const char* CSettings::SETTING_DEBUG_EXTRALOGGING; +constexpr const char* CSettings::SETTING_DEBUG_SETEXTRALOGLEVEL; +constexpr const char* CSettings::SETTING_DEBUG_SCREENSHOTPATH; +constexpr const char* CSettings::SETTING_DEBUG_SHARE_LOG; +constexpr const char* CSettings::SETTING_EVENTLOG_ENABLED; +constexpr const char* CSettings::SETTING_EVENTLOG_ENABLED_NOTIFICATIONS; +constexpr const char* CSettings::SETTING_EVENTLOG_SHOW; +constexpr const char* CSettings::SETTING_MASTERLOCK_LOCKCODE; +constexpr const char* CSettings::SETTING_MASTERLOCK_STARTUPLOCK; +constexpr const char* CSettings::SETTING_MASTERLOCK_MAXRETRIES; +constexpr const char* CSettings::SETTING_CACHE_HARDDISK; +constexpr const char* CSettings::SETTING_CACHEVIDEO_DVDROM; +constexpr const char* CSettings::SETTING_CACHEVIDEO_LAN; +constexpr const char* CSettings::SETTING_CACHEVIDEO_INTERNET; +constexpr const char* CSettings::SETTING_CACHEAUDIO_DVDROM; +constexpr const char* CSettings::SETTING_CACHEAUDIO_LAN; +constexpr const char* CSettings::SETTING_CACHEAUDIO_INTERNET; +constexpr const char* CSettings::SETTING_CACHEDVD_DVDROM; +constexpr const char* CSettings::SETTING_CACHEDVD_LAN; +constexpr const char* CSettings::SETTING_CACHEUNKNOWN_INTERNET; +constexpr const char* CSettings::SETTING_SYSTEM_PLAYLISTSPATH; +constexpr const char* CSettings::SETTING_ADDONS_AUTOUPDATES; +constexpr const char* CSettings::SETTING_ADDONS_NOTIFICATIONS; +constexpr const char* CSettings::SETTING_ADDONS_SHOW_RUNNING; +constexpr const char* CSettings::SETTING_ADDONS_ALLOW_UNKNOWN_SOURCES; +constexpr const char* CSettings::SETTING_ADDONS_UPDATEMODE; +constexpr const char* CSettings::SETTING_ADDONS_MANAGE_DEPENDENCIES; +constexpr const char* CSettings::SETTING_GENERAL_ADDONFOREIGNFILTER; +constexpr const char* CSettings::SETTING_GENERAL_ADDONBROKENFILTER; +constexpr const char* CSettings::SETTING_SOURCE_VIDEOS; +constexpr const char* CSettings::SETTING_SOURCE_MUSIC; +constexpr const char* CSettings::SETTING_SOURCE_PICTURES; +//! @todo: remove in c++17 bool CSettings::Initialize() { diff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h index a5e419964c..8276c8a5aa 100644 --- a/xbmc/settings/Settings.h +++ b/xbmc/settings/Settings.h @@ -28,377 +28,411 @@ class CSettings : public CSettingsBase, public CSettingCreator, public CSettingC , private ISubSettings { public: - static const std::string SETTING_LOOKANDFEEL_SKIN; - static const std::string SETTING_LOOKANDFEEL_SKINSETTINGS; - static const std::string SETTING_LOOKANDFEEL_SKINTHEME; - static const std::string SETTING_LOOKANDFEEL_SKINCOLORS; - static const std::string SETTING_LOOKANDFEEL_FONT; - static const std::string SETTING_LOOKANDFEEL_SKINZOOM; - static const std::string SETTING_LOOKANDFEEL_STARTUPACTION; - static const std::string SETTING_LOOKANDFEEL_STARTUPWINDOW; - static const std::string SETTING_LOOKANDFEEL_SOUNDSKIN; - static const std::string SETTING_LOOKANDFEEL_ENABLERSSFEEDS; - static const std::string SETTING_LOOKANDFEEL_RSSEDIT; - static const std::string SETTING_LOOKANDFEEL_STEREOSTRENGTH; - static const std::string SETTING_LOCALE_LANGUAGE; - static const std::string SETTING_LOCALE_COUNTRY; - static const std::string SETTING_LOCALE_CHARSET; - static const std::string SETTING_LOCALE_KEYBOARDLAYOUTS; - static const std::string SETTING_LOCALE_ACTIVEKEYBOARDLAYOUT; - static const std::string SETTING_LOCALE_TIMEZONECOUNTRY; - static const std::string SETTING_LOCALE_TIMEZONE; - static const std::string SETTING_LOCALE_SHORTDATEFORMAT; - static const std::string SETTING_LOCALE_LONGDATEFORMAT; - static const std::string SETTING_LOCALE_TIMEFORMAT; - static const std::string SETTING_LOCALE_USE24HOURCLOCK; - static const std::string SETTING_LOCALE_TEMPERATUREUNIT; - static const std::string SETTING_LOCALE_SPEEDUNIT; - static const std::string SETTING_FILELISTS_SHOWPARENTDIRITEMS; - static const std::string SETTING_FILELISTS_SHOWEXTENSIONS; - static const std::string SETTING_FILELISTS_IGNORETHEWHENSORTING; - static const std::string SETTING_FILELISTS_ALLOWFILEDELETION; - static const std::string SETTING_FILELISTS_SHOWADDSOURCEBUTTONS; - static const std::string SETTING_FILELISTS_SHOWHIDDEN; - static const std::string SETTING_SCREENSAVER_MODE; - static const std::string SETTING_SCREENSAVER_SETTINGS; - static const std::string SETTING_SCREENSAVER_PREVIEW; - static const std::string SETTING_SCREENSAVER_TIME; - static const std::string SETTING_SCREENSAVER_USEMUSICVISINSTEAD; - static const std::string SETTING_SCREENSAVER_USEDIMONPAUSE; - static const std::string SETTING_WINDOW_WIDTH; - static const std::string SETTING_WINDOW_HEIGHT; - static const std::string SETTING_VIDEOLIBRARY_SHOWUNWATCHEDPLOTS; - static const std::string SETTING_VIDEOLIBRARY_ACTORTHUMBS; - static const std::string SETTING_MYVIDEOS_FLATTEN; - static const std::string SETTING_VIDEOLIBRARY_FLATTENTVSHOWS; - static const std::string SETTING_VIDEOLIBRARY_TVSHOWSSELECTFIRSTUNWATCHEDITEM; - static const std::string SETTING_VIDEOLIBRARY_TVSHOWSINCLUDEALLSEASONSANDSPECIALS; - static const std::string SETTING_VIDEOLIBRARY_SHOWALLITEMS; - static const std::string SETTING_VIDEOLIBRARY_GROUPMOVIESETS; - static const std::string SETTING_VIDEOLIBRARY_GROUPSINGLEITEMSETS; - static const std::string SETTING_VIDEOLIBRARY_UPDATEONSTARTUP; - static const std::string SETTING_VIDEOLIBRARY_BACKGROUNDUPDATE; - static const std::string SETTING_VIDEOLIBRARY_CLEANUP; - static const std::string SETTING_VIDEOLIBRARY_EXPORT; - static const std::string SETTING_VIDEOLIBRARY_IMPORT; - static const std::string SETTING_VIDEOLIBRARY_SHOWEMPTYTVSHOWS; - static const std::string SETTING_VIDEOLIBRARY_MOVIESETSFOLDER; - static const std::string SETTING_VIDEOLIBRARY_ARTWORK_LEVEL; - static const std::string SETTING_VIDEOLIBRARY_MOVIEART_WHITELIST; - static const std::string SETTING_VIDEOLIBRARY_TVSHOWART_WHITELIST; - static const std::string SETTING_VIDEOLIBRARY_EPISODEART_WHITELIST; - static const std::string SETTING_VIDEOLIBRARY_MUSICVIDEOART_WHITELIST; - static const std::string SETTING_VIDEOLIBRARY_ARTSETTINGS_UPDATED; - static const std::string SETTING_VIDEOLIBRARY_SHOWPERFORMERS; - static const std::string SETTING_LOCALE_AUDIOLANGUAGE; - static const std::string SETTING_VIDEOPLAYER_PREFERDEFAULTFLAG; - static const std::string SETTING_VIDEOPLAYER_AUTOPLAYNEXTITEM; - static const std::string SETTING_VIDEOPLAYER_SEEKSTEPS; - static const std::string SETTING_VIDEOPLAYER_SEEKDELAY; - static const std::string SETTING_VIDEOPLAYER_ADJUSTREFRESHRATE; - static const std::string SETTING_VIDEOPLAYER_USEDISPLAYASCLOCK; - static const std::string SETTING_VIDEOPLAYER_ERRORINASPECT; - static const std::string SETTING_VIDEOPLAYER_STRETCH43; - static const std::string SETTING_VIDEOPLAYER_TELETEXTENABLED; - static const std::string SETTING_VIDEOPLAYER_TELETEXTSCALE; - static const std::string SETTING_VIDEOPLAYER_STEREOSCOPICPLAYBACKMODE; - static const std::string SETTING_VIDEOPLAYER_QUITSTEREOMODEONSTOP; - static const std::string SETTING_VIDEOPLAYER_RENDERMETHOD; - static const std::string SETTING_VIDEOPLAYER_HQSCALERS; - static const std::string SETTING_VIDEOPLAYER_USEMEDIACODEC; - static const std::string SETTING_VIDEOPLAYER_USEMEDIACODECSURFACE; - static const std::string SETTING_VIDEOPLAYER_USEVDPAU; - static const std::string SETTING_VIDEOPLAYER_USEVDPAUMIXER; - static const std::string SETTING_VIDEOPLAYER_USEVDPAUMPEG2; - static const std::string SETTING_VIDEOPLAYER_USEVDPAUMPEG4; - static const std::string SETTING_VIDEOPLAYER_USEVDPAUVC1; - static const std::string SETTING_VIDEOPLAYER_USEDXVA2; - static const std::string SETTING_VIDEOPLAYER_USEVTB; - static const std::string SETTING_VIDEOPLAYER_USEPRIMEDECODER; - static const std::string SETTING_VIDEOPLAYER_USESTAGEFRIGHT; - static const std::string SETTING_VIDEOPLAYER_LIMITGUIUPDATE; - static const std::string SETTING_VIDEOPLAYER_SUPPORTMVC; - static const std::string SETTING_MYVIDEOS_SELECTACTION; - static const std::string SETTING_MYVIDEOS_USETAGS; - static const std::string SETTING_MYVIDEOS_EXTRACTFLAGS; - static const std::string SETTING_MYVIDEOS_EXTRACTCHAPTERTHUMBS; - static const std::string SETTING_MYVIDEOS_REPLACELABELS; - static const std::string SETTING_MYVIDEOS_EXTRACTTHUMB; - static const std::string SETTING_MYVIDEOS_STACKVIDEOS; - static const std::string SETTING_LOCALE_SUBTITLELANGUAGE; - static const std::string SETTING_SUBTITLES_PARSECAPTIONS; - static const std::string SETTING_SUBTITLES_ALIGN; - static const std::string SETTING_SUBTITLES_STEREOSCOPICDEPTH; - static const std::string SETTING_SUBTITLES_FONT; - static const std::string SETTING_SUBTITLES_HEIGHT; - static const std::string SETTING_SUBTITLES_STYLE; - static const std::string SETTING_SUBTITLES_COLOR; - static const std::string SETTING_SUBTITLES_BGCOLOR; - static const std::string SETTING_SUBTITLES_BGOPACITY; - static const std::string SETTING_SUBTITLES_CHARSET; - static const std::string SETTING_SUBTITLES_OVERRIDEASSFONTS; - static const std::string SETTING_SUBTITLES_LANGUAGES; - static const std::string SETTING_SUBTITLES_STORAGEMODE; - static const std::string SETTING_SUBTITLES_CUSTOMPATH; - static const std::string SETTING_SUBTITLES_PAUSEONSEARCH; - static const std::string SETTING_SUBTITLES_DOWNLOADFIRST; - static const std::string SETTING_SUBTITLES_TV; - static const std::string SETTING_SUBTITLES_MOVIE; - static const std::string SETTING_DVDS_AUTORUN; - static const std::string SETTING_DVDS_PLAYERREGION; - static const std::string SETTING_DVDS_AUTOMENU; - static const std::string SETTING_DISC_PLAYBACK; - static const std::string SETTING_BLURAY_PLAYERREGION; - static const std::string SETTING_ACCESSIBILITY_AUDIOVISUAL; - static const std::string SETTING_ACCESSIBILITY_AUDIOHEARING; - static const std::string SETTING_ACCESSIBILITY_SUBHEARING; - static const std::string SETTING_SCRAPERS_MOVIESDEFAULT; - static const std::string SETTING_SCRAPERS_TVSHOWSDEFAULT; - static const std::string SETTING_SCRAPERS_MUSICVIDEOSDEFAULT; - static const std::string SETTING_PVRMANAGER_PRESELECTPLAYINGCHANNEL; - static const std::string SETTING_PVRMANAGER_SYNCCHANNELGROUPS; - static const std::string SETTING_PVRMANAGER_BACKENDCHANNELORDER; - static const std::string SETTING_PVRMANAGER_USEBACKENDCHANNELNUMBERS; - static const std::string SETTING_PVRMANAGER_USEBACKENDCHANNELNUMBERSALWAYS; - static const std::string SETTING_PVRMANAGER_STARTGROUPCHANNELNUMBERSFROMONE; - static const std::string SETTING_PVRMANAGER_CLIENTPRIORITIES; - static const std::string SETTING_PVRMANAGER_CHANNELMANAGER; - static const std::string SETTING_PVRMANAGER_GROUPMANAGER; - static const std::string SETTING_PVRMANAGER_CHANNELSCAN; - static const std::string SETTING_PVRMANAGER_RESETDB; - static const std::string SETTING_PVRMENU_DISPLAYCHANNELINFO; - static const std::string SETTING_PVRMENU_CLOSECHANNELOSDONSWITCH; - static const std::string SETTING_PVRMENU_ICONPATH; - static const std::string SETTING_PVRMENU_SEARCHICONS; - static const std::string SETTING_EPG_PAST_DAYSTODISPLAY; - static const std::string SETTING_EPG_FUTURE_DAYSTODISPLAY; - static const std::string SETTING_EPG_SELECTACTION; - static const std::string SETTING_EPG_HIDENOINFOAVAILABLE; - static const std::string SETTING_EPG_EPGUPDATE; - static const std::string SETTING_EPG_PREVENTUPDATESWHILEPLAYINGTV; - static const std::string SETTING_EPG_RESETEPG; - static const std::string SETTING_PVRPLAYBACK_SWITCHTOFULLSCREENCHANNELTYPES; - static const std::string SETTING_PVRPLAYBACK_SIGNALQUALITY; - static const std::string SETTING_PVRPLAYBACK_CONFIRMCHANNELSWITCH; - static const std::string SETTING_PVRPLAYBACK_CHANNELENTRYTIMEOUT; - static const std::string SETTING_PVRPLAYBACK_DELAYMARKLASTWATCHED; - static const std::string SETTING_PVRPLAYBACK_FPS; - static const std::string SETTING_PVRRECORD_INSTANTRECORDACTION; - static const std::string SETTING_PVRRECORD_INSTANTRECORDTIME; - static const std::string SETTING_PVRRECORD_MARGINSTART; - static const std::string SETTING_PVRRECORD_MARGINEND; - static const std::string SETTING_PVRRECORD_TIMERNOTIFICATIONS; - static const std::string SETTING_PVRRECORD_GROUPRECORDINGS; - static const std::string SETTING_PVRREMINDERS_AUTOCLOSEDELAY; - static const std::string SETTING_PVRREMINDERS_AUTORECORD; - static const std::string SETTING_PVRREMINDERS_AUTOSWITCH; - static const std::string SETTING_PVRPOWERMANAGEMENT_ENABLED; - static const std::string SETTING_PVRPOWERMANAGEMENT_BACKENDIDLETIME; - static const std::string SETTING_PVRPOWERMANAGEMENT_SETWAKEUPCMD; - static const std::string SETTING_PVRPOWERMANAGEMENT_PREWAKEUP; - static const std::string SETTING_PVRPOWERMANAGEMENT_DAILYWAKEUP; - static const std::string SETTING_PVRPOWERMANAGEMENT_DAILYWAKEUPTIME; - static const std::string SETTING_PVRPARENTAL_ENABLED; - static const std::string SETTING_PVRPARENTAL_PIN; - static const std::string SETTING_PVRPARENTAL_DURATION; - static const std::string SETTING_PVRCLIENT_MENUHOOK; - static const std::string SETTING_PVRTIMERS_HIDEDISABLEDTIMERS; - static const std::string SETTING_MUSICLIBRARY_SHOWCOMPILATIONARTISTS; - static const std::string SETTING_MUSICLIBRARY_SHOWDISCS; - static const std::string SETTING_MUSICLIBRARY_USEORIGINALDATE; - static const std::string SETTING_MUSICLIBRARY_USEARTISTSORTNAME; - static const std::string SETTING_MUSICLIBRARY_DOWNLOADINFO; - static const std::string SETTING_MUSICLIBRARY_ARTISTSFOLDER; - static const std::string SETTING_MUSICLIBRARY_PREFERONLINEALBUMART; - static const std::string SETTING_MUSICLIBRARY_ARTWORKLEVEL; - static const std::string SETTING_MUSICLIBRARY_USEALLLOCALART; - static const std::string SETTING_MUSICLIBRARY_USEALLREMOTEART; - static const std::string SETTING_MUSICLIBRARY_ARTISTART_WHITELIST; - static const std::string SETTING_MUSICLIBRARY_ALBUMART_WHITELIST; - static const std::string SETTING_MUSICLIBRARY_MUSICTHUMBS; - static const std::string SETTING_MUSICLIBRARY_ARTSETTINGS_UPDATED; - static const std::string SETTING_MUSICLIBRARY_ALBUMSSCRAPER; - static const std::string SETTING_MUSICLIBRARY_ARTISTSSCRAPER; - static const std::string SETTING_MUSICLIBRARY_OVERRIDETAGS; - static const std::string SETTING_MUSICLIBRARY_SHOWALLITEMS; - static const std::string SETTING_MUSICLIBRARY_UPDATEONSTARTUP; - static const std::string SETTING_MUSICLIBRARY_BACKGROUNDUPDATE; - static const std::string SETTING_MUSICLIBRARY_CLEANUP; - static const std::string SETTING_MUSICLIBRARY_EXPORT; - static const std::string SETTING_MUSICLIBRARY_EXPORT_FILETYPE; - static const std::string SETTING_MUSICLIBRARY_EXPORT_FOLDER; - static const std::string SETTING_MUSICLIBRARY_EXPORT_ITEMS; - static const std::string SETTING_MUSICLIBRARY_EXPORT_UNSCRAPED; - static const std::string SETTING_MUSICLIBRARY_EXPORT_OVERWRITE; - static const std::string SETTING_MUSICLIBRARY_EXPORT_ARTWORK; - static const std::string SETTING_MUSICLIBRARY_EXPORT_SKIPNFO; - static const std::string SETTING_MUSICLIBRARY_IMPORT; - static const std::string SETTING_MUSICPLAYER_AUTOPLAYNEXTITEM; - static const std::string SETTING_MUSICPLAYER_QUEUEBYDEFAULT; - static const std::string SETTING_MUSICPLAYER_SEEKSTEPS; - static const std::string SETTING_MUSICPLAYER_SEEKDELAY; - static const std::string SETTING_MUSICPLAYER_REPLAYGAINTYPE; - static const std::string SETTING_MUSICPLAYER_REPLAYGAINPREAMP; - static const std::string SETTING_MUSICPLAYER_REPLAYGAINNOGAINPREAMP; - static const std::string SETTING_MUSICPLAYER_REPLAYGAINAVOIDCLIPPING; - static const std::string SETTING_MUSICPLAYER_CROSSFADE; - static const std::string SETTING_MUSICPLAYER_CROSSFADEALBUMTRACKS; - static const std::string SETTING_MUSICPLAYER_VISUALISATION; - static const std::string SETTING_MUSICFILES_SELECTACTION; - static const std::string SETTING_MUSICFILES_USETAGS; - static const std::string SETTING_MUSICFILES_TRACKFORMAT; - static const std::string SETTING_MUSICFILES_NOWPLAYINGTRACKFORMAT; - static const std::string SETTING_MUSICFILES_LIBRARYTRACKFORMAT; - static const std::string SETTING_MUSICFILES_FINDREMOTETHUMBS; - static const std::string SETTING_AUDIOCDS_AUTOACTION; - static const std::string SETTING_AUDIOCDS_USECDDB; - static const std::string SETTING_AUDIOCDS_RECORDINGPATH; - static const std::string SETTING_AUDIOCDS_TRACKPATHFORMAT; - static const std::string SETTING_AUDIOCDS_ENCODER; - static const std::string SETTING_AUDIOCDS_SETTINGS; - static const std::string SETTING_AUDIOCDS_EJECTONRIP; - static const std::string SETTING_MYMUSIC_SONGTHUMBINVIS; - static const std::string SETTING_MYMUSIC_DEFAULTLIBVIEW; - static const std::string SETTING_PICTURES_USETAGS; - static const std::string SETTING_PICTURES_GENERATETHUMBS; - static const std::string SETTING_PICTURES_SHOWVIDEOS; - static const std::string SETTING_PICTURES_DISPLAYRESOLUTION; - static const std::string SETTING_SLIDESHOW_STAYTIME; - static const std::string SETTING_SLIDESHOW_DISPLAYEFFECTS; - static const std::string SETTING_SLIDESHOW_SHUFFLE; - static const std::string SETTING_SLIDESHOW_HIGHQUALITYDOWNSCALING; - static const std::string SETTING_WEATHER_CURRENTLOCATION; - static const std::string SETTING_WEATHER_ADDON; - static const std::string SETTING_WEATHER_ADDONSETTINGS; - static const std::string SETTING_SERVICES_DEVICENAME; - static const std::string SETTING_SERVICES_DEVICEUUID; - static const std::string SETTING_SERVICES_UPNP; - static const std::string SETTING_SERVICES_UPNPSERVER; - static const std::string SETTING_SERVICES_UPNPANNOUNCE; - static const std::string SETTING_SERVICES_UPNPLOOKFOREXTERNALSUBTITLES; - static const std::string SETTING_SERVICES_UPNPCONTROLLER; - static const std::string SETTING_SERVICES_UPNPRENDERER; - static const std::string SETTING_SERVICES_WEBSERVER; - static const std::string SETTING_SERVICES_WEBSERVERPORT; - static const std::string SETTING_SERVICES_WEBSERVERAUTHENTICATION; - static const std::string SETTING_SERVICES_WEBSERVERUSERNAME; - static const std::string SETTING_SERVICES_WEBSERVERPASSWORD; - static const std::string SETTING_SERVICES_WEBSERVERSSL; - static const std::string SETTING_SERVICES_WEBSKIN; - static const std::string SETTING_SERVICES_ESENABLED; - static const std::string SETTING_SERVICES_ESPORT; - static const std::string SETTING_SERVICES_ESPORTRANGE; - static const std::string SETTING_SERVICES_ESMAXCLIENTS; - static const std::string SETTING_SERVICES_ESALLINTERFACES; - static const std::string SETTING_SERVICES_ESINITIALDELAY; - static const std::string SETTING_SERVICES_ESCONTINUOUSDELAY; - static const std::string SETTING_SERVICES_ZEROCONF; - static const std::string SETTING_SERVICES_AIRPLAY; - static const std::string SETTING_SERVICES_AIRPLAYVOLUMECONTROL; - static const std::string SETTING_SERVICES_USEAIRPLAYPASSWORD; - static const std::string SETTING_SERVICES_AIRPLAYPASSWORD; - static const std::string SETTING_SERVICES_AIRPLAYVIDEOSUPPORT; - static const std::string SETTING_SMB_WINSSERVER; - static const std::string SETTING_SMB_WORKGROUP; - static const std::string SETTING_SMB_MINPROTOCOL; - static const std::string SETTING_SMB_MAXPROTOCOL; - static const std::string SETTING_SMB_LEGACYSECURITY; - static const std::string SETTING_VIDEOSCREEN_MONITOR; - static const std::string SETTING_VIDEOSCREEN_SCREEN; - static const std::string SETTING_VIDEOSCREEN_WHITELIST; - static const std::string SETTING_VIDEOSCREEN_RESOLUTION; - static const std::string SETTING_VIDEOSCREEN_SCREENMODE; - static const std::string SETTING_VIDEOSCREEN_FAKEFULLSCREEN; - static const std::string SETTING_VIDEOSCREEN_BLANKDISPLAYS; - static const std::string SETTING_VIDEOSCREEN_STEREOSCOPICMODE; - static const std::string SETTING_VIDEOSCREEN_PREFEREDSTEREOSCOPICMODE; - static const std::string SETTING_VIDEOSCREEN_NOOFBUFFERS; - static const std::string SETTING_VIDEOSCREEN_3DLUT; - static const std::string SETTING_VIDEOSCREEN_DISPLAYPROFILE; - static const std::string SETTING_VIDEOSCREEN_GUICALIBRATION; - static const std::string SETTING_VIDEOSCREEN_TESTPATTERN; - static const std::string SETTING_VIDEOSCREEN_LIMITEDRANGE; - static const std::string SETTING_VIDEOSCREEN_FRAMEPACKING; - static const std::string SETTING_AUDIOOUTPUT_AUDIODEVICE; - static const std::string SETTING_AUDIOOUTPUT_CHANNELS; - static const std::string SETTING_AUDIOOUTPUT_CONFIG; - static const std::string SETTING_AUDIOOUTPUT_SAMPLERATE; - static const std::string SETTING_AUDIOOUTPUT_STEREOUPMIX; - static const std::string SETTING_AUDIOOUTPUT_MAINTAINORIGINALVOLUME; - static const std::string SETTING_AUDIOOUTPUT_PROCESSQUALITY; - static const std::string SETTING_AUDIOOUTPUT_ATEMPOTHRESHOLD; - static const std::string SETTING_AUDIOOUTPUT_STREAMSILENCE; - static const std::string SETTING_AUDIOOUTPUT_STREAMNOISE; - static const std::string SETTING_AUDIOOUTPUT_GUISOUNDMODE; - static const std::string SETTING_AUDIOOUTPUT_PASSTHROUGH; - static const std::string SETTING_AUDIOOUTPUT_PASSTHROUGHDEVICE; - static const std::string SETTING_AUDIOOUTPUT_AC3PASSTHROUGH; - static const std::string SETTING_AUDIOOUTPUT_AC3TRANSCODE; - static const std::string SETTING_AUDIOOUTPUT_EAC3PASSTHROUGH; - static const std::string SETTING_AUDIOOUTPUT_DTSPASSTHROUGH; - static const std::string SETTING_AUDIOOUTPUT_TRUEHDPASSTHROUGH; - static const std::string SETTING_AUDIOOUTPUT_DTSHDPASSTHROUGH; - static const std::string SETTING_AUDIOOUTPUT_VOLUMESTEPS; - static const std::string SETTING_INPUT_PERIPHERALS; - static const std::string SETTING_INPUT_PERIPHERALLIBRARIES; - static const std::string SETTING_INPUT_ENABLEMOUSE; - static const std::string SETTING_INPUT_ASKNEWCONTROLLERS; - static const std::string SETTING_INPUT_CONTROLLERCONFIG; - static const std::string SETTING_INPUT_RUMBLENOTIFY; - static const std::string SETTING_INPUT_TESTRUMBLE; - static const std::string SETTING_INPUT_CONTROLLERPOWEROFF; - static const std::string SETTING_INPUT_APPLEREMOTEMODE; - static const std::string SETTING_INPUT_APPLEREMOTEALWAYSON; - static const std::string SETTING_INPUT_APPLEREMOTESEQUENCETIME; - static const std::string SETTING_INPUT_APPLESIRI; - static const std::string SETTING_INPUT_APPLESIRITIMEOUT; - static const std::string SETTING_INPUT_APPLESIRITIMEOUTENABLED; - static const std::string SETTING_INPUT_APPLEUSEKODIKEYBOARD; - static const std::string SETTING_NETWORK_USEHTTPPROXY; - static const std::string SETTING_NETWORK_HTTPPROXYTYPE; - static const std::string SETTING_NETWORK_HTTPPROXYSERVER; - static const std::string SETTING_NETWORK_HTTPPROXYPORT; - static const std::string SETTING_NETWORK_HTTPPROXYUSERNAME; - static const std::string SETTING_NETWORK_HTTPPROXYPASSWORD; - static const std::string SETTING_NETWORK_BANDWIDTH; - static const std::string SETTING_POWERMANAGEMENT_DISPLAYSOFF; - static const std::string SETTING_POWERMANAGEMENT_SHUTDOWNTIME; - static const std::string SETTING_POWERMANAGEMENT_SHUTDOWNSTATE; - static const std::string SETTING_POWERMANAGEMENT_WAKEONACCESS; - static const std::string SETTING_POWERMANAGEMENT_WAITFORNETWORK; - static const std::string SETTING_DEBUG_SHOWLOGINFO; - static const std::string SETTING_DEBUG_EXTRALOGGING; - static const std::string SETTING_DEBUG_SETEXTRALOGLEVEL; - static const std::string SETTING_DEBUG_SCREENSHOTPATH; - static const std::string SETTING_DEBUG_SHARE_LOG; - static const std::string SETTING_EVENTLOG_ENABLED; - static const std::string SETTING_EVENTLOG_ENABLED_NOTIFICATIONS; - static const std::string SETTING_EVENTLOG_SHOW; - static const std::string SETTING_MASTERLOCK_LOCKCODE; - static const std::string SETTING_MASTERLOCK_STARTUPLOCK; - static const std::string SETTING_MASTERLOCK_MAXRETRIES; - static const std::string SETTING_CACHE_HARDDISK; - static const std::string SETTING_CACHEVIDEO_DVDROM; - static const std::string SETTING_CACHEVIDEO_LAN; - static const std::string SETTING_CACHEVIDEO_INTERNET; - static const std::string SETTING_CACHEAUDIO_DVDROM; - static const std::string SETTING_CACHEAUDIO_LAN; - static const std::string SETTING_CACHEAUDIO_INTERNET; - static const std::string SETTING_CACHEDVD_DVDROM; - static const std::string SETTING_CACHEDVD_LAN; - static const std::string SETTING_CACHEUNKNOWN_INTERNET; - static const std::string SETTING_SYSTEM_PLAYLISTSPATH; - static const std::string SETTING_ADDONS_AUTOUPDATES; - static const std::string SETTING_ADDONS_NOTIFICATIONS; - static const std::string SETTING_ADDONS_SHOW_RUNNING; - static const std::string SETTING_ADDONS_MANAGE_DEPENDENCIES; - static const std::string SETTING_ADDONS_ALLOW_UNKNOWN_SOURCES; - static const std::string SETTING_ADDONS_UPDATEMODE; - static const std::string SETTING_GENERAL_ADDONFOREIGNFILTER; - static const std::string SETTING_GENERAL_ADDONBROKENFILTER; - static const std::string SETTING_SOURCE_VIDEOS; - static const std::string SETTING_SOURCE_MUSIC; - static const std::string SETTING_SOURCE_PICTURES; + static constexpr auto SETTING_LOOKANDFEEL_SKIN = "lookandfeel.skin"; + static constexpr auto SETTING_LOOKANDFEEL_SKINSETTINGS = "lookandfeel.skinsettings"; + static constexpr auto SETTING_LOOKANDFEEL_SKINTHEME = "lookandfeel.skintheme"; + static constexpr auto SETTING_LOOKANDFEEL_SKINCOLORS = "lookandfeel.skincolors"; + static constexpr auto SETTING_LOOKANDFEEL_FONT = "lookandfeel.font"; + static constexpr auto SETTING_LOOKANDFEEL_SKINZOOM = "lookandfeel.skinzoom"; + static constexpr auto SETTING_LOOKANDFEEL_STARTUPACTION = "lookandfeel.startupaction"; + static constexpr auto SETTING_LOOKANDFEEL_STARTUPWINDOW = "lookandfeel.startupwindow"; + static constexpr auto SETTING_LOOKANDFEEL_SOUNDSKIN = "lookandfeel.soundskin"; + static constexpr auto SETTING_LOOKANDFEEL_ENABLERSSFEEDS = "lookandfeel.enablerssfeeds"; + static constexpr auto SETTING_LOOKANDFEEL_RSSEDIT = "lookandfeel.rssedit"; + static constexpr auto SETTING_LOOKANDFEEL_STEREOSTRENGTH = "lookandfeel.stereostrength"; + static constexpr auto SETTING_LOCALE_LANGUAGE = "locale.language"; + static constexpr auto SETTING_LOCALE_COUNTRY = "locale.country"; + static constexpr auto SETTING_LOCALE_CHARSET = "locale.charset"; + static constexpr auto SETTING_LOCALE_KEYBOARDLAYOUTS = "locale.keyboardlayouts"; + static constexpr auto SETTING_LOCALE_ACTIVEKEYBOARDLAYOUT = "locale.activekeyboardlayout"; + static constexpr auto SETTING_LOCALE_TIMEZONECOUNTRY = "locale.timezonecountry"; + static constexpr auto SETTING_LOCALE_TIMEZONE = "locale.timezone"; + static constexpr auto SETTING_LOCALE_SHORTDATEFORMAT = "locale.shortdateformat"; + static constexpr auto SETTING_LOCALE_LONGDATEFORMAT = "locale.longdateformat"; + static constexpr auto SETTING_LOCALE_TIMEFORMAT = "locale.timeformat"; + static constexpr auto SETTING_LOCALE_USE24HOURCLOCK = "locale.use24hourclock"; + static constexpr auto SETTING_LOCALE_TEMPERATUREUNIT = "locale.temperatureunit"; + static constexpr auto SETTING_LOCALE_SPEEDUNIT = "locale.speedunit"; + static constexpr auto SETTING_FILELISTS_SHOWPARENTDIRITEMS = "filelists.showparentdiritems"; + static constexpr auto SETTING_FILELISTS_SHOWEXTENSIONS = "filelists.showextensions"; + static constexpr auto SETTING_FILELISTS_IGNORETHEWHENSORTING = "filelists.ignorethewhensorting"; + static constexpr auto SETTING_FILELISTS_ALLOWFILEDELETION = "filelists.allowfiledeletion"; + static constexpr auto SETTING_FILELISTS_SHOWADDSOURCEBUTTONS = "filelists.showaddsourcebuttons"; + static constexpr auto SETTING_FILELISTS_SHOWHIDDEN = "filelists.showhidden"; + static constexpr auto SETTING_SCREENSAVER_MODE = "screensaver.mode"; + static constexpr auto SETTING_SCREENSAVER_SETTINGS = "screensaver.settings"; + static constexpr auto SETTING_SCREENSAVER_PREVIEW = "screensaver.preview"; + static constexpr auto SETTING_SCREENSAVER_TIME = "screensaver.time"; + static constexpr auto SETTING_SCREENSAVER_USEMUSICVISINSTEAD = "screensaver.usemusicvisinstead"; + static constexpr auto SETTING_SCREENSAVER_USEDIMONPAUSE = "screensaver.usedimonpause"; + static constexpr auto SETTING_WINDOW_WIDTH = "window.width"; + static constexpr auto SETTING_WINDOW_HEIGHT = "window.height"; + static constexpr auto SETTING_VIDEOLIBRARY_SHOWUNWATCHEDPLOTS = "videolibrary.showunwatchedplots"; + static constexpr auto SETTING_VIDEOLIBRARY_ACTORTHUMBS = "videolibrary.actorthumbs"; + static constexpr auto SETTING_MYVIDEOS_FLATTEN = "myvideos.flatten"; + static constexpr auto SETTING_VIDEOLIBRARY_FLATTENTVSHOWS = "videolibrary.flattentvshows"; + static constexpr auto SETTING_VIDEOLIBRARY_TVSHOWSSELECTFIRSTUNWATCHEDITEM = + "videolibrary.tvshowsselectfirstunwatcheditem"; + static constexpr auto SETTING_VIDEOLIBRARY_TVSHOWSINCLUDEALLSEASONSANDSPECIALS = + "videolibrary.tvshowsincludeallseasonsandspecials"; + static constexpr auto SETTING_VIDEOLIBRARY_SHOWALLITEMS = "videolibrary.showallitems"; + static constexpr auto SETTING_VIDEOLIBRARY_GROUPMOVIESETS = "videolibrary.groupmoviesets"; + static constexpr auto SETTING_VIDEOLIBRARY_GROUPSINGLEITEMSETS = + "videolibrary.groupsingleitemsets"; + static constexpr auto SETTING_VIDEOLIBRARY_UPDATEONSTARTUP = "videolibrary.updateonstartup"; + static constexpr auto SETTING_VIDEOLIBRARY_BACKGROUNDUPDATE = "videolibrary.backgroundupdate"; + static constexpr auto SETTING_VIDEOLIBRARY_CLEANUP = "videolibrary.cleanup"; + static constexpr auto SETTING_VIDEOLIBRARY_EXPORT = "videolibrary.export"; + static constexpr auto SETTING_VIDEOLIBRARY_IMPORT = "videolibrary.import"; + static constexpr auto SETTING_VIDEOLIBRARY_SHOWEMPTYTVSHOWS = "videolibrary.showemptytvshows"; + static constexpr auto SETTING_VIDEOLIBRARY_MOVIESETSFOLDER = "videolibrary.moviesetsfolder"; + static constexpr auto SETTING_VIDEOLIBRARY_ARTWORK_LEVEL = "videolibrary.artworklevel"; + static constexpr auto SETTING_VIDEOLIBRARY_MOVIEART_WHITELIST = "videolibrary.movieartwhitelist"; + static constexpr auto SETTING_VIDEOLIBRARY_TVSHOWART_WHITELIST = + "videolibrary.tvshowartwhitelist"; + static constexpr auto SETTING_VIDEOLIBRARY_EPISODEART_WHITELIST = + "videolibrary.episodeartwhitelist"; + static constexpr auto SETTING_VIDEOLIBRARY_MUSICVIDEOART_WHITELIST = + "videolibrary.musicvideoartwhitelist"; + static constexpr auto SETTING_VIDEOLIBRARY_ARTSETTINGS_UPDATED = + "videolibrary.artsettingsupdated"; + static constexpr auto SETTING_VIDEOLIBRARY_SHOWPERFORMERS = + "videolibrary.musicvideosallperformers"; + static constexpr auto SETTING_LOCALE_AUDIOLANGUAGE = "locale.audiolanguage"; + static constexpr auto SETTING_VIDEOPLAYER_PREFERDEFAULTFLAG = "videoplayer.preferdefaultflag"; + static constexpr auto SETTING_VIDEOPLAYER_AUTOPLAYNEXTITEM = "videoplayer.autoplaynextitem"; + static constexpr auto SETTING_VIDEOPLAYER_SEEKSTEPS = "videoplayer.seeksteps"; + static constexpr auto SETTING_VIDEOPLAYER_SEEKDELAY = "videoplayer.seekdelay"; + static constexpr auto SETTING_VIDEOPLAYER_ADJUSTREFRESHRATE = "videoplayer.adjustrefreshrate"; + static constexpr auto SETTING_VIDEOPLAYER_USEDISPLAYASCLOCK = "videoplayer.usedisplayasclock"; + static constexpr auto SETTING_VIDEOPLAYER_ERRORINASPECT = "videoplayer.errorinaspect"; + static constexpr auto SETTING_VIDEOPLAYER_STRETCH43 = "videoplayer.stretch43"; + static constexpr auto SETTING_VIDEOPLAYER_TELETEXTENABLED = "videoplayer.teletextenabled"; + static constexpr auto SETTING_VIDEOPLAYER_TELETEXTSCALE = "videoplayer.teletextscale"; + static constexpr auto SETTING_VIDEOPLAYER_STEREOSCOPICPLAYBACKMODE = + "videoplayer.stereoscopicplaybackmode"; + static constexpr auto SETTING_VIDEOPLAYER_QUITSTEREOMODEONSTOP = + "videoplayer.quitstereomodeonstop"; + static constexpr auto SETTING_VIDEOPLAYER_RENDERMETHOD = "videoplayer.rendermethod"; + static constexpr auto SETTING_VIDEOPLAYER_HQSCALERS = "videoplayer.hqscalers"; + static constexpr auto SETTING_VIDEOPLAYER_USEMEDIACODEC = "videoplayer.usemediacodec"; + static constexpr auto SETTING_VIDEOPLAYER_USEMEDIACODECSURFACE = + "videoplayer.usemediacodecsurface"; + static constexpr auto SETTING_VIDEOPLAYER_USEVDPAU = "videoplayer.usevdpau"; + static constexpr auto SETTING_VIDEOPLAYER_USEVDPAUMIXER = "videoplayer.usevdpaumixer"; + static constexpr auto SETTING_VIDEOPLAYER_USEVDPAUMPEG2 = "videoplayer.usevdpaumpeg2"; + static constexpr auto SETTING_VIDEOPLAYER_USEVDPAUMPEG4 = "videoplayer.usevdpaumpeg4"; + static constexpr auto SETTING_VIDEOPLAYER_USEVDPAUVC1 = "videoplayer.usevdpauvc1"; + static constexpr auto SETTING_VIDEOPLAYER_USEDXVA2 = "videoplayer.usedxva2"; + static constexpr auto SETTING_VIDEOPLAYER_USEVTB = "videoplayer.usevtb"; + static constexpr auto SETTING_VIDEOPLAYER_USEPRIMEDECODER = "videoplayer.useprimedecoder"; + static constexpr auto SETTING_VIDEOPLAYER_USESTAGEFRIGHT = "videoplayer.usestagefright"; + static constexpr auto SETTING_VIDEOPLAYER_LIMITGUIUPDATE = "videoplayer.limitguiupdate"; + static constexpr auto SETTING_VIDEOPLAYER_SUPPORTMVC = "videoplayer.supportmvc"; + static constexpr auto SETTING_MYVIDEOS_SELECTACTION = "myvideos.selectaction"; + static constexpr auto SETTING_MYVIDEOS_USETAGS = "myvideos.usetags"; + static constexpr auto SETTING_MYVIDEOS_EXTRACTFLAGS = "myvideos.extractflags"; + static constexpr auto SETTING_MYVIDEOS_EXTRACTCHAPTERTHUMBS = "myvideos.extractchapterthumbs"; + static constexpr auto SETTING_MYVIDEOS_REPLACELABELS = "myvideos.replacelabels"; + static constexpr auto SETTING_MYVIDEOS_EXTRACTTHUMB = "myvideos.extractthumb"; + static constexpr auto SETTING_MYVIDEOS_STACKVIDEOS = "myvideos.stackvideos"; + static constexpr auto SETTING_LOCALE_SUBTITLELANGUAGE = "locale.subtitlelanguage"; + static constexpr auto SETTING_SUBTITLES_PARSECAPTIONS = "subtitles.parsecaptions"; + static constexpr auto SETTING_SUBTITLES_ALIGN = "subtitles.align"; + static constexpr auto SETTING_SUBTITLES_STEREOSCOPICDEPTH = "subtitles.stereoscopicdepth"; + static constexpr auto SETTING_SUBTITLES_FONT = "subtitles.font"; + static constexpr auto SETTING_SUBTITLES_HEIGHT = "subtitles.height"; + static constexpr auto SETTING_SUBTITLES_STYLE = "subtitles.style"; + static constexpr auto SETTING_SUBTITLES_COLOR = "subtitles.color"; + static constexpr auto SETTING_SUBTITLES_BGCOLOR = "subtitles.bgcolor"; + static constexpr auto SETTING_SUBTITLES_BGOPACITY = "subtitles.bgopacity"; + static constexpr auto SETTING_SUBTITLES_CHARSET = "subtitles.charset"; + static constexpr auto SETTING_SUBTITLES_OVERRIDEASSFONTS = "subtitles.overrideassfonts"; + static constexpr auto SETTING_SUBTITLES_LANGUAGES = "subtitles.languages"; + static constexpr auto SETTING_SUBTITLES_STORAGEMODE = "subtitles.storagemode"; + static constexpr auto SETTING_SUBTITLES_CUSTOMPATH = "subtitles.custompath"; + static constexpr auto SETTING_SUBTITLES_PAUSEONSEARCH = "subtitles.pauseonsearch"; + static constexpr auto SETTING_SUBTITLES_DOWNLOADFIRST = "subtitles.downloadfirst"; + static constexpr auto SETTING_SUBTITLES_TV = "subtitles.tv"; + static constexpr auto SETTING_SUBTITLES_MOVIE = "subtitles.movie"; + static constexpr auto SETTING_DVDS_AUTORUN = "dvds.autorun"; + static constexpr auto SETTING_DVDS_PLAYERREGION = "dvds.playerregion"; + static constexpr auto SETTING_DVDS_AUTOMENU = "dvds.automenu"; + static constexpr auto SETTING_DISC_PLAYBACK = "disc.playback"; + static constexpr auto SETTING_BLURAY_PLAYERREGION = "bluray.playerregion"; + static constexpr auto SETTING_ACCESSIBILITY_AUDIOVISUAL = "accessibility.audiovisual"; + static constexpr auto SETTING_ACCESSIBILITY_AUDIOHEARING = "accessibility.audiohearing"; + static constexpr auto SETTING_ACCESSIBILITY_SUBHEARING = "accessibility.subhearing"; + static constexpr auto SETTING_SCRAPERS_MOVIESDEFAULT = "scrapers.moviesdefault"; + static constexpr auto SETTING_SCRAPERS_TVSHOWSDEFAULT = "scrapers.tvshowsdefault"; + static constexpr auto SETTING_SCRAPERS_MUSICVIDEOSDEFAULT = "scrapers.musicvideosdefault"; + static constexpr auto SETTING_PVRMANAGER_PRESELECTPLAYINGCHANNEL = + "pvrmanager.preselectplayingchannel"; + static constexpr auto SETTING_PVRMANAGER_SYNCCHANNELGROUPS = "pvrmanager.syncchannelgroups"; + static constexpr auto SETTING_PVRMANAGER_BACKENDCHANNELORDER = "pvrmanager.backendchannelorder"; + static constexpr auto SETTING_PVRMANAGER_USEBACKENDCHANNELNUMBERS = + "pvrmanager.usebackendchannelnumbers"; + static constexpr auto SETTING_PVRMANAGER_USEBACKENDCHANNELNUMBERSALWAYS = + "pvrmanager.usebackendchannelnumbersalways"; + static constexpr auto SETTING_PVRMANAGER_STARTGROUPCHANNELNUMBERSFROMONE = + "pvrmanager.startgroupchannelnumbersfromone"; + static constexpr auto SETTING_PVRMANAGER_CLIENTPRIORITIES = "pvrmanager.clientpriorities"; + static constexpr auto SETTING_PVRMANAGER_CHANNELMANAGER = "pvrmanager.channelmanager"; + static constexpr auto SETTING_PVRMANAGER_GROUPMANAGER = "pvrmanager.groupmanager"; + static constexpr auto SETTING_PVRMANAGER_CHANNELSCAN = "pvrmanager.channelscan"; + static constexpr auto SETTING_PVRMANAGER_RESETDB = "pvrmanager.resetdb"; + static constexpr auto SETTING_PVRMENU_DISPLAYCHANNELINFO = "pvrmenu.displaychannelinfo"; + static constexpr auto SETTING_PVRMENU_CLOSECHANNELOSDONSWITCH = "pvrmenu.closechannelosdonswitch"; + static constexpr auto SETTING_PVRMENU_ICONPATH = "pvrmenu.iconpath"; + static constexpr auto SETTING_PVRMENU_SEARCHICONS = "pvrmenu.searchicons"; + static constexpr auto SETTING_EPG_PAST_DAYSTODISPLAY = "epg.pastdaystodisplay"; + static constexpr auto SETTING_EPG_FUTURE_DAYSTODISPLAY = "epg.futuredaystodisplay"; + static constexpr auto SETTING_EPG_SELECTACTION = "epg.selectaction"; + static constexpr auto SETTING_EPG_HIDENOINFOAVAILABLE = "epg.hidenoinfoavailable"; + static constexpr auto SETTING_EPG_EPGUPDATE = "epg.epgupdate"; + static constexpr auto SETTING_EPG_PREVENTUPDATESWHILEPLAYINGTV = + "epg.preventupdateswhileplayingtv"; + static constexpr auto SETTING_EPG_RESETEPG = "epg.resetepg"; + static constexpr auto SETTING_PVRPLAYBACK_SWITCHTOFULLSCREENCHANNELTYPES = + "pvrplayback.switchtofullscreenchanneltypes"; + static constexpr auto SETTING_PVRPLAYBACK_SIGNALQUALITY = "pvrplayback.signalquality"; + static constexpr auto SETTING_PVRPLAYBACK_CONFIRMCHANNELSWITCH = + "pvrplayback.confirmchannelswitch"; + static constexpr auto SETTING_PVRPLAYBACK_CHANNELENTRYTIMEOUT = "pvrplayback.channelentrytimeout"; + static constexpr auto SETTING_PVRPLAYBACK_DELAYMARKLASTWATCHED = + "pvrplayback.delaymarklastwatched"; + static constexpr auto SETTING_PVRPLAYBACK_FPS = "pvrplayback.fps"; + static constexpr auto SETTING_PVRRECORD_INSTANTRECORDACTION = "pvrrecord.instantrecordaction"; + static constexpr auto SETTING_PVRRECORD_INSTANTRECORDTIME = "pvrrecord.instantrecordtime"; + static constexpr auto SETTING_PVRRECORD_MARGINSTART = "pvrrecord.marginstart"; + static constexpr auto SETTING_PVRRECORD_MARGINEND = "pvrrecord.marginend"; + static constexpr auto SETTING_PVRRECORD_TIMERNOTIFICATIONS = "pvrrecord.timernotifications"; + static constexpr auto SETTING_PVRRECORD_GROUPRECORDINGS = "pvrrecord.grouprecordings"; + static constexpr auto SETTING_PVRREMINDERS_AUTOCLOSEDELAY = "pvrreminders.autoclosedelay"; + static constexpr auto SETTING_PVRREMINDERS_AUTORECORD = "pvrreminders.autorecord"; + static constexpr auto SETTING_PVRREMINDERS_AUTOSWITCH = "pvrreminders.autoswitch"; + static constexpr auto SETTING_PVRPOWERMANAGEMENT_ENABLED = "pvrpowermanagement.enabled"; + static constexpr auto SETTING_PVRPOWERMANAGEMENT_BACKENDIDLETIME = + "pvrpowermanagement.backendidletime"; + static constexpr auto SETTING_PVRPOWERMANAGEMENT_SETWAKEUPCMD = "pvrpowermanagement.setwakeupcmd"; + static constexpr auto SETTING_PVRPOWERMANAGEMENT_PREWAKEUP = "pvrpowermanagement.prewakeup"; + static constexpr auto SETTING_PVRPOWERMANAGEMENT_DAILYWAKEUP = "pvrpowermanagement.dailywakeup"; + static constexpr auto SETTING_PVRPOWERMANAGEMENT_DAILYWAKEUPTIME = + "pvrpowermanagement.dailywakeuptime"; + static constexpr auto SETTING_PVRPARENTAL_ENABLED = "pvrparental.enabled"; + static constexpr auto SETTING_PVRPARENTAL_PIN = "pvrparental.pin"; + static constexpr auto SETTING_PVRPARENTAL_DURATION = "pvrparental.duration"; + static constexpr auto SETTING_PVRCLIENT_MENUHOOK = "pvrclient.menuhook"; + static constexpr auto SETTING_PVRTIMERS_HIDEDISABLEDTIMERS = "pvrtimers.hidedisabledtimers"; + static constexpr auto SETTING_MUSICLIBRARY_SHOWCOMPILATIONARTISTS = + "musiclibrary.showcompilationartists"; + static constexpr auto SETTING_MUSICLIBRARY_SHOWDISCS = "musiclibrary.showdiscs"; + static constexpr auto SETTING_MUSICLIBRARY_USEORIGINALDATE = "musiclibrary.useoriginaldate"; + static constexpr auto SETTING_MUSICLIBRARY_USEARTISTSORTNAME = "musiclibrary.useartistsortname"; + static constexpr auto SETTING_MUSICLIBRARY_DOWNLOADINFO = "musiclibrary.downloadinfo"; + static constexpr auto SETTING_MUSICLIBRARY_ARTISTSFOLDER = "musiclibrary.artistsfolder"; + static constexpr auto SETTING_MUSICLIBRARY_PREFERONLINEALBUMART = + "musiclibrary.preferonlinealbumart"; + static constexpr auto SETTING_MUSICLIBRARY_ARTWORKLEVEL = "musiclibrary.artworklevel"; + static constexpr auto SETTING_MUSICLIBRARY_USEALLLOCALART = "musiclibrary.usealllocalart"; + static constexpr auto SETTING_MUSICLIBRARY_USEALLREMOTEART = "musiclibrary.useallremoteart"; + static constexpr auto SETTING_MUSICLIBRARY_ARTISTART_WHITELIST = + "musiclibrary.artistartwhitelist"; + static constexpr auto SETTING_MUSICLIBRARY_ALBUMART_WHITELIST = "musiclibrary.albumartwhitelist"; + static constexpr auto SETTING_MUSICLIBRARY_MUSICTHUMBS = "musiclibrary.musicthumbs"; + static constexpr auto SETTING_MUSICLIBRARY_ARTSETTINGS_UPDATED = "musiclibrary.artsettings"; + static constexpr auto SETTING_MUSICLIBRARY_ALBUMSSCRAPER = "musiclibrary.albumsscraper"; + static constexpr auto SETTING_MUSICLIBRARY_ARTISTSSCRAPER = "musiclibrary.artistsscraper"; + static constexpr auto SETTING_MUSICLIBRARY_OVERRIDETAGS = "musiclibrary.overridetags"; + static constexpr auto SETTING_MUSICLIBRARY_SHOWALLITEMS = "musiclibrary.showallitems"; + static constexpr auto SETTING_MUSICLIBRARY_UPDATEONSTARTUP = "musiclibrary.updateonstartup"; + static constexpr auto SETTING_MUSICLIBRARY_BACKGROUNDUPDATE = "musiclibrary.backgroundupdate"; + static constexpr auto SETTING_MUSICLIBRARY_CLEANUP = "musiclibrary.cleanup"; + static constexpr auto SETTING_MUSICLIBRARY_EXPORT = "musiclibrary.export"; + static constexpr auto SETTING_MUSICLIBRARY_EXPORT_FILETYPE = "musiclibrary.exportfiletype"; + static constexpr auto SETTING_MUSICLIBRARY_EXPORT_FOLDER = "musiclibrary.exportfolder"; + static constexpr auto SETTING_MUSICLIBRARY_EXPORT_ITEMS = "musiclibrary.exportitems"; + static constexpr auto SETTING_MUSICLIBRARY_EXPORT_UNSCRAPED = "musiclibrary.exportunscraped"; + static constexpr auto SETTING_MUSICLIBRARY_EXPORT_OVERWRITE = "musiclibrary.exportoverwrite"; + static constexpr auto SETTING_MUSICLIBRARY_EXPORT_ARTWORK = "musiclibrary.exportartwork"; + static constexpr auto SETTING_MUSICLIBRARY_EXPORT_SKIPNFO = "musiclibrary.exportskipnfo"; + static constexpr auto SETTING_MUSICLIBRARY_IMPORT = "musiclibrary.import"; + static constexpr auto SETTING_MUSICPLAYER_AUTOPLAYNEXTITEM = "musicplayer.autoplaynextitem"; + static constexpr auto SETTING_MUSICPLAYER_QUEUEBYDEFAULT = "musicplayer.queuebydefault"; + static constexpr auto SETTING_MUSICPLAYER_SEEKSTEPS = "musicplayer.seeksteps"; + static constexpr auto SETTING_MUSICPLAYER_SEEKDELAY = "musicplayer.seekdelay"; + static constexpr auto SETTING_MUSICPLAYER_REPLAYGAINTYPE = "musicplayer.replaygaintype"; + static constexpr auto SETTING_MUSICPLAYER_REPLAYGAINPREAMP = "musicplayer.replaygainpreamp"; + static constexpr auto SETTING_MUSICPLAYER_REPLAYGAINNOGAINPREAMP = + "musicplayer.replaygainnogainpreamp"; + static constexpr auto SETTING_MUSICPLAYER_REPLAYGAINAVOIDCLIPPING = + "musicplayer.replaygainavoidclipping"; + static constexpr auto SETTING_MUSICPLAYER_CROSSFADE = "musicplayer.crossfade"; + static constexpr auto SETTING_MUSICPLAYER_CROSSFADEALBUMTRACKS = + "musicplayer.crossfadealbumtracks"; + static constexpr auto SETTING_MUSICPLAYER_VISUALISATION = "musicplayer.visualisation"; + static constexpr auto SETTING_MUSICFILES_SELECTACTION = "musicfiles.selectaction"; + static constexpr auto SETTING_MUSICFILES_USETAGS = "musicfiles.usetags"; + static constexpr auto SETTING_MUSICFILES_TRACKFORMAT = "musicfiles.trackformat"; + static constexpr auto SETTING_MUSICFILES_NOWPLAYINGTRACKFORMAT = + "musicfiles.nowplayingtrackformat"; + static constexpr auto SETTING_MUSICFILES_LIBRARYTRACKFORMAT = "musicfiles.librarytrackformat"; + static constexpr auto SETTING_MUSICFILES_FINDREMOTETHUMBS = "musicfiles.findremotethumbs"; + static constexpr auto SETTING_AUDIOCDS_AUTOACTION = "audiocds.autoaction"; + static constexpr auto SETTING_AUDIOCDS_USECDDB = "audiocds.usecddb"; + static constexpr auto SETTING_AUDIOCDS_RECORDINGPATH = "audiocds.recordingpath"; + static constexpr auto SETTING_AUDIOCDS_TRACKPATHFORMAT = "audiocds.trackpathformat"; + static constexpr auto SETTING_AUDIOCDS_ENCODER = "audiocds.encoder"; + static constexpr auto SETTING_AUDIOCDS_SETTINGS = "audiocds.settings"; + static constexpr auto SETTING_AUDIOCDS_EJECTONRIP = "audiocds.ejectonrip"; + static constexpr auto SETTING_MYMUSIC_SONGTHUMBINVIS = "mymusic.songthumbinvis"; + static constexpr auto SETTING_MYMUSIC_DEFAULTLIBVIEW = "mymusic.defaultlibview"; + static constexpr auto SETTING_PICTURES_USETAGS = "pictures.usetags"; + static constexpr auto SETTING_PICTURES_GENERATETHUMBS = "pictures.generatethumbs"; + static constexpr auto SETTING_PICTURES_SHOWVIDEOS = "pictures.showvideos"; + static constexpr auto SETTING_PICTURES_DISPLAYRESOLUTION = "pictures.displayresolution"; + static constexpr auto SETTING_SLIDESHOW_STAYTIME = "slideshow.staytime"; + static constexpr auto SETTING_SLIDESHOW_DISPLAYEFFECTS = "slideshow.displayeffects"; + static constexpr auto SETTING_SLIDESHOW_SHUFFLE = "slideshow.shuffle"; + static constexpr auto SETTING_SLIDESHOW_HIGHQUALITYDOWNSCALING = + "slideshow.highqualitydownscaling"; + static constexpr auto SETTING_WEATHER_CURRENTLOCATION = "weather.currentlocation"; + static constexpr auto SETTING_WEATHER_ADDON = "weather.addon"; + static constexpr auto SETTING_WEATHER_ADDONSETTINGS = "weather.addonsettings"; + static constexpr auto SETTING_SERVICES_DEVICENAME = "services.devicename"; + static constexpr auto SETTING_SERVICES_DEVICEUUID = "services.deviceuuid"; + static constexpr auto SETTING_SERVICES_UPNP = "services.upnp"; + static constexpr auto SETTING_SERVICES_UPNPSERVER = "services.upnpserver"; + static constexpr auto SETTING_SERVICES_UPNPANNOUNCE = "services.upnpannounce"; + static constexpr auto SETTING_SERVICES_UPNPLOOKFOREXTERNALSUBTITLES = + "services.upnplookforexternalsubtitles"; + static constexpr auto SETTING_SERVICES_UPNPCONTROLLER = "services.upnpcontroller"; + static constexpr auto SETTING_SERVICES_UPNPRENDERER = "services.upnprenderer"; + static constexpr auto SETTING_SERVICES_WEBSERVER = "services.webserver"; + static constexpr auto SETTING_SERVICES_WEBSERVERPORT = "services.webserverport"; + static constexpr auto SETTING_SERVICES_WEBSERVERAUTHENTICATION = + "services.webserverauthentication"; + static constexpr auto SETTING_SERVICES_WEBSERVERUSERNAME = "services.webserverusername"; + static constexpr auto SETTING_SERVICES_WEBSERVERPASSWORD = "services.webserverpassword"; + static constexpr auto SETTING_SERVICES_WEBSERVERSSL = "services.webserverssl"; + static constexpr auto SETTING_SERVICES_WEBSKIN = "services.webskin"; + static constexpr auto SETTING_SERVICES_ESENABLED = "services.esenabled"; + static constexpr auto SETTING_SERVICES_ESPORT = "services.esport"; + static constexpr auto SETTING_SERVICES_ESPORTRANGE = "services.esportrange"; + static constexpr auto SETTING_SERVICES_ESMAXCLIENTS = "services.esmaxclients"; + static constexpr auto SETTING_SERVICES_ESALLINTERFACES = "services.esallinterfaces"; + static constexpr auto SETTING_SERVICES_ESINITIALDELAY = "services.esinitialdelay"; + static constexpr auto SETTING_SERVICES_ESCONTINUOUSDELAY = "services.escontinuousdelay"; + static constexpr auto SETTING_SERVICES_ZEROCONF = "services.zeroconf"; + static constexpr auto SETTING_SERVICES_AIRPLAY = "services.airplay"; + static constexpr auto SETTING_SERVICES_AIRPLAYVOLUMECONTROL = "services.airplayvolumecontrol"; + static constexpr auto SETTING_SERVICES_USEAIRPLAYPASSWORD = "services.useairplaypassword"; + static constexpr auto SETTING_SERVICES_AIRPLAYPASSWORD = "services.airplaypassword"; + static constexpr auto SETTING_SERVICES_AIRPLAYVIDEOSUPPORT = "services.airplayvideosupport"; + static constexpr auto SETTING_SMB_WINSSERVER = "smb.winsserver"; + static constexpr auto SETTING_SMB_WORKGROUP = "smb.workgroup"; + static constexpr auto SETTING_SMB_MINPROTOCOL = "smb.minprotocol"; + static constexpr auto SETTING_SMB_MAXPROTOCOL = "smb.maxprotocol"; + static constexpr auto SETTING_SMB_LEGACYSECURITY = "smb.legacysecurity"; + static constexpr auto SETTING_VIDEOSCREEN_MONITOR = "videoscreen.monitor"; + static constexpr auto SETTING_VIDEOSCREEN_SCREEN = "videoscreen.screen"; + static constexpr auto SETTING_VIDEOSCREEN_WHITELIST = "videoscreen.whitelist"; + static constexpr auto SETTING_VIDEOSCREEN_RESOLUTION = "videoscreen.resolution"; + static constexpr auto SETTING_VIDEOSCREEN_SCREENMODE = "videoscreen.screenmode"; + static constexpr auto SETTING_VIDEOSCREEN_FAKEFULLSCREEN = "videoscreen.fakefullscreen"; + static constexpr auto SETTING_VIDEOSCREEN_BLANKDISPLAYS = "videoscreen.blankdisplays"; + static constexpr auto SETTING_VIDEOSCREEN_STEREOSCOPICMODE = "videoscreen.stereoscopicmode"; + static constexpr auto SETTING_VIDEOSCREEN_PREFEREDSTEREOSCOPICMODE = + "videoscreen.preferedstereoscopicmode"; + static constexpr auto SETTING_VIDEOSCREEN_NOOFBUFFERS = "videoscreen.noofbuffers"; + static constexpr auto SETTING_VIDEOSCREEN_3DLUT = "videoscreen.cms3dlut"; + static constexpr auto SETTING_VIDEOSCREEN_DISPLAYPROFILE = "videoscreen.displayprofile"; + static constexpr auto SETTING_VIDEOSCREEN_GUICALIBRATION = "videoscreen.guicalibration"; + static constexpr auto SETTING_VIDEOSCREEN_TESTPATTERN = "videoscreen.testpattern"; + static constexpr auto SETTING_VIDEOSCREEN_LIMITEDRANGE = "videoscreen.limitedrange"; + static constexpr auto SETTING_VIDEOSCREEN_FRAMEPACKING = "videoscreen.framepacking"; + static constexpr auto SETTING_AUDIOOUTPUT_AUDIODEVICE = "audiooutput.audiodevice"; + static constexpr auto SETTING_AUDIOOUTPUT_CHANNELS = "audiooutput.channels"; + static constexpr auto SETTING_AUDIOOUTPUT_CONFIG = "audiooutput.config"; + static constexpr auto SETTING_AUDIOOUTPUT_SAMPLERATE = "audiooutput.samplerate"; + static constexpr auto SETTING_AUDIOOUTPUT_STEREOUPMIX = "audiooutput.stereoupmix"; + static constexpr auto SETTING_AUDIOOUTPUT_MAINTAINORIGINALVOLUME = + "audiooutput.maintainoriginalvolume"; + static constexpr auto SETTING_AUDIOOUTPUT_PROCESSQUALITY = "audiooutput.processquality"; + static constexpr auto SETTING_AUDIOOUTPUT_ATEMPOTHRESHOLD = "audiooutput.atempothreshold"; + static constexpr auto SETTING_AUDIOOUTPUT_STREAMSILENCE = "audiooutput.streamsilence"; + static constexpr auto SETTING_AUDIOOUTPUT_STREAMNOISE = "audiooutput.streamnoise"; + static constexpr auto SETTING_AUDIOOUTPUT_GUISOUNDMODE = "audiooutput.guisoundmode"; + static constexpr auto SETTING_AUDIOOUTPUT_PASSTHROUGH = "audiooutput.passthrough"; + static constexpr auto SETTING_AUDIOOUTPUT_PASSTHROUGHDEVICE = "audiooutput.passthroughdevice"; + static constexpr auto SETTING_AUDIOOUTPUT_AC3PASSTHROUGH = "audiooutput.ac3passthrough"; + static constexpr auto SETTING_AUDIOOUTPUT_AC3TRANSCODE = "audiooutput.ac3transcode"; + static constexpr auto SETTING_AUDIOOUTPUT_EAC3PASSTHROUGH = "audiooutput.eac3passthrough"; + static constexpr auto SETTING_AUDIOOUTPUT_DTSPASSTHROUGH = "audiooutput.dtspassthrough"; + static constexpr auto SETTING_AUDIOOUTPUT_TRUEHDPASSTHROUGH = "audiooutput.truehdpassthrough"; + static constexpr auto SETTING_AUDIOOUTPUT_DTSHDPASSTHROUGH = "audiooutput.dtshdpassthrough"; + static constexpr auto SETTING_AUDIOOUTPUT_VOLUMESTEPS = "audiooutput.volumesteps"; + static constexpr auto SETTING_INPUT_PERIPHERALS = "input.peripherals"; + static constexpr auto SETTING_INPUT_PERIPHERALLIBRARIES = "input.peripherallibraries"; + static constexpr auto SETTING_INPUT_ENABLEMOUSE = "input.enablemouse"; + static constexpr auto SETTING_INPUT_ASKNEWCONTROLLERS = "input.asknewcontrollers"; + static constexpr auto SETTING_INPUT_CONTROLLERCONFIG = "input.controllerconfig"; + static constexpr auto SETTING_INPUT_RUMBLENOTIFY = "input.rumblenotify"; + static constexpr auto SETTING_INPUT_TESTRUMBLE = "input.testrumble"; + static constexpr auto SETTING_INPUT_CONTROLLERPOWEROFF = "input.controllerpoweroff"; + static constexpr auto SETTING_INPUT_APPLEREMOTEMODE = "input.appleremotemode"; + static constexpr auto SETTING_INPUT_APPLEREMOTEALWAYSON = "input.appleremotealwayson"; + static constexpr auto SETTING_INPUT_APPLEREMOTESEQUENCETIME = "input.appleremotesequencetime"; + static constexpr auto SETTING_INPUT_APPLESIRI = "input.applesiri"; + static constexpr auto SETTING_INPUT_APPLESIRITIMEOUT = "input.applesiritimeout"; + static constexpr auto SETTING_INPUT_APPLESIRITIMEOUTENABLED = "input.applesiritimeoutenabled"; + static constexpr auto SETTING_INPUT_APPLEUSEKODIKEYBOARD = "input.appleusekodikeyboard"; + static constexpr auto SETTING_NETWORK_USEHTTPPROXY = "network.usehttpproxy"; + static constexpr auto SETTING_NETWORK_HTTPPROXYTYPE = "network.httpproxytype"; + static constexpr auto SETTING_NETWORK_HTTPPROXYSERVER = "network.httpproxyserver"; + static constexpr auto SETTING_NETWORK_HTTPPROXYPORT = "network.httpproxyport"; + static constexpr auto SETTING_NETWORK_HTTPPROXYUSERNAME = "network.httpproxyusername"; + static constexpr auto SETTING_NETWORK_HTTPPROXYPASSWORD = "network.httpproxypassword"; + static constexpr auto SETTING_NETWORK_BANDWIDTH = "network.bandwidth"; + static constexpr auto SETTING_POWERMANAGEMENT_DISPLAYSOFF = "powermanagement.displaysoff"; + static constexpr auto SETTING_POWERMANAGEMENT_SHUTDOWNTIME = "powermanagement.shutdowntime"; + static constexpr auto SETTING_POWERMANAGEMENT_SHUTDOWNSTATE = "powermanagement.shutdownstate"; + static constexpr auto SETTING_POWERMANAGEMENT_WAKEONACCESS = "powermanagement.wakeonaccess"; + static constexpr auto SETTING_POWERMANAGEMENT_WAITFORNETWORK = "powermanagement.waitfornetwork"; + static constexpr auto SETTING_DEBUG_SHOWLOGINFO = "debug.showloginfo"; + static constexpr auto SETTING_DEBUG_EXTRALOGGING = "debug.extralogging"; + static constexpr auto SETTING_DEBUG_SETEXTRALOGLEVEL = "debug.setextraloglevel"; + static constexpr auto SETTING_DEBUG_SCREENSHOTPATH = "debug.screenshotpath"; + static constexpr auto SETTING_DEBUG_SHARE_LOG = "debug.sharelog"; + static constexpr auto SETTING_EVENTLOG_ENABLED = "eventlog.enabled"; + static constexpr auto SETTING_EVENTLOG_ENABLED_NOTIFICATIONS = "eventlog.enablednotifications"; + static constexpr auto SETTING_EVENTLOG_SHOW = "eventlog.show"; + static constexpr auto SETTING_MASTERLOCK_LOCKCODE = "masterlock.lockcode"; + static constexpr auto SETTING_MASTERLOCK_STARTUPLOCK = "masterlock.startuplock"; + static constexpr auto SETTING_MASTERLOCK_MAXRETRIES = "masterlock.maxretries"; + static constexpr auto SETTING_CACHE_HARDDISK = "cache.harddisk"; + static constexpr auto SETTING_CACHEVIDEO_DVDROM = "cachevideo.dvdrom"; + static constexpr auto SETTING_CACHEVIDEO_LAN = "cachevideo.lan"; + static constexpr auto SETTING_CACHEVIDEO_INTERNET = "cachevideo.internet"; + static constexpr auto SETTING_CACHEAUDIO_DVDROM = "cacheaudio.dvdrom"; + static constexpr auto SETTING_CACHEAUDIO_LAN = "cacheaudio.lan"; + static constexpr auto SETTING_CACHEAUDIO_INTERNET = "cacheaudio.internet"; + static constexpr auto SETTING_CACHEDVD_DVDROM = "cachedvd.dvdrom"; + static constexpr auto SETTING_CACHEDVD_LAN = "cachedvd.lan"; + static constexpr auto SETTING_CACHEUNKNOWN_INTERNET = "cacheunknown.internet"; + static constexpr auto SETTING_SYSTEM_PLAYLISTSPATH = "system.playlistspath"; + static constexpr auto SETTING_ADDONS_AUTOUPDATES = "general.addonupdates"; + static constexpr auto SETTING_ADDONS_NOTIFICATIONS = "general.addonnotifications"; + static constexpr auto SETTING_ADDONS_SHOW_RUNNING = "addons.showrunning"; + static constexpr auto SETTING_ADDONS_ALLOW_UNKNOWN_SOURCES = "addons.unknownsources"; + static constexpr auto SETTING_ADDONS_UPDATEMODE = "addons.updatemode"; + static constexpr auto SETTING_ADDONS_MANAGE_DEPENDENCIES = "addons.managedependencies"; + static constexpr auto SETTING_GENERAL_ADDONFOREIGNFILTER = "general.addonforeignfilter"; + static constexpr auto SETTING_GENERAL_ADDONBROKENFILTER = "general.addonbrokenfilter"; + static constexpr auto SETTING_SOURCE_VIDEOS = "source.videos"; + static constexpr auto SETTING_SOURCE_MUSIC = "source.music"; + static constexpr auto SETTING_SOURCE_PICTURES = "source.pictures"; + // values for SETTING_VIDEOLIBRARY_SHOWUNWATCHEDPLOTS static const int VIDEOLIBRARY_PLOTS_SHOW_UNWATCHED_MOVIES = 0; static const int VIDEOLIBRARY_PLOTS_SHOW_UNWATCHED_TVSHOWEPISODES = 1; diff --git a/xbmc/threads/SystemClock.h b/xbmc/threads/SystemClock.h index d38f2326eb..5db7657deb 100644 --- a/xbmc/threads/SystemClock.h +++ b/xbmc/threads/SystemClock.h @@ -59,9 +59,4 @@ namespace XbmcThreads inline unsigned int GetInitialTimeoutValue(void) const { return totalWaitTime; } inline unsigned int GetStartTime(void) const { return startTime; } }; - - inline void ThreadSleep(unsigned int millis) - { - std::this_thread::sleep_for(std::chrono::microseconds(millis)); - } } diff --git a/xbmc/threads/test/CMakeLists.txt b/xbmc/threads/test/CMakeLists.txt index 0c9b07a489..136e972223 100644 --- a/xbmc/threads/test/CMakeLists.txt +++ b/xbmc/threads/test/CMakeLists.txt @@ -1,5 +1,6 @@ set(SOURCES TestEvent.cpp - TestSharedSection.cpp) + TestSharedSection.cpp + TestEndTime.cpp) set(HEADERS TestHelpers.h) diff --git a/xbmc/threads/test/TestEndTime.cpp b/xbmc/threads/test/TestEndTime.cpp new file mode 100644 index 0000000000..daa13b37b7 --- /dev/null +++ b/xbmc/threads/test/TestEndTime.cpp @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2005-2020 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 "threads/SystemClock.h" + +#include <gtest/gtest.h> + +namespace +{ + +void CommonTests(XbmcThreads::EndTime& endTime) +{ + EXPECT_EQ(static_cast<unsigned int>(100), endTime.GetInitialTimeoutValue()); + EXPECT_LE(static_cast<unsigned int>(0), endTime.GetStartTime()); + + EXPECT_FALSE(endTime.IsTimePast()); + EXPECT_LT(static_cast<unsigned int>(0), endTime.MillisLeft()); + + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + + EXPECT_TRUE(endTime.IsTimePast()); + EXPECT_EQ(static_cast<unsigned int>(0), endTime.MillisLeft()); + + endTime.SetInfinite(); + EXPECT_EQ(std::numeric_limits<unsigned int>::max(), endTime.GetInitialTimeoutValue()); + endTime.SetExpired(); + EXPECT_EQ(static_cast<unsigned int>(0), endTime.GetInitialTimeoutValue()); +} + +} // namespace + +TEST(TestEndTime, DefaultConstructor) +{ + XbmcThreads::EndTime endTime; + endTime.Set(static_cast<unsigned int>(100)); + + CommonTests(endTime); +} + +TEST(TestEndTime, ExplicitConstructor) +{ + XbmcThreads::EndTime endTime(static_cast<unsigned int>(100)); + + CommonTests(endTime); +} diff --git a/xbmc/threads/test/TestHelpers.h b/xbmc/threads/test/TestHelpers.h index 760e4d594e..9cd88bc8ec 100644 --- a/xbmc/threads/test/TestHelpers.h +++ b/xbmc/threads/test/TestHelpers.h @@ -14,7 +14,10 @@ #define MILLIS(x) x -inline static void SleepMillis(unsigned int millis) { XbmcThreads::ThreadSleep(millis); } +inline static void SleepMillis(unsigned int millis) +{ + std::this_thread::sleep_for(std::chrono::milliseconds(millis)); +} template<class E> inline static bool waitForWaiters(E& event, int numWaiters, int milliseconds) { diff --git a/xbmc/video/GUIViewStateVideo.cpp b/xbmc/video/GUIViewStateVideo.cpp index b99ea4da62..38828fd99f 100644 --- a/xbmc/video/GUIViewStateVideo.cpp +++ b/xbmc/video/GUIViewStateVideo.cpp @@ -160,9 +160,8 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it AddSortMethod(SortByYear, 562, LABEL_MASKS("%T", "%Y", "%T", "%Y")); // Title, Year | Title, Year AddSortMethod(SortByRating, 563, LABEL_MASKS("%T", "%R", "%T", "%R")); // Title, Rating | Title, Rating AddSortMethod(SortByDateAdded, 570, LABEL_MASKS("%T", "%a", "%T", "%a")); // Title, DateAdded | Title, DateAdded - - if (CMediaSettings::GetInstance().GetWatchedMode(items.GetContent()) == WatchedModeAll) - AddSortMethod(SortByPlaycount, 567, LABEL_MASKS("%T", "%V", "%T", "%V")); // Title, Playcount | Title, Playcount + AddSortMethod(SortByPlaycount, 567, + LABEL_MASKS("%T", "%V", "%T", "%V")); // Title, Playcount | Title, Playcount SetSortMethod(SortByLabel); @@ -191,9 +190,8 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it AddSortMethod(SortByMPAA, 20074, LABEL_MASKS("%E. %T", "%O")); // Episode. Title, MPAA | empty, empty AddSortMethod(SortByProductionCode, 20368, LABEL_MASKS("%E. %T","%P", "%E. %T","%P")); // Episode. Title, ProductionCode | Episode. Title, ProductionCode AddSortMethod(SortByDate, 552, LABEL_MASKS("%E. %T","%J","%E. %T","%J")); // Episode. Title, Date | Episode. Title, Date - - if (CMediaSettings::GetInstance().GetWatchedMode(items.GetContent()) == WatchedModeAll) - AddSortMethod(SortByPlaycount, 567, LABEL_MASKS("%E. %T", "%V")); // Episode. Title, Playcount | empty, empty + AddSortMethod(SortByPlaycount, 567, + LABEL_MASKS("%E. %T", "%V")); // Episode. Title, Playcount | empty, empty } else { @@ -203,9 +201,8 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it AddSortMethod(SortByMPAA, 20074, LABEL_MASKS("%H. %T", "%O")); // Order. Title, MPAA | empty, empty AddSortMethod(SortByProductionCode, 20368, LABEL_MASKS("%H. %T","%P", "%H. %T","%P")); // Order. Title, ProductionCode | Episode. Title, ProductionCode AddSortMethod(SortByDate, 552, LABEL_MASKS("%H. %T","%J","%H. %T","%J")); // Order. Title, Date | Episode. Title, Date - - if (CMediaSettings::GetInstance().GetWatchedMode(items.GetContent()) == WatchedModeAll) - AddSortMethod(SortByPlaycount, 567, LABEL_MASKS("%H. %T", "%V")); // Order. Title, Playcount | empty, empty + AddSortMethod(SortByPlaycount, 567, + LABEL_MASKS("%H. %T", "%V")); // Order. Title, Playcount | empty, empty } AddSortMethod(SortByLabel, sortAttributes, 551, LABEL_MASKS("%T","%R")); // Title, Rating | empty, empty @@ -242,9 +239,8 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it AddSortMethod(SortByMPAA, 20074, LABEL_MASKS("%T", "%O")); // Title, MPAA | empty, empty AddSortMethod(SortByTime, 180, LABEL_MASKS("%T", "%D")); // Title, Duration | empty, empty AddSortMethod(SortByDateAdded, 570, LABEL_MASKS("%T", "%a", "%T", "%a")); // Title, DateAdded | Title, DateAdded - - if (CMediaSettings::GetInstance().GetWatchedMode(items.GetContent()) == WatchedModeAll) - AddSortMethod(SortByPlaycount, 567, LABEL_MASKS("%T", "%V", "%T", "%V")); // Title, Playcount | Title, Playcount + AddSortMethod(SortByPlaycount, 567, + LABEL_MASKS("%T", "%V", "%T", "%V")); // Title, Playcount | Title, Playcount const CViewState *viewState = CViewStateSettings::GetInstance().Get("videonavtitles"); if (params.GetSetId() > -1) @@ -269,9 +265,8 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it AddSortMethod(SortByArtist, sortAttributes, 557, LABEL_MASKS("%A - %T", "%Y")); // Artist - Title, Year | empty, empty AddSortMethod(SortByAlbum, sortAttributes, 558, LABEL_MASKS("%B - %T", "%Y")); // Album - Title, Year | empty, empty AddSortMethod(SortByDateAdded, 570, LABEL_MASKS("%T", "%a", "%T", "%a")); // Title, DateAdded | Title, DateAdded - - if (CMediaSettings::GetInstance().GetWatchedMode(items.GetContent()) == WatchedModeAll) - AddSortMethod(SortByPlaycount, 567, LABEL_MASKS("%T", "%V")); // Title, Playcount | empty, empty + AddSortMethod(SortByPlaycount, 567, + LABEL_MASKS("%T", "%V")); // Title, Playcount | empty, empty std::string strTrack=CServiceBroker::GetSettingsComponent()->GetSettings()->GetString(CSettings::SETTING_MUSICFILES_TRACKFORMAT); AddSortMethod(SortByTrackNumber, 554, LABEL_MASKS(strTrack, "%N")); // Userdefined, Track Number | empty, empty @@ -447,9 +442,8 @@ CGUIViewStateVideoMovies::CGUIViewStateVideoMovies(const CFileItemList& items) : AddSortMethod(SortByMPAA, 20074, LABEL_MASKS("%T", "%O")); // Title, MPAA | empty, empty AddSortMethod(SortByTime, 180, LABEL_MASKS("%T", "%D")); // Title, Duration | empty, empty AddSortMethod(SortByDateAdded, 570, LABEL_MASKS("%T", "%a", "%T", "%a")); // Title, DateAdded | Title, DateAdded - - if (CMediaSettings::GetInstance().GetWatchedMode(items.GetContent()) == WatchedModeAll) - AddSortMethod(SortByPlaycount, 567, LABEL_MASKS("%T", "%V", "%T", "%V")); // Title, Playcount | Title, Playcount + AddSortMethod(SortByPlaycount, 567, + LABEL_MASKS("%T", "%V", "%T", "%V")); // Title, Playcount | Title, Playcount const CViewState *viewState = CViewStateSettings::GetInstance().Get("videonavtitles"); if (items.IsSmartPlayList() || items.IsLibraryFolder()) @@ -482,9 +476,7 @@ CGUIViewStateVideoMusicVideos::CGUIViewStateVideoMusicVideos(const CFileItemList AddSortMethod(SortByYear, 562, LABEL_MASKS("%T", "%Y")); // Title, Year | empty, empty AddSortMethod(SortByArtist, sortAttributes, 557, LABEL_MASKS("%A - %T", "%Y")); // Artist - Title, Year | empty, empty AddSortMethod(SortByAlbum, sortAttributes, 558, LABEL_MASKS("%B - %T", "%Y")); // Album - Title, Year | empty, empty - - if (CMediaSettings::GetInstance().GetWatchedMode(items.GetContent()) == WatchedModeAll) - AddSortMethod(SortByPlaycount, 567, LABEL_MASKS("%T", "%V")); // Title, Playcount | empty, empty + AddSortMethod(SortByPlaycount, 567, LABEL_MASKS("%T", "%V")); // Title, Playcount | empty, empty std::string strTrack = settings->GetString(CSettings::SETTING_MUSICFILES_TRACKFORMAT); AddSortMethod(SortByTrackNumber, 554, LABEL_MASKS(strTrack, "%N")); // Userdefined, Track Number | empty, empty @@ -552,9 +544,8 @@ CGUIViewStateVideoEpisodes::CGUIViewStateVideoEpisodes(const CFileItemList& item AddSortMethod(SortByProductionCode, 20368, LABEL_MASKS("%Z - %H. %T","%P")); // TvShow - Order. Title, Date | empty, empty AddSortMethod(SortByDate, 552, LABEL_MASKS("%Z - %H. %T","%J")); - - if (CMediaSettings::GetInstance().GetWatchedMode(items.GetContent()) == WatchedModeAll) - AddSortMethod(SortByPlaycount, 567, LABEL_MASKS("%H. %T", "%V")); // Order. Title, Playcount | empty, empty + // TvShow - Order. Title, Playcount | empty, empty + AddSortMethod(SortByPlaycount, 567, LABEL_MASKS("%H. %T", "%V")); AddSortMethod(SortByLabel, 551, LABEL_MASKS("%Z - %H. %T","%R"), // TvShow - Order. Title, Rating | empty, empty CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_FILELISTS_IGNORETHEWHENSORTING) ? SortAttributeIgnoreArticle : SortAttributeNone); diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp index bed0426c1d..862b4874e2 100644 --- a/xbmc/video/VideoDatabase.cpp +++ b/xbmc/video/VideoDatabase.cpp @@ -4469,12 +4469,6 @@ bool CVideoDatabase::GetVideoSettings(int idFile, CVideoSettings &settings) settings.m_Orientation = m_pDS->fv("Orientation").get_asInt(); settings.m_CenterMixLevel = m_pDS->fv("CenterMixLevel").get_asInt(); m_pDS->close(); - - if (settings.m_ToneMapParam == 0.0) - { - settings.m_ToneMapMethod = VS_TONEMAPMETHOD_REINHARD; - settings.m_ToneMapParam = 1.0; - } return true; } m_pDS->close(); diff --git a/xbmc/video/windows/VideoFileItemListModifier.cpp b/xbmc/video/windows/VideoFileItemListModifier.cpp index d1677682ca..099cbc1d2e 100644 --- a/xbmc/video/windows/VideoFileItemListModifier.cpp +++ b/xbmc/video/windows/VideoFileItemListModifier.cpp @@ -81,9 +81,13 @@ void CVideoFileItemListModifier::AddQueuingFolder(CFileItemList& items) pItem->SetProperty("numepisodes", watched + unwatched); // will be changed later to reflect watchmode setting pItem->SetProperty("watchedepisodes", watched); pItem->SetProperty("unwatchedepisodes", unwatched); - if (items.Size() && items[0]->GetVideoInfoTag()) + + // @note: the items list contains the (..) upper directory navigation fileitem plus all the + // season directory fileitems for a given show. We want to assign the "All Seasons" listitem + // the infotag of the tv show - so do not use the first item in the list! + if (items.Size() && items[items.Size() - 1]->GetVideoInfoTag()) { - *pItem->GetVideoInfoTag() = *items[0]->GetVideoInfoTag(); + *pItem->GetVideoInfoTag() = *items[items.Size() - 1]->GetVideoInfoTag(); pItem->GetVideoInfoTag()->m_iSeason = -1; } pItem->GetVideoInfoTag()->m_strTitle = strLabel; |