projects
/
vuplus_xbmc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bd82b52
)
[subtitles] change settings logic for subtitle storage location (make it a spinner)
author
da-anda
<da-anda@xbmc.org>
Thu, 19 Dec 2013 11:12:11 +0000
(12:12 +0100)
committer
Jonathan Marshall
<jmarshall@never.you.mind>
Wed, 26 Feb 2014 22:53:07 +0000
(11:53 +1300)
language/English/strings.po
patch
|
blob
|
history
system/settings/settings.xml
patch
|
blob
|
history
xbmc/video/dialogs/GUIDialogSubtitles.cpp
patch
|
blob
|
history
xbmc/video/dialogs/GUIDialogSubtitles.h
patch
|
blob
|
history
diff --git
a/language/English/strings.po
b/language/English/strings.po
index
dd02310
..
9fc73cf
100755
(executable)
--- a/
language/English/strings.po
+++ b/
language/English/strings.po
@@
-12178,7
+12178,7
@@
msgstr ""
#. Description of setting "Videos -> Subtitles -> Save subtitles to movie folder" with label #24115
#: system/settings/settings.xml
msgctxt "#24106"
#. Description of setting "Videos -> Subtitles -> Save subtitles to movie folder" with label #24115
#: system/settings/settings.xml
msgctxt "#24106"
-msgid "
If not saved to movie folder subtitles will be downloaded to custom subtitle folder
."
+msgid "
Specify where downloaded subtitles should be saved, the same location as the video or a custom location
."
msgstr ""
#: xbmc/dialogs/GUIDialogSubtitles.cpp
msgstr ""
#: xbmc/dialogs/GUIDialogSubtitles.cpp
@@
-12224,7
+12224,7
@@
msgstr ""
#: system/settings/settings.xml
msgctxt "#24115"
#: system/settings/settings.xml
msgctxt "#24115"
-msgid "S
ave subtitles to movie folder
"
+msgid "S
ubtitle storage location
"
msgstr ""
#: system/settings/settings.xml
msgstr ""
#: system/settings/settings.xml
@@
-12271,7
+12271,17
@@
msgctxt "#24123"
msgid "Pause the current video while searching for subtitles and resume once the subtitle is available."
msgstr ""
msgid "Pause the current video while searching for subtitles and resume once the subtitle is available."
msgstr ""
-#empty strings from id 24124 to 24999
+#: system/settings/settings.xml
+msgctxt "#24124"
+msgid "Next to the video"
+msgstr ""
+
+#: system/settings/settings.xml
+msgctxt "#24125"
+msgid "Custom location"
+msgstr ""
+
+#empty strings from id 24126 to 24999
msgctxt "#25000"
msgid "Notifications"
msgctxt "#25000"
msgid "Notifications"
diff --git
a/system/settings/settings.xml
b/system/settings/settings.xml
index
2eb2e64
..
616a9d0
100644
(file)
--- a/
system/settings/settings.xml
+++ b/
system/settings/settings.xml
@@
-926,12
+926,18
@@
</setting>
</group>
<group id="4">
</setting>
</group>
<group id="4">
- <setting id="subtitles.s
avetomoviefolder" type="boolean
" label="24115" help="24106">
+ <setting id="subtitles.s
toragemode" type="integer
" label="24115" help="24106">
<level>1</level>
<level>1</level>
- <default>true</default>
- <control type="toggle" />
+ <default>0</default>
+ <constraints>
+ <options>
+ <option label="24124">0</option> <!-- SUBTITLE_STORAGEMODE_MOVIEPATH -->
+ <option label="24125">1</option> <!-- SUBTITLE_STORAGEMODE_CUSTOMPATH -->
+ </options>
+ </constraints>
+ <control type="spinner" format="integer" />
</setting>
</setting>
- <setting id="subtitles.custompath" type="path" label="21366" help="36191">
+ <setting id="subtitles.custompath"
parent="subtitles.storagemode"
type="path" label="21366" help="36191">
<level>1</level>
<default></default>
<constraints>
<level>1</level>
<default></default>
<constraints>
@@
-941,6
+947,9
@@
<source>videos</source>
</sources>
</constraints>
<source>videos</source>
</sources>
</constraints>
+ <dependencies>
+ <dependency type="enable" setting="subtitles.storagemode" operator="is">1</dependency>
+ </dependencies>
<control type="button" format="path">
<heading>657</heading>
</control>
<control type="button" format="path">
<heading>657</heading>
</control>
diff --git
a/xbmc/video/dialogs/GUIDialogSubtitles.cpp
b/xbmc/video/dialogs/GUIDialogSubtitles.cpp
index
162c0a1
..
e072070
100644
(file)
--- a/
xbmc/video/dialogs/GUIDialogSubtitles.cpp
+++ b/
xbmc/video/dialogs/GUIDialogSubtitles.cpp
@@
-404,6
+404,8
@@
void CGUIDialogSubtitles::OnDownloadComplete(const CFileItemList *items, const s
return;
}
return;
}
+ SUBTITLE_STORAGEMODE storageMode = (SUBTITLE_STORAGEMODE) CSettings::Get().GetInt("subtitles.storagemode");
+
// Get (unstacked) path
const CStdString &strCurrentFile = g_application.CurrentUnstackedItem().GetPath();
// Get (unstacked) path
const CStdString &strCurrentFile = g_application.CurrentUnstackedItem().GetPath();
@@
-419,7
+421,7
@@
void CGUIDialogSubtitles::OnDownloadComplete(const CFileItemList *items, const s
strDownloadPath = subPath;
strFileName = URIUtils::GetFileName(strCurrentFile);
strDownloadPath = subPath;
strFileName = URIUtils::GetFileName(strCurrentFile);
- if (
CSettings::Get().GetBool("subtitles.savetomoviefolder")
&&
+ if (
storageMode == SUBTITLE_STORAGEMODE_MOVIEPATH
&&
CUtil::SupportsWriteFileOperations(strCurrentFilePath))
{
strDestPath = strCurrentFilePath;
CUtil::SupportsWriteFileOperations(strCurrentFilePath))
{
strDestPath = strCurrentFilePath;
diff --git
a/xbmc/video/dialogs/GUIDialogSubtitles.h
b/xbmc/video/dialogs/GUIDialogSubtitles.h
index
f72e9fd
..
614e31f
100644
(file)
--- a/
xbmc/video/dialogs/GUIDialogSubtitles.h
+++ b/
xbmc/video/dialogs/GUIDialogSubtitles.h
@@
-25,6
+25,12
@@
#include "threads/CriticalSection.h"
#include "utils/JobManager.h"
#include "threads/CriticalSection.h"
#include "utils/JobManager.h"
+enum SUBTITLE_STORAGEMODE
+{
+ SUBTITLE_STORAGEMODE_MOVIEPATH = 0,
+ SUBTITLE_STORAGEMODE_CUSTOMPATH
+};
+
class CFileItem;
class CFileItemList;
class CFileItem;
class CFileItemList;