aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Sommerfeld <kai.sommerfeld@gmx.com>2022-09-11 00:01:11 +0200
committerGitHub <noreply@github.com>2022-09-11 00:01:11 +0200
commit22c74348eb094ab0b90a077cc9c55774a9fd11cf (patch)
treef01af652dab541ce8ca95cba1dc1a8e5fbf3b407
parent5d68b61a631a96793f6c7085271f791ec76f6bb4 (diff)
parent904ef79bb2a63fdf610294592917ec94070310d2 (diff)
Merge pull request #21844 from ksooo/pvr-settings-browse-clients
[PVR][settings] Add settings action to open the Add-on browser displa…
-rw-r--r--addons/resource.language.en_gb/resources/strings.po14
-rwxr-xr-xsystem/settings/settings.xml4
-rw-r--r--xbmc/pvr/guilib/PVRGUIActionListener.cpp27
-rw-r--r--xbmc/settings/Settings.cpp1
-rw-r--r--xbmc/settings/Settings.h1
5 files changed, 33 insertions, 14 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index f25b2feb7f..034987ac90 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -11433,7 +11433,19 @@ msgctxt "#19344"
msgid "Do you want to set a reminder for the selected programme or to switch to the current programme?"
msgstr ""
-#empty strings from id 19345 to 19498
+#. settings label to open add-ons manager window with available PVR client add-ons
+#: system/settings/settings.xml
+msgctxt "#19345"
+msgid "PVR client add-ons"
+msgstr ""
+
+#. help text for setting to open add-ons manager window with available PVR client add-ons
+#: system/settings/settings.xml
+msgctxt "#19346"
+msgid "Display and manage available PVR client add-ons."
+msgstr ""
+
+#empty strings from id 19347 to 19498
#. label for epg genre value
#: xbmc/pvr/epg/Epg.cpp
diff --git a/system/settings/settings.xml b/system/settings/settings.xml
index 77e6b14aa8..ce0ca10299 100755
--- a/system/settings/settings.xml
+++ b/system/settings/settings.xml
@@ -1548,6 +1548,10 @@
<section id="pvr" label="14204" help="36201">
<category id="pvrmanager" label="128" help="36202">
<group id="1" label="19279">
+ <setting id="pvrmanager.addons" type="action" label="19345" help="19346">
+ <level>1</level>
+ <control type="button" format="action" />
+ </setting>
<setting id="pvrclient.menuhook" type="action" label="19280" help="36252">
<level>1</level>
<control type="button" format="action" />
diff --git a/xbmc/pvr/guilib/PVRGUIActionListener.cpp b/xbmc/pvr/guilib/PVRGUIActionListener.cpp
index 976cb31f1e..a595acc0fa 100644
--- a/xbmc/pvr/guilib/PVRGUIActionListener.cpp
+++ b/xbmc/pvr/guilib/PVRGUIActionListener.cpp
@@ -38,19 +38,14 @@ namespace PVR
CPVRGUIActionListener::CPVRGUIActionListener()
{
g_application.RegisterActionListener(this);
- CServiceBroker::GetSettingsComponent()->GetSettings()->RegisterCallback(this, {
- CSettings::SETTING_PVRPARENTAL_ENABLED,
- CSettings::SETTING_PVRMANAGER_RESETDB,
- CSettings::SETTING_EPG_RESETEPG,
- CSettings::SETTING_PVRMANAGER_CLIENTPRIORITIES,
- CSettings::SETTING_PVRMANAGER_CHANNELMANAGER,
- CSettings::SETTING_PVRMANAGER_GROUPMANAGER,
- CSettings::SETTING_PVRMANAGER_CHANNELSCAN,
- CSettings::SETTING_PVRMENU_SEARCHICONS,
- CSettings::SETTING_PVRCLIENT_MENUHOOK,
- CSettings::SETTING_EPG_PAST_DAYSTODISPLAY,
- CSettings::SETTING_EPG_FUTURE_DAYSTODISPLAY
- });
+ CServiceBroker::GetSettingsComponent()->GetSettings()->RegisterCallback(
+ this,
+ {CSettings::SETTING_PVRPARENTAL_ENABLED, CSettings::SETTING_PVRMANAGER_RESETDB,
+ CSettings::SETTING_EPG_RESETEPG, CSettings::SETTING_PVRMANAGER_ADDONS,
+ CSettings::SETTING_PVRMANAGER_CLIENTPRIORITIES, CSettings::SETTING_PVRMANAGER_CHANNELMANAGER,
+ CSettings::SETTING_PVRMANAGER_GROUPMANAGER, CSettings::SETTING_PVRMANAGER_CHANNELSCAN,
+ CSettings::SETTING_PVRMENU_SEARCHICONS, CSettings::SETTING_PVRCLIENT_MENUHOOK,
+ CSettings::SETTING_EPG_PAST_DAYSTODISPLAY, CSettings::SETTING_EPG_FUTURE_DAYSTODISPLAY});
}
CPVRGUIActionListener::~CPVRGUIActionListener()
@@ -367,6 +362,12 @@ void CPVRGUIActionListener::OnSettingAction(const std::shared_ptr<const CSetting
{
CServiceBroker::GetPVRManager().GUIActions()->ProcessSettingsMenuHooks();
}
+ else if (settingId == CSettings::SETTING_PVRMANAGER_ADDONS)
+ {
+ const std::vector<std::string> params{"addons://default_binary_addons_source/kodi.pvrclient",
+ "return"};
+ CServiceBroker::GetGUI()->GetWindowManager().ActivateWindow(WINDOW_ADDON_BROWSER, params);
+ }
}
} // namespace PVR
diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp
index 226fe8af06..d25a35be4a 100644
--- a/xbmc/settings/Settings.cpp
+++ b/xbmc/settings/Settings.cpp
@@ -211,6 +211,7 @@ 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_PVRMANAGER_ADDONS;
constexpr const char* CSettings::SETTING_PVRMENU_DISPLAYCHANNELINFO;
constexpr const char* CSettings::SETTING_PVRMENU_CLOSECHANNELOSDONSWITCH;
constexpr const char* CSettings::SETTING_PVRMENU_ICONPATH;
diff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h
index ddec9aeec7..5edf2ad3df 100644
--- a/xbmc/settings/Settings.h
+++ b/xbmc/settings/Settings.h
@@ -192,6 +192,7 @@ public:
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_PVRMANAGER_ADDONS = "pvrmanager.addons";
static constexpr auto SETTING_PVRMENU_DISPLAYCHANNELINFO = "pvrmenu.displaychannelinfo";
static constexpr auto SETTING_PVRMENU_CLOSECHANNELOSDONSWITCH = "pvrmenu.closechannelosdonswitch";
static constexpr auto SETTING_PVRMENU_ICONPATH = "pvrmenu.iconpath";