[pvr] remove unnecessary method PlayEpgItem() and use ActionPlayEpg()
authorxhaggi <sascha.woo@gmail.com>
Sat, 7 Dec 2013 13:46:31 +0000 (14:46 +0100)
committerxhaggi <sascha.woo@gmail.com>
Sun, 8 Dec 2013 18:28:41 +0000 (19:28 +0100)
instead

xbmc/pvr/windows/GUIWindowPVRGuide.cpp
xbmc/pvr/windows/GUIWindowPVRGuide.h

index 4e042cb..a800a80 100644 (file)
@@ -455,35 +455,13 @@ bool CGUIWindowPVRGuide::OnContextButtonInfo(CFileItem *item, CONTEXT_BUTTON but
   return bReturn;
 }
 
-bool CGUIWindowPVRGuide::PlayEpgItem(CFileItem *item)
-{
-  CPVRChannelPtr channel;
-  if (item && item->HasEPGInfoTag() && item->GetEPGInfoTag()->HasPVRChannel())
-    channel = item->GetEPGInfoTag()->ChannelTag();
-
-  if (!channel || !g_PVRManager.CheckParentalLock(*channel))
-    return false;
-
-  CLog::Log(LOGDEBUG, "play channel '%s'", channel->ChannelName().c_str());
-  CFileItem channelItem = CFileItem(*channel);
-  g_application.SwitchToFullScreen();
-  bool bReturn = PlayFile(&channelItem);
-  if (!bReturn)
-  {
-    CStdString msg = StringUtils::Format(g_localizeStrings.Get(19035).c_str(), channel->ChannelName().c_str()); // CHANNELNAME could not be played. Check the log for details.
-    CGUIDialogOK::ShowAndGetInput(19033, 0, msg, 0);
-  }
-
-  return bReturn;
-}
-
 bool CGUIWindowPVRGuide::OnContextButtonPlay(CFileItem *item, CONTEXT_BUTTON button)
 {
   bool bReturn = false;
 
   if (button == CONTEXT_BUTTON_PLAY_ITEM)
   {
-    bReturn = PlayEpgItem(item);
+    bReturn = ActionPlayEpg(item);
   }
 
   return bReturn;
index 4311468..988ef06 100644 (file)
@@ -64,7 +64,6 @@ namespace PVR
     bool IsSelectedList(CGUIMessage &message) const;
     bool OnClickButton(CGUIMessage &message);
     bool OnClickList(CGUIMessage &message);
-    bool PlayEpgItem(CFileItem *item);
 
     bool OnContextButtonBegin(CFileItem *item, CONTEXT_BUTTON button);
     bool OnContextButtonEnd(CFileItem *item, CONTEXT_BUTTON button);