mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Added IsUpdate() to the EPG handler interface
This commit is contained in:
		@@ -2467,6 +2467,7 @@ Ulf Kiener <webmaster@ulf-kiener.de>
 | 
			
		||||
J<EFBFBD>rg Wendel <vdr-ml@jwendel.de>
 | 
			
		||||
 for reporting that cPlugin::Active() was called too often
 | 
			
		||||
 for adding HandledExternally() to the EPG handler interface
 | 
			
		||||
 for adding IsUpdate() to the EPG handler interface
 | 
			
		||||
 | 
			
		||||
Peter Pinnau <vdr@unterbrecher.de>
 | 
			
		||||
 for reporting that 'uint32_t' requires including stdint.h in font.h on some systems
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								HISTORY
									
									
									
									
									
								
							@@ -7191,7 +7191,7 @@ Video Disk Recorder Revision History
 | 
			
		||||
  turn on adding the source character to channel names whenever they are displayed
 | 
			
		||||
  (suggested by Ludi Kaleni).
 | 
			
		||||
 | 
			
		||||
2012-08-21: Version 1.7.30
 | 
			
		||||
2012-08-25: Version 1.7.30
 | 
			
		||||
 | 
			
		||||
- Fixed sorting recordings in the top level video directory.
 | 
			
		||||
- Fixed handling control characters in SI data in case of UTF-8 encoded strings
 | 
			
		||||
@@ -7202,3 +7202,4 @@ Video Disk Recorder Revision History
 | 
			
		||||
  dot ('.') are now ignored and will be implicitly removed if the directory contains
 | 
			
		||||
  no other files. This fixes the leftover ".sort" files that were introduced in
 | 
			
		||||
  version 1.7.29.
 | 
			
		||||
- Added IsUpdate() to the EPG handler interface (thanks to J<>rg Wendel).
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								eit.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								eit.c
									
									
									
									
									
								
							@@ -8,7 +8,7 @@
 | 
			
		||||
 * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
 | 
			
		||||
 * Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: eit.c 2.20 2012/06/04 10:26:10 kls Exp $
 | 
			
		||||
 * $Id: eit.c 2.21 2012/08/25 11:13:00 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "eit.h"
 | 
			
		||||
@@ -74,6 +74,8 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo
 | 
			
		||||
      if (!pEvent || handledExternally) {
 | 
			
		||||
         if (OnlyRunningStatus)
 | 
			
		||||
            continue;
 | 
			
		||||
         if (handledExternally && !EpgHandlers.IsUpdate(SiEitEvent.getEventId(), StartTime, Tid, getVersionNumber()))
 | 
			
		||||
            continue;
 | 
			
		||||
         // If we don't have that event yet, we create a new one.
 | 
			
		||||
         // Otherwise we copy the information into the existing event anyway, because the data might have changed.
 | 
			
		||||
         pEvent = newEvent = new cEvent(SiEitEvent.getEventId());
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								epg.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								epg.c
									
									
									
									
									
								
							@@ -7,7 +7,7 @@
 | 
			
		||||
 * Original version (as used in VDR before 1.3.0) written by
 | 
			
		||||
 * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: epg.c 2.17 2012/06/04 10:26:10 kls Exp $
 | 
			
		||||
 * $Id: epg.c 2.18 2012/08/25 11:10:29 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "epg.h"
 | 
			
		||||
@@ -1340,6 +1340,15 @@ bool cEpgHandlers::HandledExternally(const cChannel *Channel)
 | 
			
		||||
  return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool cEpgHandlers::IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version)
 | 
			
		||||
{
 | 
			
		||||
  for (cEpgHandler *eh = First(); eh; eh = Next(eh)) {
 | 
			
		||||
      if (eh->IsUpdate(EventID, StartTime, TableID, Version))
 | 
			
		||||
         return true;
 | 
			
		||||
      }
 | 
			
		||||
  return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void cEpgHandlers::SetEventID(cEvent *Event, tEventID EventID)
 | 
			
		||||
{
 | 
			
		||||
  for (cEpgHandler *eh = First(); eh; eh = Next(eh)) {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								epg.h
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								epg.h
									
									
									
									
									
								
							@@ -7,7 +7,7 @@
 | 
			
		||||
 * Original version (as used in VDR before 1.3.0) written by
 | 
			
		||||
 * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: epg.h 2.13 2012/06/04 10:26:10 kls Exp $
 | 
			
		||||
 * $Id: epg.h 2.14 2012/08/25 11:15:18 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __EPG_H
 | 
			
		||||
@@ -250,6 +250,10 @@ public:
 | 
			
		||||
          ///< source. Incoming EIT data is processed as usual, but any new EPG event
 | 
			
		||||
          ///< will not be added to the respective schedule. It's up to the EPG
 | 
			
		||||
          ///< handler to take care of this.
 | 
			
		||||
  virtual bool IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version) { return false; }
 | 
			
		||||
          ///< VDR can't perform the update check (version, tid) for externally handled events,
 | 
			
		||||
          ///< therefore the EPG handlers have to take care of this. Otherwise the parsing of
 | 
			
		||||
          ///< non-updates will waste a lot of resources.
 | 
			
		||||
  virtual bool SetEventID(cEvent *Event, tEventID EventID) { return false; }
 | 
			
		||||
  virtual bool SetTitle(cEvent *Event, const char *Title) { return false; }
 | 
			
		||||
  virtual bool SetShortText(cEvent *Event, const char *ShortText) { return false; }
 | 
			
		||||
@@ -277,6 +281,7 @@ public:
 | 
			
		||||
  bool IgnoreChannel(const cChannel *Channel);
 | 
			
		||||
  bool HandleEitEvent(cSchedule *Schedule, const SI::EIT::Event *EitEvent, uchar TableID, uchar Version);
 | 
			
		||||
  bool HandledExternally(const cChannel *Channel);
 | 
			
		||||
  bool IsUpdate(tEventID EventID, time_t StartTime, uchar TableID, uchar Version);
 | 
			
		||||
  void SetEventID(cEvent *Event, tEventID EventID);
 | 
			
		||||
  void SetTitle(cEvent *Event, const char *Title);
 | 
			
		||||
  void SetShortText(cEvent *Event, const char *ShortText);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user