#! /bin/sh /usr/share/dpatch/dpatch-run ## 92_timeline-1.0.141-vdr-1.5.3.dpatch by Stone <syphyr@gmail.com> ## ## Thomas Günther <tom@toms-cafe.de> ## - Added compatibility to VDR < 1.5.3 ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Changes for VDR >= 1.5.3. @DPATCH@ --- timeline-1.0.141/checkerOsd.c +++ timeline-1.0.141/checkerOsd.c @@ -246,7 +246,11 @@ 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 @@ { 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 @@ } 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()