aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorksooo <3226626+ksooo@users.noreply.github.com>2024-05-07 08:12:05 +0200
committerksooo <3226626+ksooo@users.noreply.github.com>2024-05-07 19:05:19 +0200
commit6f7adad18a5d841645bb97dd5a058fe6e6fc9781 (patch)
treec48d462f88dab46b3528fea25d35e34992f09d33
parent4b17fe69fc4b767d8979e7617dedd40675554a7d (diff)
[PVR] Rename CPVRClient::GetFriendlyName to CPVRClient::GetFullClientName to make purpose of the method more clear.
-rw-r--r--xbmc/pvr/PVRPlaybackState.cpp2
-rw-r--r--xbmc/pvr/addons/PVRClient.cpp8
-rw-r--r--xbmc/pvr/addons/PVRClient.h5
-rw-r--r--xbmc/pvr/addons/PVRClients.cpp2
-rw-r--r--xbmc/pvr/dialogs/GUIDialogPVRChannelManager.cpp2
-rw-r--r--xbmc/pvr/dialogs/GUIDialogPVRClientPriorities.cpp2
-rw-r--r--xbmc/pvr/dialogs/GUIDialogPVRGroupManager.cpp2
-rw-r--r--xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp2
-rw-r--r--xbmc/pvr/guilib/PVRGUIActionsChannels.cpp4
-rw-r--r--xbmc/pvr/guilib/PVRGUIActionsClients.cpp2
-rw-r--r--xbmc/pvr/guilib/PVRGUIActionsTimers.cpp2
-rw-r--r--xbmc/pvr/timers/PVRTimers.cpp2
-rw-r--r--xbmc/pvr/windows/GUIWindowPVRBase.cpp4
13 files changed, 20 insertions, 19 deletions
diff --git a/xbmc/pvr/PVRPlaybackState.cpp b/xbmc/pvr/PVRPlaybackState.cpp
index 34f0ff5b97..e29887ddce 100644
--- a/xbmc/pvr/PVRPlaybackState.cpp
+++ b/xbmc/pvr/PVRPlaybackState.cpp
@@ -222,7 +222,7 @@ void CPVRPlaybackState::OnPlaybackStarted(const CFileItem& item)
const std::shared_ptr<const CPVRClient> client =
CServiceBroker::GetPVRManager().GetClient(m_playingClientId);
if (client)
- m_strPlayingClientName = client->GetFriendlyName();
+ m_strPlayingClientName = client->GetFullClientName();
}
}
diff --git a/xbmc/pvr/addons/PVRClient.cpp b/xbmc/pvr/addons/PVRClient.cpp
index 98cfe8db2a..b48e287292 100644
--- a/xbmc/pvr/addons/PVRClient.cpp
+++ b/xbmc/pvr/addons/PVRClient.cpp
@@ -408,7 +408,7 @@ const std::string& CPVRClient::GetConnectionString() const
return m_strConnectionString;
}
-const std::string CPVRClient::GetFriendlyName() const
+std::string CPVRClient::GetFullClientName() const
{
if (Addon()->SupportsInstanceSettings())
@@ -1032,7 +1032,7 @@ PVR_ERROR CPVRClient::UpdateTimerTypes()
CLog::LogF(LOGWARNING,
"Add-on {} does not support timer types. It will work, but not benefit from "
"the timer features introduced with PVR Addon API 2.0.0",
- GetFriendlyName());
+ Name());
// Create standard timer types (mostly) matching the timer functionality available in Isengard.
// This is for migration only and does not make changes to the addons obsolete. Addons should
@@ -1859,7 +1859,7 @@ void CPVRClient::cb_recording_notification(void* kodiInstance,
}
const std::string strLine1 = StringUtils::Format(g_localizeStrings.Get(bOnOff ? 19197 : 19198),
- client->GetFriendlyName());
+ client->GetFullClientName());
std::string strLine2;
if (strName)
strLine2 = strName;
@@ -1872,7 +1872,7 @@ void CPVRClient::cb_recording_notification(void* kodiInstance,
auto eventLog = CServiceBroker::GetEventLog();
if (eventLog)
eventLog->Add(EventPtr(
- new CNotificationEvent(client->GetFriendlyName(), strLine1, client->Icon(), strLine2)));
+ new CNotificationEvent(client->GetFullClientName(), strLine1, client->Icon(), strLine2)));
CLog::LogFC(LOGDEBUG, LOGPVR, "Recording {} on client {}. name='{}' filename='{}'",
bOnOff ? "started" : "finished", client->GetID(), strName, strFileName);
diff --git a/xbmc/pvr/addons/PVRClient.h b/xbmc/pvr/addons/PVRClient.h
index 42f634a775..8c632a6d1c 100644
--- a/xbmc/pvr/addons/PVRClient.h
+++ b/xbmc/pvr/addons/PVRClient.h
@@ -164,10 +164,11 @@ public:
const std::string& GetConnectionString() const;
/*!
- * @brief A friendly name used to uniquely identify the addon instance
+ * @brief A name used to uniquely identify the client, inclusing addon name and instance
+ * name, if multiple instances are supported by the client implementation.
* @return string that can be used in log messages and the GUI.
*/
- const std::string GetFriendlyName() const;
+ std::string GetFullClientName() const;
/*!
* @brief The name used by the PVR client addon instance
diff --git a/xbmc/pvr/addons/PVRClients.cpp b/xbmc/pvr/addons/PVRClients.cpp
index b2261d376d..46cf2f510a 100644
--- a/xbmc/pvr/addons/PVRClients.cpp
+++ b/xbmc/pvr/addons/PVRClients.cpp
@@ -885,7 +885,7 @@ void CPVRClients::ConnectionStateChange(CPVRClient* client,
// Notify user.
CServiceBroker::GetJobManager()->AddJob(
- new CPVREventLogJob(bNotify, eLevel, client->GetFriendlyName(), strMsg, client->Icon()),
+ new CPVREventLogJob(bNotify, eLevel, client->GetFullClientName(), strMsg, client->Icon()),
nullptr);
}
diff --git a/xbmc/pvr/dialogs/GUIDialogPVRChannelManager.cpp b/xbmc/pvr/dialogs/GUIDialogPVRChannelManager.cpp
index efae8e7279..8bc352d0ff 100644
--- a/xbmc/pvr/dialogs/GUIDialogPVRChannelManager.cpp
+++ b/xbmc/pvr/dialogs/GUIDialogPVRChannelManager.cpp
@@ -840,7 +840,7 @@ void CGUIDialogPVRChannelManager::Update()
CServiceBroker::GetPVRManager().GetClient(*channelFile);
if (client)
{
- channelFile->SetProperty(PROPERTY_CLIENT_NAME, client->GetFriendlyName());
+ channelFile->SetProperty(PROPERTY_CLIENT_NAME, client->GetFullClientName());
channelFile->SetProperty(PROPERTY_CLIENT_SUPPORTS_SETTINGS,
client->GetClientCapabilities().SupportsChannelSettings());
}
diff --git a/xbmc/pvr/dialogs/GUIDialogPVRClientPriorities.cpp b/xbmc/pvr/dialogs/GUIDialogPVRClientPriorities.cpp
index ca83ba1298..5564552d19 100644
--- a/xbmc/pvr/dialogs/GUIDialogPVRClientPriorities.cpp
+++ b/xbmc/pvr/dialogs/GUIDialogPVRClientPriorities.cpp
@@ -43,7 +43,7 @@ std::string CGUIDialogPVRClientPriorities::GetSettingsLabel(
int iClientId = std::atoi(pSetting->GetId().c_str());
auto clientEntry = m_clients.find(iClientId);
if (clientEntry != m_clients.end())
- return clientEntry->second->GetFriendlyName();
+ return clientEntry->second->GetFullClientName();
CLog::LogF(LOGERROR, "Unable to obtain pvr client with id '{}'", iClientId);
return CGUIDialogSettingsManualBase::GetLocalizedString(13205); // Unknown
diff --git a/xbmc/pvr/dialogs/GUIDialogPVRGroupManager.cpp b/xbmc/pvr/dialogs/GUIDialogPVRGroupManager.cpp
index 1fa8cd5175..1a5f33644b 100644
--- a/xbmc/pvr/dialogs/GUIDialogPVRGroupManager.cpp
+++ b/xbmc/pvr/dialogs/GUIDialogPVRGroupManager.cpp
@@ -585,7 +585,7 @@ void CGUIDialogPVRGroupManager::Update()
const std::shared_ptr<const CPVRClient> client =
CServiceBroker::GetPVRManager().GetClient(*group);
if (client)
- group->SetProperty(PROPERTY_CLIENT_NAME, client->GetFriendlyName());
+ group->SetProperty(PROPERTY_CLIENT_NAME, client->GetFullClientName());
}
// Load group thumbnails
diff --git a/xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp b/xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp
index f6a3a2c651..ad32612384 100644
--- a/xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp
+++ b/xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp
@@ -935,7 +935,7 @@ void CGUIDialogPVRTimerSettings::TypesFiller(const SettingConstPtr& setting,
const auto client = clients->GetCreatedClient(typeEntry.second->GetClientId());
if (client)
- clientName = client->GetFriendlyName();
+ clientName = client->GetFullClientName();
list.emplace_back(typeEntry.second->GetDescription(), clientName, typeEntry.first,
typeEntry.second->IsReminder() ? reminderTimerProps : recordingTimerProps);
diff --git a/xbmc/pvr/guilib/PVRGUIActionsChannels.cpp b/xbmc/pvr/guilib/PVRGUIActionsChannels.cpp
index fb61fc2e6f..f5b9831c8f 100644
--- a/xbmc/pvr/guilib/PVRGUIActionsChannels.cpp
+++ b/xbmc/pvr/guilib/PVRGUIActionsChannels.cpp
@@ -282,7 +282,7 @@ bool CPVRGUIActionsChannels::StartChannelScan(int clientId)
pDialog->SetHeading(CVariant{19119}); // "On which backend do you want to search?"
for (const auto& client : possibleScanClients)
- pDialog->Add(client->GetFriendlyName());
+ pDialog->Add(client->GetFullClientName());
pDialog->Open();
@@ -307,7 +307,7 @@ bool CPVRGUIActionsChannels::StartChannelScan(int clientId)
/* start the channel scan */
CLog::LogFC(LOGDEBUG, LOGPVR, "Starting to scan for channels on client {}",
- scanClient->GetFriendlyName());
+ scanClient->GetFullClientName());
auto start = std::chrono::steady_clock::now();
/* do the scan */
diff --git a/xbmc/pvr/guilib/PVRGUIActionsClients.cpp b/xbmc/pvr/guilib/PVRGUIActionsClients.cpp
index b9c598c794..191be4be6e 100644
--- a/xbmc/pvr/guilib/PVRGUIActionsClients.cpp
+++ b/xbmc/pvr/guilib/PVRGUIActionsClients.cpp
@@ -73,7 +73,7 @@ bool CPVRGUIActionsClients::ProcessSettingsMenuHooks()
if (clients.size() == 1)
pDialog->Add(hook.second.GetLabel());
else
- pDialog->Add(hook.first->GetFriendlyName() + ": " + hook.second.GetLabel());
+ pDialog->Add(hook.first->GetFullClientName() + ": " + hook.second.GetLabel());
}
pDialog->Open();
diff --git a/xbmc/pvr/guilib/PVRGUIActionsTimers.cpp b/xbmc/pvr/guilib/PVRGUIActionsTimers.cpp
index e515a9dd00..fd93a312d8 100644
--- a/xbmc/pvr/guilib/PVRGUIActionsTimers.cpp
+++ b/xbmc/pvr/guilib/PVRGUIActionsTimers.cpp
@@ -831,7 +831,7 @@ void AddEventLogEntry(const std::shared_ptr<const CPVRTimerInfoTag>& timer, int
CServiceBroker::GetPVRManager().GetClient(timer->GetTimerType()->GetClientId());
if (client)
{
- name = client->GetFriendlyName();
+ name = client->GetFullClientName();
icon = client->Icon();
}
else
diff --git a/xbmc/pvr/timers/PVRTimers.cpp b/xbmc/pvr/timers/PVRTimers.cpp
index 5b899d21b6..fa3df8888f 100644
--- a/xbmc/pvr/timers/PVRTimers.cpp
+++ b/xbmc/pvr/timers/PVRTimers.cpp
@@ -391,7 +391,7 @@ bool CPVRTimers::UpdateEntries(const CPVRTimersContainer& timers,
{
job->AddEvent(m_settings.GetBoolValue(CSettings::SETTING_PVRRECORD_TIMERNOTIFICATIONS),
EventLevel::Information, // info, no error
- client->GetFriendlyName(), entry.second, client->Icon());
+ client->GetFullClientName(), entry.second, client->Icon());
}
}
diff --git a/xbmc/pvr/windows/GUIWindowPVRBase.cpp b/xbmc/pvr/windows/GUIWindowPVRBase.cpp
index ce891a80f7..c6ef99abce 100644
--- a/xbmc/pvr/windows/GUIWindowPVRBase.cpp
+++ b/xbmc/pvr/windows/GUIWindowPVRBase.cpp
@@ -423,7 +423,7 @@ bool CGUIWindowPVRBase::OpenChannelGroupSelectionDialog()
auto client = pvrMgr.GetClient(channelGroup->GetClientID());
if (client)
- selectedClient = client->GetFriendlyName();
+ selectedClient = client->GetFullClientName();
}
CPVRThumbLoader loader;
@@ -433,7 +433,7 @@ bool CGUIWindowPVRBase::OpenChannelGroupSelectionDialog()
// set client name as label2
const std::shared_ptr<const CPVRClient> client = pvrMgr.GetClient(*group);
if (client)
- group->SetLabel2(client->GetFriendlyName());
+ group->SetLabel2(client->GetFullClientName());
// set thumbnail
loader.LoadItem(group.get());