Skip to content

Commit

Permalink
Merge pull request #17488 from ronie/SE-special-epg
Browse files Browse the repository at this point in the history
[EPG] change season/episode infolabels for specials
  • Loading branch information
phunkyfish committed Mar 16, 2020
2 parents 88eaaa5 + c4e565c commit 365c4cd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion xbmc/pvr/epg/EpgInfoTag.cpp
Expand Up @@ -643,7 +643,7 @@ bool CPVREpgInfoTag::IsPlayable() const

bool CPVREpgInfoTag::IsSeries() const
{
if ((m_iFlags & EPG_TAG_FLAG_IS_SERIES) > 0 || SeriesNumber() > 0 || EpisodeNumber() > 0 || EpisodePart() > 0)
if ((m_iFlags & EPG_TAG_FLAG_IS_SERIES) > 0 || SeriesNumber() >= 0 || EpisodeNumber() >= 0 || EpisodePart() >= 0)
return true;
else
return false;
Expand Down
6 changes: 3 additions & 3 deletions xbmc/pvr/epg/EpgInfoTag.h
Expand Up @@ -442,9 +442,9 @@ namespace PVR
int m_iGenreSubType = 0; /*!< genre subtype */
int m_iParentalRating = 0; /*!< parental rating */
int m_iStarRating = 0; /*!< star rating */
int m_iSeriesNumber = 0; /*!< series number */
int m_iEpisodeNumber = 0; /*!< episode number */
int m_iEpisodePart = 0; /*!< episode part number */
int m_iSeriesNumber = -1; /*!< series number */
int m_iEpisodeNumber = -1; /*!< episode number */
int m_iEpisodePart = -1; /*!< episode part number */
unsigned int m_iUniqueBroadcastID = 0; /*!< unique broadcast ID */
std::string m_strTitle; /*!< title */
std::string m_strPlotOutline; /*!< plot outline */
Expand Down
9 changes: 3 additions & 6 deletions xbmc/pvr/guilib/guiinfo/PVRGUIInfo.cpp
Expand Up @@ -564,20 +564,17 @@ bool CPVRGUIInfo::GetListItemAndPlayerLabel(const CFileItem* item, const CGUIInf
return false;
case VIDEOPLAYER_SEASON:
case LISTITEM_SEASON:
if (epgTag->SeriesNumber() > 0)
if (epgTag->SeriesNumber() >= 0)
{
strValue = StringUtils::Format("%i", epgTag->SeriesNumber());
return true;
}
return false;
case VIDEOPLAYER_EPISODE:
case LISTITEM_EPISODE:
if (epgTag->EpisodeNumber() > 0)
if (epgTag->EpisodeNumber() >= 0)
{
if (epgTag->SeriesNumber() == 0) // prefix episode with 'S'
strValue = StringUtils::Format("S%i", epgTag->EpisodeNumber());
else
strValue = StringUtils::Format("%i", epgTag->EpisodeNumber());
strValue = StringUtils::Format("%i", epgTag->EpisodeNumber());
return true;
}
return false;
Expand Down

0 comments on commit 365c4cd

Please sign in to comment.