Repository: xbmc/xbmc
File: xbmc/pvr/guilib/guiinfo/PVRGUIInfo.cpp (C++)

Code before:
          return true;
        }
        return false;
      case LISTITEM_TITLE:
        strValue = timer->Title();
        return true;
      case LISTITEM_COMMENT:
        strValue =
            timer->GetStatus(CServiceBroker::GetGUI()->GetWindowManager().GetActiveWindow() ==
                             WINDOW_RADIO_TIMER_RULES);
        return true;
      case LISTITEM_TIMERTYPE:
        strValue = timer->GetTypeAsString();
        return true;
      case LISTITEM_CHANNEL_NAME:
        strValue = timer->ChannelName();
        return true;
      case LISTITEM_CHANNEL_LOGO:
        strValue = timer->ChannelIcon();
        return true;
      case LISTITEM_PVR_CLIENT_NAME:
        strValue = CServiceBroker::GetPVRManager().GetClient(timer->ClientID())->GetClientName();
        return true;
      case LISTITEM_PVR_INSTANCE_NAME:
        strValue = CServiceBroker::GetPVRManager().GetClient(timer->ClientID())->GetInstanceName();
        return true;
      case LISTITEM_EPG_EVENT_TITLE:
      case LISTITEM_EPG_EVENT_ICON:
      case LISTITEM_GENRE:
      case LISTITEM_PLOT:
      case LISTITEM_PLOT_OUTLINE:
      case LISTITEM_ORIGINALTITLE:
      case LISTITEM_YEAR:
      case LISTITEM_SEASON:
      case LISTITEM_EPISODE:
      case LISTITEM_EPISODENAME:
      case LISTITEM_DIRECTOR:
      case LISTITEM_CHANNEL_NUMBER:
      case LISTITEM_PREMIERED:
      case LISTITEM_PARENTAL_RATING:
      case LISTITEM_PARENTAL_RATING_CODE:
      case LISTITEM_MPAA: // For compatibility with other skins.
      case LISTITEM_PARENTAL_RATING_ICON:
        break; // obtain value from channel/epg
      default:
        return false;
    }
  }

  const std::shared_ptr<const CPVRRecording> recording(item->GetPVRRecordingInfoTag());
  if (recording)

Review comment (suggestion):
As you introduced separate new fields in PVR_TIMER in the PVR add-on API for these values, it makes no sense to obtain them from the timer's channel/epg tag. Either you keep this implementation and remove the new fields in PVR_TIMER or you change the implementation here to actually use the new fields. I'd prefer keeping the new fields and fixing the implementation here.

Code after:
        return true;
      case LISTITEM_PVR_CLIENT_NAME:
        strValue = CServiceBroker::GetPVRManager().GetClient(timer->ClientID())->GetClientName();
        return true;
      case LISTITEM_PVR_INSTANCE_NAME:
        strValue = CServiceBroker::GetPVRManager().GetClient(timer->ClientID())->GetInstanceName();
        return true;
      case LISTITEM_EPG_EVENT_TITLE:
      case LISTITEM_EPG_EVENT_ICON:
      case LISTITEM_GENRE:
      case LISTITEM_PLOT:
      case LISTITEM_PLOT_OUTLINE:
      case LISTITEM_ORIGINALTITLE:
      case LISTITEM_YEAR:
      case LISTITEM_SEASON:
      case LISTITEM_EPISODE:
      case LISTITEM_EPISODENAME:
      case LISTITEM_DIRECTOR:
      case LISTITEM_CHANNEL_NUMBER:
      case LISTITEM_PREMIERED:
      case VIDEOPLAYER_PARENTAL_RATING:
      case LISTITEM_PARENTAL_RATING:
      case LISTITEM_PARENTAL_RATING_CODE:
      case LISTITEM_PARENTAL_RATING_ICON:
      case LISTITEM_PARENTAL_RATING_SOURCE:
        break; // obtain value from channel/epg
      default:
        return false;
    }
  }

  const std::shared_ptr<const CPVRRecording> recording(item->GetPVRRecordingInfoTag());
  if (recording)
  {
    // Note: CPVRRecoding is derived from CVideoInfoTag. All base class properties will be handled
    //       by CVideoGUIInfoProvider. Only properties introduced by CPVRRecording need to be handled here.
    switch (info.m_info)
    {
      case LISTITEM_DATE:
        strValue = GetAsLocalizedDateTimeString(recording->RecordingTimeAsLocalTime());
        return true;
      case LISTITEM_STARTDATE:
        strValue = GetAsLocalizedDateString(recording->RecordingTimeAsLocalTime(), true);
        return true;
      case VIDEOPLAYER_STARTTIME:
      case LISTITEM_STARTTIME:
        strValue = GetAsLocalizedTimeString(recording->RecordingTimeAsLocalTime());
        return true;
      case LISTITEM_ENDDATE:
        strValue = GetAsLocalizedDateString(recording->EndTimeAsLocalTime(), true);
        return true;