From 5dbae9f3e27913347edd9c53174a25f429ab34da Mon Sep 17 00:00:00 2001 From: ace20022 Date: Mon, 2 Mar 2015 00:23:15 +0100 Subject: [PATCH] [VideoBookmarks] Add a setting for chapter thumbnail extraction. --- language/English/strings.po | 14 +++++++++++++- system/settings/settings.xml | 5 +++++ xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp | 3 ++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/language/English/strings.po b/language/English/strings.po index 307325bce3348..c0c13832ef719 100644 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -16253,7 +16253,19 @@ msgctxt "#37043" msgid "Defines the time to wait for subsequent key presses before performing the skip. Only applies when using smart skipping (when using more than one skip step for a direction)." msgstr "" -#empty strings from id 37044 to 38009 +#. Setting #37044 Settings -> Video -> File lists -> Extract chapter thumbnails +#: system/settings/settings.xml +msgctxt "#37044" +msgid "Extract chapter thumbnails" +msgstr "" + +#. Description of setting #37044 "Video -> File lists -> Extract chapter thumbnails" +#: system/settings/settings.xml +msgctxt "#37045" +msgid "Extract chapter thumbnails for presentation in the chapters/bookmarks dialog. This might increase CPU load." +msgstr "" + +#empty strings from id 37046 to 38009 #: system/settings/rbp.xml msgctxt "#38010" diff --git a/system/settings/settings.xml b/system/settings/settings.xml index ecd2e9010f9ba..52d1fb7cce5d4 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -780,6 +780,11 @@ true + + 1 + true + + 1 true diff --git a/xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp b/xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp index 294a1cf03d0f7..328974bcbcf0f 100644 --- a/xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp +++ b/xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp @@ -52,6 +52,7 @@ #include "filesystem/File.h" #include "TextureCache.h" #include "ApplicationMessenger.h" +#include "settings/Settings.h" using namespace std; @@ -285,7 +286,7 @@ void CGUIDialogVideoBookmarks::OnRefreshList() std::string cachefile = CTextureCache::Get().GetCachedPath(CTextureCache::Get().GetCacheFile(time)+".jpg"); if (XFILE::CFile::Exists(cachefile)) item->SetArt("thumb", cachefile); - else if (i > m_jobsStarted) + else if (i > m_jobsStarted && CSettings::Get().GetBool("myvideos.extractchapterthumbs")) { CFileItem item(m_filePath, false); CJob* job = new CThumbExtractor(item, m_filePath, true, time, pos * 1000, false);