Skip to content
Permalink
Browse files

handle damaged recordings

  • Loading branch information...
janbar committed Nov 3, 2018
1 parent 441638a commit a5058f064d195b8c238097781061e7a30b8b707b
Showing with 16 additions and 1 deletion.
  1. +5 −0 src/cppmyth/MythProgramInfo.cpp
  2. +1 −0 src/cppmyth/MythProgramInfo.h
  3. +10 −1 src/pvrclient-mythtv.cpp
@@ -333,3 +333,8 @@ time_t MythProgramInfo::Airdate() const
{
return (m_proginfo ? m_proginfo->airdate : 0);
}

bool MythProgramInfo::IsDamaged() const
{
return ((m_proginfo && (m_proginfo->videoProps & 0x0020)) ? true : false);
}
@@ -83,6 +83,7 @@ class MythProgramInfo
uint16_t Season() const;
uint16_t Episode() const;
time_t Airdate() const;
bool IsDamaged() const;

private:
Myth::ProgramPtr m_proginfo;
@@ -914,8 +914,16 @@ PVR_ERROR PVRClientMythTV::GetRecordings(ADDON_HANDLE handle)

std::string id = it->second.UID();

std::string str; // a temporary string to build formating label
std::string title(it->second.Title());
if (it->second.IsDamaged())
{
str.assign(title);
title.assign("[COLOR yellow]").append(str).append("[/COLOR]");
}

PVR_STRCPY(tag.strRecordingId, id.c_str());
PVR_STRCPY(tag.strTitle, it->second.Title().c_str());
PVR_STRCPY(tag.strTitle, title.c_str());
PVR_STRCPY(tag.strEpisodeName, it->second.Subtitle().c_str());
tag.iSeriesNumber = it->second.Season();
tag.iEpisodeNumber = it->second.Episode();
@@ -963,6 +971,7 @@ PVR_ERROR PVRClientMythTV::GetRecordings(ADDON_HANDLE handle)
if (it->second.HasFanart())
strFanartPath = m_fileOps->GetArtworkPath(it->second, FileOps::FileTypeFanart);
}

PVR_STRCPY(tag.strIconPath, strIconPath.c_str());
PVR_STRCPY(tag.strThumbnailPath, strThumbnailPath.c_str());
PVR_STRCPY(tag.strFanartPath, strFanartPath.c_str());

0 comments on commit a5058f0

Please sign in to comment.
You can’t perform that action at this time.