Skip to content
This repository
Browse code

Merge pull request #3888 from vkosh/epg-grid

[pvr] show gaps on epg timeline grid
  • Loading branch information...
commit a4342cf0092a6036309e59071e08789a5adcd625 2 parents 0b15afa + eb113c5
Lars Op den Kamp opdenkamp authored

Showing 2 changed files with 13 additions and 10 deletions. Show diff stats Hide diff stats

  1. +1 1  xbmc/epg/Epg.cpp
  2. +12 9 xbmc/epg/GUIEPGGridContainer.cpp
2  xbmc/epg/Epg.cpp
@@ -628,7 +628,7 @@ bool CEpg::FixOverlappingEvents(bool bUpdateDb /* = false */)
628 628 it->second->ClearTimer();
629 629 m_tags.erase(it++);
630 630 }
631   - else if (previousTag->EndAsUTC() != currentTag->StartAsUTC())
  631 + else if (previousTag->EndAsUTC() > currentTag->StartAsUTC())
632 632 {
633 633 previousTag->SetEndFromUTC(currentTag->StartAsUTC());
634 634 if (bUpdateDb)
21 xbmc/epg/GUIEPGGridContainer.cpp
@@ -962,22 +962,25 @@ void CGUIEPGGridContainer::UpdateItems()
962 962
963 963 for (int block = 0; block < m_blocks; block++)
964 964 {
965   - if (m_gridIndex[row][block].item != m_gridIndex[row][block+1].item)
  965 + CGUIListItemPtr item = m_gridIndex[row][block].item;
  966 +
  967 + if (item != m_gridIndex[row][block+1].item)
966 968 {
967   - if (!m_gridIndex[row][block].item)
  969 + if (!item)
968 970 {
969   - CEpgInfoTag broadcast;
970   - CFileItemPtr unknown(new CFileItem(broadcast));
  971 + CEpgInfoTag gapTag;
  972 + CFileItemPtr gapItem(new CFileItem(gapTag));
971 973 for (int i = block ; i > block - itemSize; i--)
972 974 {
973   - m_gridIndex[row][i].item = unknown;
  975 + m_gridIndex[row][i].item = gapItem;
974 976 }
975 977 }
  978 + else
  979 + {
  980 + const CEpgInfoTag* tag = ((CFileItem *)item.get())->GetEPGInfoTag();
  981 + m_gridIndex[row][savedBlock].item->SetProperty("GenreType", tag->GenreType());
  982 + }
976 983
977   - CGUIListItemPtr item = m_gridIndex[row][block].item;
978   - CFileItem *fileItem = (CFileItem *)item.get();
979   -
980   - m_gridIndex[row][savedBlock].item->SetProperty("GenreType", fileItem->GetEPGInfoTag()->GenreType());
981 984 if (m_orientation == VERTICAL)
982 985 {
983 986 m_gridIndex[row][savedBlock].width = itemSize*m_blockSize;

0 comments on commit a4342cf

Please sign in to comment.
Something went wrong with that request. Please try again.