You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-plugins/vdr-timeline/files/vdr-timeline-1.0.141_vdr-1....

68 lines
4.3 KiB

http://www.vdr-portal.de/board/thread.php?postid=565546#post565546
Joerg Bornkessel <hd_brummy@gentoo.org> 10 May 2007
Matthias Schwarzott <zzam@gentoo.org> 24 Jun 2007
Index: timeline-1.0.141/checkerOsd.c
===================================================================
--- timeline-1.0.141.orig/checkerOsd.c
+++ timeline-1.0.141/checkerOsd.c
@@ -246,7 +246,11 @@ void checkerOsd::genLines(int day,time_t
localtime_r(&start1t,&day1);
sprintf(line1,"%s %04d-%02d-%02d (%s):",tr("Conflict on"),day1.tm_year+1900,day1.tm_mon+1,day1.tm_mday,tr("same input device"));
sprintf(line2,"%02d:%02d-%02d:%02d, (P%d) %s: %s",ct1->Start()/100,ct1->Start()%100,ct1->Stop()/100,ct1->Stop()%100,ct1->Priority(),ch1->Name(),ct1->File());
+#if APIVERSNUM >= 10503
+ sprintf(line3,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct2->Start()/100,ct2->Start()%100,ct2->Stop()/100,ct2->Stop()%100,(const char *)ct2->PrintDay(ct2->Day(),ct2->WeekDays(),false),ct2->Priority(),ch2->Name(),ct2->File());
+#else
sprintf(line3,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct2->Start()/100,ct2->Start()%100,ct2->Stop()/100,ct2->Stop()%100,(const char *)ct2->PrintDay(ct2->Day(),ct2->WeekDays()),ct2->Priority(),ch2->Name(),ct2->File());
+#endif
}
}
else if (!ct1->IsSingleEvent() && ct2->IsSingleEvent())
@@ -276,7 +280,11 @@ void checkerOsd::genLines(int day,time_t
{
localtime_r(&start1t,&day1);
sprintf(line1,"%s %04d-%02d-%02d (%s):",tr("Conflict on"),day1.tm_year+1900,day1.tm_mon+1,day1.tm_mday,tr("same input device"));
+#if APIVERSNUM >= 10503
+ sprintf(line2,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct1->Start()/100,ct1->Start()%100,ct1->Stop()/100,ct1->Stop()%100,(const char *)ct1->PrintDay(ct1->Day(),ct1->WeekDays(),false),ct1->Priority(),ch1->Name(),ct1->File());
+#else
sprintf(line2,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct1->Start()/100,ct1->Start()%100,ct1->Stop()/100,ct1->Stop()%100,(const char *)ct1->PrintDay(ct1->Day(),ct1->WeekDays()),ct1->Priority(),ch1->Name(),ct1->File());
+#endif
sprintf(line3,"%02d:%02d-%02d:%02d, (P%d) %s: %s",ct2->Start()/100,ct2->Start()%100,ct2->Stop()/100,ct2->Stop()%100,ct2->Priority(),ch2->Name(),ct2->File());
}
}
@@ -313,9 +321,15 @@ void checkerOsd::genLines(int day,time_t
}
if (hasmatched)
{
+#if APIVERSNUM >= 10503
+ sprintf(line1,"%s %s (%s):",tr("Repeating conflict on"),(const char *)ct1->PrintDay(0,mdays,false),tr("same input device"));
+ sprintf(line2,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct1->Start()/100,ct1->Start()%100,ct1->Stop()/100,ct1->Stop()%100,(const char *)ct1->PrintDay(ct1->Day(),ct1->WeekDays(),false),ct1->Priority(),ch1->Name(),ct1->File());
+ sprintf(line3,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct2->Start()/100,ct2->Start()%100,ct2->Stop()/100,ct2->Stop()%100,(const char *)ct2->PrintDay(ct2->Day(),ct2->WeekDays(),false),ct2->Priority(),ch2->Name(),ct2->File());
+#else
sprintf(line1,"%s %s (%s):",tr("Repeating conflict on"),(const char *)ct1->PrintDay(0,mdays),tr("same input device"));
sprintf(line2,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct1->Start()/100,ct1->Start()%100,ct1->Stop()/100,ct1->Stop()%100,(const char *)ct1->PrintDay(ct1->Day(),ct1->WeekDays()),ct1->Priority(),ch1->Name(),ct1->File());
sprintf(line3,"%02d:%02d-%02d:%02d (%s), (P%d) %s: %s",ct2->Start()/100,ct2->Start()%100,ct2->Stop()/100,ct2->Stop()%100,(const char *)ct2->PrintDay(ct2->Day(),ct2->WeekDays()),ct2->Priority(),ch2->Name(),ct2->File());
+#endif
}
}
else // ct1->IsSingleEvent() && ct2->IsSingleEvent()
@@ -338,9 +352,15 @@ void checkerOsd::genLines(int day,time_t
if (ch1->Frequency()!=ch2->Frequency())
{ // verschiedene Kan<61>le, genug Devices?
bool nofree=true;
-
+
+#if APIVERSNUM >= 10500
+ cDevice *cd1=cDevice::GetDevice(ch1,-1,false);
+ cDevice *cd2=cDevice::GetDevice(ch2,-1,false);
+#else
cDevice *cd1=cDevice::GetDevice(ch1);
- cDevice *cd2=cDevice::GetDevice(ch2),*cdt;
+ cDevice *cd2=cDevice::GetDevice(ch2);
+#endif
+ cDevice *cdt;
if (cd1->DeviceNumber()!=cd2->DeviceNumber())
{ // Sonderfall: ch2 kann gar nicht auf Device von ch1 empfangen werden
nofree=false;