Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MySQL wrapper compatibility fixes. Default isUserSetIcon to true.

  • Loading branch information...
commit fea9c0ef09582af9dd77d7f476ad0a77a9c43b24 1 parent 2d460fc
@mikrohard authored
View
6 xbmc/pvr/PVRDatabase.cpp
@@ -257,7 +257,7 @@ bool CPVRDatabase::UpdateOldVersion(int iVersion)
}
}
if (iVersion < 20)
- m_pDS->exec("ALTER TABLE channels ADD bIsUserSetIcon bool;");
+ m_pDS->exec("ALTER TABLE channels ADD bIsUserSetIcon bool");
}
}
catch (...)
@@ -321,7 +321,7 @@ int CPVRDatabase::Persist(const CPVRChannel &channel, bool bQueueWrite /* = fals
"iUniqueId, bIsRadio, bIsHidden, bIsUserSetIcon, "
"sIconPath, sChannelName, bIsVirtual, bEPGEnabled, sEPGScraper, iLastWatched, iClientId, "
"iClientChannelNumber, sInputFormat, sStreamURL, iEncryptionSystem, idEpg) "
- "VALUES (%i, %i, %i, %i, '%s', '%s', %i, %i, '%s', %u, %i, %i, '%s', '%s', %i, %i);",
+ "VALUES (%i, %i, %i, %i, '%s', '%s', %i, %i, '%s', %u, %i, %i, '%s', '%s', %i, %i)",
channel.UniqueID(), (channel.IsRadio() ? 1 :0), (channel.IsHidden() ? 1 : 0), (channel.IsUserSetIcon() ? 1 : 0),
channel.IconPath().c_str(), channel.ChannelName().c_str(), (channel.IsVirtual() ? 1 : 0), (channel.EPGEnabled() ? 1 : 0), channel.EPGScraper().c_str(), channel.LastWatched(), channel.ClientID(),
channel.ClientChannelNumber(), channel.InputFormat().c_str(), channel.StreamURL().c_str(), channel.EncryptionSystem(),
@@ -334,7 +334,7 @@ int CPVRDatabase::Persist(const CPVRChannel &channel, bool bQueueWrite /* = fals
"iUniqueId, bIsRadio, bIsHidden, bIsUserSetIcon, "
"sIconPath, sChannelName, bIsVirtual, bEPGEnabled, sEPGScraper, iLastWatched, iClientId, "
"iClientChannelNumber, sInputFormat, sStreamURL, iEncryptionSystem, idChannel, idEpg) "
- "VALUES (%i, %i, %i, %i, '%s', '%s', %i, %i, '%s', %u, %i, %i, '%s', '%s', %i, %i, %i);",
+ "VALUES (%i, %i, %i, %i, '%s', '%s', %i, %i, '%s', %u, %i, %i, '%s', '%s', %i, %i, %i)",
channel.UniqueID(), (channel.IsRadio() ? 1 :0), (channel.IsHidden() ? 1 : 0), (channel.IsUserSetIcon() ? 1 : 0),
channel.IconPath().c_str(), channel.ChannelName().c_str(), (channel.IsVirtual() ? 1 : 0), (channel.EPGEnabled() ? 1 : 0), channel.EPGScraper().c_str(), channel.LastWatched(), channel.ClientID(),
channel.ClientChannelNumber(), channel.InputFormat().c_str(), channel.StreamURL().c_str(), channel.EncryptionSystem(), channel.ChannelID(),
View
6 xbmc/pvr/channels/PVRChannel.cpp
@@ -196,7 +196,7 @@ bool CPVRChannel::UpdateFromClient(const CPVRChannel &channel)
if (m_strChannelName.IsEmpty())
SetChannelName(channel.ClientChannelName());
if (m_strIconPath.IsEmpty()||(!m_strIconPath.Equals(channel.IconPath()) && !IsUserSetIcon()))
- SetIconPath(channel.IconPath());
+ SetIconPath(channel.IconPath(), false, false);
return m_bChanged;
}
@@ -284,7 +284,7 @@ bool CPVRChannel::IsRecording(void) const
return g_PVRTimers->IsRecordingOnChannel(*this);
}
-bool CPVRChannel::SetIconPath(const CStdString &strIconPath, bool bSaveInDb /* = false */, bool bIsUserSetIcon /* = false */)
+bool CPVRChannel::SetIconPath(const CStdString &strIconPath, bool bSaveInDb /* = false */, bool bIsUserSetIcon /* = true */)
{
bool bReturn(true); // different from the behaviour of the rest of this class
CSingleLock lock(m_critSection);
@@ -300,7 +300,7 @@ bool CPVRChannel::SetIconPath(const CStdString &strIconPath, bool bSaveInDb /* =
SetChanged();
m_bChanged = true;
- /* did the user change the icon? */
+ /* did the user change the icon? */
if (bIsUserSetIcon) {
if (!m_strIconPath.IsEmpty()) {
m_bIsUserSetIcon = true;
View
2  xbmc/pvr/channels/PVRChannel.h
@@ -194,7 +194,7 @@ namespace PVR
* @param bIsUserSetIcon true if user changed the icon via GUI, false otherwise.
* @return True if the something changed, false otherwise.
*/
- bool SetIconPath(const CStdString &strIconPath, bool bSaveInDb = false, bool bIsUserSetIcon = false);
+ bool SetIconPath(const CStdString &strIconPath, bool bSaveInDb = false, bool bIsUserSetIcon = true);
/*!
* @brief The name for this channel used by XBMC.
View
2  xbmc/pvr/windows/GUIWindowPVRChannels.cpp
@@ -448,7 +448,7 @@ bool CGUIWindowPVRChannels::OnContextButtonSetThumb(CFileItem *item, CONTEXT_BUT
if (strThumb == "thumb://None")
strThumb = "";
- channel->SetIconPath(strThumb, true, true);
+ channel->SetIconPath(strThumb, true);
UpdateData();
}
Please sign in to comment.
Something went wrong with that request. Please try again.