diff options
author | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2017-12-22 23:55:04 +0100 |
---|---|---|
committer | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2017-12-23 16:24:06 +0100 |
commit | 72c707a0040daad9a39794a1695180e60288e1f9 (patch) | |
tree | a4bcdf8f1ae374934ed5e45c8e8d6af4ed6a2c95 | |
parent | e13685ae6fc5697b8b7b33a94d466ae36febc1b5 (diff) |
[PVR] Make shared channel selection optional.
-rw-r--r-- | addons/resource.language.en_gb/resources/strings.po | 11 | ||||
-rwxr-xr-x | system/settings/settings.xml | 5 | ||||
-rw-r--r-- | xbmc/pvr/PVRGUIActions.cpp | 9 | ||||
-rw-r--r-- | xbmc/settings/Settings.cpp | 1 | ||||
-rw-r--r-- | xbmc/settings/Settings.h | 1 |
5 files changed, 25 insertions, 2 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po index b016582687..f65ccbada8 100644 --- a/addons/resource.language.en_gb/resources/strings.po +++ b/addons/resource.language.en_gb/resources/strings.po @@ -10906,7 +10906,11 @@ msgctxt "#19268" msgid "Hide \"No information available\" labels" msgstr "" -#empty string with id 19269 +#. pvr settings "Preselect playing channel in lists" control label +#: system/settings/settings.xml +msgctxt "#19269" +msgid "Preselect playing channel in lists" +msgstr "" #. Label of the option to switch between a grouped recordings list and a non-grouped recordings list in pvr recordings window. #: addons/skin.estuary/xml/Includes_MediaMenu.xml @@ -18475,7 +18479,10 @@ msgctxt "#36213" msgid "Open the group manager, which allows modification of groups and their respective channels" msgstr "" -#empty string with id 36214 +#: system/settings/settings.xml +msgctxt "#36214" +msgid "Preselect the playing channel in windows and dialogs containing channel lists. If enabled and there is a playing channel, the playing channel will be selected when opening a window or dialog containing a channel list. If disabled, the channel previously selected in a window or dialog will be selected when opening a window containing a channel list. " +msgstr "" #. Description of setting with label #14110 "Long date format" #: system/settings/settings.xml diff --git a/system/settings/settings.xml b/system/settings/settings.xml index f4fbbbe3b0..4cfdaecc1f 100755 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -1275,6 +1275,11 @@ <section id="pvr" label="14204" help="36201"> <category id="pvrmanager" label="128" help="36202"> <group id="1" label="14301"> + <setting id="pvrmanager.preselectplayingchannel" type="boolean" label="19269" help="36214"> + <level>1</level> + <default>false</default> + <control type="toggle" /> + </setting> <setting id="pvrmanager.syncchannelgroups" type="boolean" label="19221" help="36204"> <level>1</level> <default>true</default> diff --git a/xbmc/pvr/PVRGUIActions.cpp b/xbmc/pvr/PVRGUIActions.cpp index e48ae805a3..c444e8c75f 100644 --- a/xbmc/pvr/PVRGUIActions.cpp +++ b/xbmc/pvr/PVRGUIActions.cpp @@ -154,6 +154,7 @@ namespace PVR : m_bChannelScanRunning(false), m_settings({ CSettings::SETTING_LOOKANDFEEL_STARTUPACTION, + CSettings::SETTING_PVRMANAGER_PRESELECTPLAYINGCHANNEL, CSettings::SETTING_PVRRECORD_INSTANTRECORDTIME, CSettings::SETTING_PVRRECORD_INSTANTRECORDACTION, CSettings::SETTING_PVRPLAYBACK_SWITCHTOFULLSCREEN, @@ -1805,6 +1806,14 @@ namespace PVR std::string CPVRGUIActions::GetSelectedItemPath(bool bRadio) const { + if (m_settings.GetBoolValue(CSettings::SETTING_PVRMANAGER_PRESELECTPLAYINGCHANNEL)) + { + // if preselect playing channel is activated, return the path of the playing channel, if any. + const CPVRChannelPtr playingChannel(CServiceBroker::GetPVRManager().GetPlayingChannel()); + if (playingChannel && playingChannel->IsRadio() == bRadio) + return playingChannel->Path(); + } + CSingleLock lock(m_critSection); return bRadio ? m_selectedItemPathRadio : m_selectedItemPathTV; } diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp index e760b9e61f..8b2c1cb56e 100644 --- a/xbmc/settings/Settings.cpp +++ b/xbmc/settings/Settings.cpp @@ -216,6 +216,7 @@ const std::string CSettings::SETTING_ACCESSIBILITY_SUBHEARING = "accessibility.s 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"; diff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h index c3decd38ec..6607bf6dc9 100644 --- a/xbmc/settings/Settings.h +++ b/xbmc/settings/Settings.h @@ -163,6 +163,7 @@ public: 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; |