Skip to content

Commit

Permalink
[VideoBookmarks] Add a setting for chapter thumbnail extraction.
Browse files Browse the repository at this point in the history
  • Loading branch information
ace20022 committed Mar 1, 2015
1 parent 498747b commit 5dbae9f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
14 changes: 13 additions & 1 deletion language/English/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions system/settings/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,11 @@
<default>true</default>
<control type="toggle" />
</setting>
<setting id="myvideos.extractchapterthumbs" type="boolean" label="37044" help="37045">
<level>1</level>
<default>true</default>
<control type="toggle" />
</setting>
<setting id="myvideos.replacelabels" type="boolean" label="20419" help="36179">
<level>1</level>
<default>true</default>
Expand Down
3 changes: 2 additions & 1 deletion xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include "filesystem/File.h"
#include "TextureCache.h"
#include "ApplicationMessenger.h"
#include "settings/Settings.h"

using namespace std;

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 5dbae9f

Please sign in to comment.