Skip to content

Commit

Permalink
Merge pull request #3888 from vkosh/epg-grid
Browse files Browse the repository at this point in the history
[pvr] show gaps on epg timeline grid
  • Loading branch information
Lars Op den Kamp committed Feb 1, 2014
2 parents 0b15afa + eb113c5 commit a4342cf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion xbmc/epg/Epg.cpp
Expand Up @@ -628,7 +628,7 @@ bool CEpg::FixOverlappingEvents(bool bUpdateDb /* = false */)
it->second->ClearTimer(); it->second->ClearTimer();
m_tags.erase(it++); m_tags.erase(it++);
} }
else if (previousTag->EndAsUTC() != currentTag->StartAsUTC()) else if (previousTag->EndAsUTC() > currentTag->StartAsUTC())
{ {
previousTag->SetEndFromUTC(currentTag->StartAsUTC()); previousTag->SetEndFromUTC(currentTag->StartAsUTC());
if (bUpdateDb) if (bUpdateDb)
Expand Down
21 changes: 12 additions & 9 deletions xbmc/epg/GUIEPGGridContainer.cpp
Expand Up @@ -962,22 +962,25 @@ void CGUIEPGGridContainer::UpdateItems()


for (int block = 0; block < m_blocks; block++) for (int block = 0; block < m_blocks; block++)
{ {
if (m_gridIndex[row][block].item != m_gridIndex[row][block+1].item) CGUIListItemPtr item = m_gridIndex[row][block].item;

if (item != m_gridIndex[row][block+1].item)
{ {
if (!m_gridIndex[row][block].item) if (!item)
{ {
CEpgInfoTag broadcast; CEpgInfoTag gapTag;
CFileItemPtr unknown(new CFileItem(broadcast)); CFileItemPtr gapItem(new CFileItem(gapTag));
for (int i = block ; i > block - itemSize; i--) for (int i = block ; i > block - itemSize; i--)
{ {
m_gridIndex[row][i].item = unknown; m_gridIndex[row][i].item = gapItem;
} }
} }
else
{
const CEpgInfoTag* tag = ((CFileItem *)item.get())->GetEPGInfoTag();
m_gridIndex[row][savedBlock].item->SetProperty("GenreType", tag->GenreType());
}


CGUIListItemPtr item = m_gridIndex[row][block].item;
CFileItem *fileItem = (CFileItem *)item.get();

m_gridIndex[row][savedBlock].item->SetProperty("GenreType", fileItem->GetEPGInfoTag()->GenreType());
if (m_orientation == VERTICAL) if (m_orientation == VERTICAL)
{ {
m_gridIndex[row][savedBlock].width = itemSize*m_blockSize; m_gridIndex[row][savedBlock].width = itemSize*m_blockSize;
Expand Down

0 comments on commit a4342cf

Please sign in to comment.