Ticket #4879: myth_schedule_slack.diff
File myth_schedule_slack.diff, 1.5 KB (added by , 16 years ago) |
---|
-
scheduler.cpp
2376 2376 << "/" << whereclauses[clause] << endl; 2377 2377 } 2378 2378 2379 int startTimeSlack = gContext->GetNumSetting( "StartTimeSlack", 0); 2380 2379 2381 for (clause = 0; clause < fromclauses.count(); clause++) 2380 2382 { 2381 2383 QString query = QString( … … 2400 2402 " AND " 2401 2403 " ((RECTABLE.type = %5) " // channelrecord 2402 2404 " OR" 2403 " ( (TIME_TO_SEC(RECTABLE.starttime) = TIME_TO_SEC(program.starttime)) " // timeslot matches2405 " (720-ABS(ABS(TIMESTAMPDIFF(MINUTE,program.starttime,ADDTIME(RECTABLE.startdate,RECTABLE.starttime))% 1440) -720) <= %6" 2404 2406 " AND " 2405 " ((RECTABLE.type = % 6) " // timeslotrecord2407 " ((RECTABLE.type = %7) " // timeslotrecord 2406 2408 " OR" 2407 " (( DAYOFWEEK(RECTABLE.startdate) = DAYOFWEEK(program.starttime)"2409 " ((5040-ABS(ABS(TIMESTAMPDIFF(MINUTE,program.starttime,ADDTIME(RECTABLE.startdate,RECTABLE.starttime))% 10080) -5040) <= %8" 2408 2410 " AND " 2409 " ((RECTABLE.type = % 7) " // weekslotrecord2411 " ((RECTABLE.type = %9) " // weekslotrecord 2410 2412 " OR" 2411 2413 " ((TO_DAYS(RECTABLE.startdate) = TO_DAYS(program.starttime)) " // date matches 2412 2414 " )" … … 2423 2425 .arg(kFindDailyRecord) 2424 2426 .arg(kFindWeeklyRecord) 2425 2427 .arg(kChannelRecord) 2428 .arg(startTimeSlack) 2426 2429 .arg(kTimeslotRecord) 2430 .arg(startTimeSlack) 2427 2431 .arg(kWeekslotRecord); 2428 2432 2429 2433 while (1)