[pvr] refactor enum ChannelStartLast to reflect the setting
authorxhaggi <sascha.woo@gmail.com>
Mon, 30 Jun 2014 13:10:27 +0000 (15:10 +0200)
committerxhaggi <sascha.woo@gmail.com>
Mon, 30 Jun 2014 14:04:13 +0000 (16:04 +0200)
system/settings/settings.xml
xbmc/pvr/PVRManager.cpp
xbmc/pvr/PVRManager.h

index 80fa769..31a2a51 100644 (file)
         </setting>
         <setting id="pvrplayback.startlast" type="integer" label="19189" help="36228">
           <level>1</level>
-          <default>0</default> <!-- START_LAST_CHANNEL_OFF -->
+          <default>0</default> <!-- CONTINUE_LAST_CHANNEL_OFF -->
           <constraints>
             <options>
-              <option label="106">0</option>   <!-- START_LAST_CHANNEL_OFF -->
-              <option label="19190">1</option> <!-- START_LAST_CHANNEL_IN_BACKGROUND -->
-              <option label="19288">2</option> <!-- START_LAST_CHANNEL_IN_FOREGROUND -->
+              <option label="106">0</option>   <!-- CONTINUE_LAST_CHANNEL_OFF -->
+              <option label="19190">1</option> <!-- CONTINUE_LAST_CHANNEL_IN_BACKGROUND -->
+              <option label="19288">2</option> <!-- CONTINUE_LAST_CHANNEL_IN_FOREGROUND -->
             </options>
           </constraints>
           <control type="spinner" format="string" />
index ecd8be7..b03bb61 100644 (file)
@@ -661,7 +661,7 @@ bool CPVRManager::ChannelUpDown(unsigned int *iNewChannelNumber, bool bPreview,
 
 bool CPVRManager::ContinueLastChannel(void)
 {
-  if (CSettings::Get().GetInt("pvrplayback.startlast") == START_LAST_CHANNEL_OFF)
+  if (CSettings::Get().GetInt("pvrplayback.startlast") == CONTINUE_LAST_CHANNEL_OFF)
     return false;
 
   CFileItemPtr channel = m_channelGroups->GetLastPlayedChannel();
@@ -669,7 +669,7 @@ bool CPVRManager::ContinueLastChannel(void)
   {
     CLog::Log(LOGNOTICE, "PVRManager - %s - continue playback on channel '%s'", __FUNCTION__, channel->GetPVRChannelInfoTag()->ChannelName().c_str());
     SetPlayingGroup(m_channelGroups->GetLastPlayedGroup());
-    StartPlayback(channel->GetPVRChannelInfoTag(), (CSettings::Get().GetInt("pvrplayback.startlast") == START_LAST_CHANNEL_IN_BACKGROUND));
+    StartPlayback(channel->GetPVRChannelInfoTag(), (CSettings::Get().GetInt("pvrplayback.startlast") == CONTINUE_LAST_CHANNEL_IN_BACKGROUND));
     return true;
   }
 
index 3b9baaf..0d47888 100644 (file)
@@ -70,11 +70,11 @@ namespace PVR
     PlaybackTypeRadio
   };
 
-  enum ChannelStartLast
+  enum ContinueLastChannelOnStartup
   {
-    START_LAST_CHANNEL_OFF  = 0,
-    START_LAST_CHANNEL_IN_BACKGROUND,
-    START_LAST_CHANNEL_IN_FOREGROUND
+    CONTINUE_LAST_CHANNEL_OFF  = 0,
+    CONTINUE_LAST_CHANNEL_IN_BACKGROUND,
+    CONTINUE_LAST_CHANNEL_IN_FOREGROUND
   };
 
   #define g_PVRManager       CPVRManager::Get()