Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[pvr] display a message that you need a tuner, backend software and a…

… PVR add-on when no add-ons could be found
  • Loading branch information...
commit 82b8e1709893d600e4c8fa84f85786478892f932 1 parent ddd01d8
@opdenkamp authored
View
18 language/English/strings.po
@@ -7088,7 +7088,23 @@ msgctxt "#19270"
msgid "* All recordings"
msgstr ""
-#empty strings from id 19271 to 19499
+msgctxt "#19271"
+msgid "No PVR add-ons could be found"
+msgstr ""
+
+msgctxt "#19272"
+msgid "You need a tuner, backend software, and an"
+msgstr ""
+
+msgctxt "#19273"
+msgid "add-on for the backend to be able to use PVR."
+msgstr ""
+
+msgctxt "#19274"
+msgid "Please visit xbmc.org/PVR to learn more."
+msgstr ""
+
+#empty strings from id 19275 to 19499
msgctxt "#19499"
msgid "Other/Unknown"
View
17 xbmc/pvr/addons/PVRClients.cpp
@@ -52,7 +52,8 @@ CPVRClients::CPVRClients(void) :
m_playingClientId(-EINVAL),
m_bIsPlayingLiveTV(false),
m_bIsPlayingRecording(false),
- m_scanStart(0)
+ m_scanStart(0),
+ m_bNoAddonWarningDisplayed(false)
{
}
@@ -804,6 +805,9 @@ bool CPVRClients::UpdateAndInitialiseClients(bool bInitialiseAllClients /* = fal
map = m_addons;
}
+ if (map.size() == 0)
+ return false;
+
for (unsigned iClientPtr = 0; iClientPtr < map.size(); iClientPtr++)
{
const AddonPtr clientAddon = map.at(iClientPtr);
@@ -887,7 +891,7 @@ void CPVRClients::Process(void)
if (!bCheckedEnabledClientsOnStartup)
{
bCheckedEnabledClientsOnStartup = true;
- if (!HasEnabledClients())
+ if (!HasEnabledClients() && !m_bNoAddonWarningDisplayed)
ShowDialogNoClientsEnabled();
}
@@ -1024,6 +1028,15 @@ bool CPVRClients::UpdateAddons(void)
m_addons = addons;
}
+ if ((!bReturn || addons.size() == 0) && !m_bNoAddonWarningDisplayed)
+ {
+ // No PVR add-ons could be found
+ // You need a tuner, backend software, and an add-on for the backend to be able to use PVR.
+ //Please visit xbmc.org/PVR to learn more.
+ m_bNoAddonWarningDisplayed = true;
+ CGUIDialogOK::ShowAndGetInput(19271, 19272, 19273, 19274);
+ }
+
return bReturn;
}
View
1  xbmc/pvr/addons/PVRClients.h
@@ -613,6 +613,7 @@ namespace PVR
ADDON::VECADDONS m_addons;
PVR_CLIENTMAP m_clientMap; /*!< a map of all known clients */
STREAMPROPS m_streamProps; /*!< the current stream's properties */
+ bool m_bNoAddonWarningDisplayed; /*!< true when a warning was displayed that no add-ons were found, false otherwise */
CCriticalSection m_critSection;
};
}
Please sign in to comment.
Something went wrong with that request. Please try again.