Skip to content

Commit

Permalink
Append subtitle (with episode name) to title for epg and recordings.
Browse files Browse the repository at this point in the history
  • Loading branch information
fetzerch authored and tsp committed Dec 21, 2011
1 parent db2a6e8 commit 6ff36ce
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
11 changes: 10 additions & 1 deletion xbmc/pvrclients/mythtv-cmyth/cppmyth/MythProgramInfo.cpp
Expand Up @@ -38,6 +38,15 @@ MythProgramInfo::MythProgramInfo(cmyth_proginfo_t cmyth_proginfo)
return retval;
}

CStdString MythProgramInfo::Subtitle()
{
CStdString retval;
char* subtitle=CMYTH->ProginfoSubtitle(*m_proginfo_t);
retval=subtitle;
CMYTH->RefRelease(subtitle);
return retval;
}

CStdString MythProgramInfo::Path()
{
CStdString retval;
Expand Down Expand Up @@ -151,4 +160,4 @@ MythProgramInfo::MythProgramInfo(cmyth_proginfo_t cmyth_proginfo)
if(m_proginfo_t==NULL)
return true;
return *m_proginfo_t==NULL;
}
}
3 changes: 2 additions & 1 deletion xbmc/pvrclients/mythtv-cmyth/cppmyth/MythProgramInfo.h
Expand Up @@ -16,6 +16,7 @@ class MythProgramInfo
MythProgramInfo(cmyth_proginfo_t cmyth_proginfo);
CStdString ProgramID();
CStdString Title();
CStdString Subtitle();
CStdString Path();
CStdString Description();
CStdString ChannelName();
Expand All @@ -33,4 +34,4 @@ class MythProgramInfo
bool IsNull();
private:
boost::shared_ptr< MythPointer< cmyth_proginfo_t > > m_proginfo_t;
};
};
11 changes: 9 additions & 2 deletions xbmc/pvrclients/mythtv-cmyth/pvrclient-mythtv.cpp
Expand Up @@ -325,7 +325,11 @@ PVR_ERROR PVRClientMythTV::GetEPGForChannel(PVR_HANDLE handle, const PVR_CHANNEL
tag.endTime=it->endtime;
tag.iChannelNumber=it->channum;
tag.startTime=it->starttime;
tag.strTitle=it->title;
CStdString title=it->title;
CStdString subtitle=it->subtitle;
if (!subtitle.IsEmpty())
title+=": " + subtitle;
tag.strTitle=title;
tag.strPlot= it->description;
/*unsigned int seriesid=atoi(it->seriesid);
if(seriesid!=0)
Expand Down Expand Up @@ -423,6 +427,9 @@ PVR_ERROR PVRClientMythTV::GetRecordings(PVR_HANDLE handle)
CStdString plot=it->second.Description();
CStdString path=it->second.Path();
CStdString title=it->second.Title();
CStdString subtitle=it->second.Subtitle();
if (!subtitle.IsEmpty())
title+=": " + subtitle;

tag.strChannelName=chanName;
tag.strPlot=plot;
Expand Down Expand Up @@ -1069,4 +1076,4 @@ PVR_ERROR PVRClientMythTV::CallMenuHook(const PVR_MENUHOOK &menuhook)
wnd.Open();
}
return PVR_ERROR_NO_ERROR;
}
}

0 comments on commit 6ff36ce

Please sign in to comment.