Ticket #255: soft-sched-frame.diff
File soft-sched-frame.diff, 7.7 KB (added by , 17 years ago) |
---|
-
mythtv/libs/libmythtv/programinfo.h
13 13 typedef QMap<long long, long long> frm_pos_map_t; 14 14 typedef QMap<long long, int> frm_dir_map_t; 15 15 16 #define NUMPROGRAMLINES 4 316 #define NUMPROGRAMLINES 45 17 17 18 18 typedef enum { 19 19 MARK_UNSET = -10, … … 290 290 QDateTime endts; 291 291 QDateTime recstartts; 292 292 QDateTime recendts; 293 int softstart; 294 int softend; 293 295 294 296 AvailableStatusType availableStatus; 295 297 -
mythtv/libs/libmythtv/programinfo.cpp
96 96 endts = startts; 97 97 recstartts = startts; 98 98 recendts = startts; 99 softstart = 0; 100 softend = 0; 99 101 originalAirDate = QDate::QDate (0, 1, 1); 100 102 lastmodified = startts; 101 103 lastInUseTime = startts.addSecs(-4 * 60 * 60); … … 189 191 endts = other.endts; 190 192 recstartts = other.recstartts; 191 193 recendts = other.recendts; 194 softstart = other.softstart; 195 softend = other.softend; 192 196 lastmodified = other.lastmodified; 193 197 spread = other.spread; 194 198 startCol = other.startCol; … … 324 328 INT_TO_LIST(recpriority2) 325 329 INT_TO_LIST(parentid) 326 330 STR_TO_LIST((storagegroup != "") ? storagegroup : "Default") 331 INT_TO_LIST(softstart) 332 INT_TO_LIST(softend) 327 333 } 328 334 329 335 /** \fn ProgramInfo::FromStringList(QStringList&,int) … … 423 429 INT_FROM_LIST(recpriority2) 424 430 INT_FROM_LIST(parentid) 425 431 STR_FROM_LIST(storagegroup) 432 INT_FROM_LIST(softstart) 433 INT_FROM_LIST(softend) 426 434 427 435 return true; 428 436 } … … 449 457 450 458 QString length; 451 459 int hours, minutes, seconds; 460 int startoffset, endoffset; 452 461 453 462 progMap["title"] = title; 454 463 progMap["subtitle"] = subtitle; … … 478 487 progMap["startdate"] = startts.toString("yyyy"); 479 488 progMap["recstartdate"] = startts.toString("yyyy"); 480 489 } 490 startoffset = 0; 491 endoffset = 0; 481 492 } 482 493 else 483 494 { … … 489 500 progMap["recstartdate"] = recstartts.toString(shortDateFormat); 490 501 progMap["recendtime"] = recendts.toString(timeFormat); 491 502 progMap["recenddate"] = recendts.toString(shortDateFormat); 503 startoffset = recstartts.secsTo(startts) / 60; 504 endoffset = endts.secsTo(recendts) / 60; 492 505 } 493 506 507 if (startoffset) 508 progMap["startoffset"].sprintf("%+d", startoffset); 509 else 510 progMap["startoffset"] = ""; 511 512 if (endoffset) 513 progMap["endoffset"].sprintf("%+d", endoffset); 514 else 515 progMap["endoffset"] = ""; 516 517 progMap["softstart"].sprintf("%+d", softstart); 518 progMap["softend"].sprintf("%+d", softend); 519 494 520 progMap["lastmodifiedtime"] = lastmodified.toString(timeFormat); 495 521 progMap["lastmodifieddate"] = lastmodified.toString(dateFormat); 496 522 progMap["lastmodified"] = lastmodified.toString(dateFormat) + " " + … … 560 586 progMap["playgroup"] = playgroup; 561 587 progMap["programflags"] = programflags; 562 588 589 QString offsetstr = ""; 590 if (startoffset || endoffset) 591 offsetstr.sprintf(" (%+d %+d)", startoffset, endoffset); 592 563 593 progMap["timedate"] = recstartts.date().toString(dateFormat) + ", " + 564 594 recstartts.time().toString(timeFormat) + " - " + 565 recendts.time().toString(timeFormat) ;595 recendts.time().toString(timeFormat) + offsetstr; 566 596 567 597 progMap["shorttimedate"] = 568 598 recstartts.date().toString(shortDateFormat) + ", " + 569 599 recstartts.time().toString(timeFormat) + " - " + 570 recendts.time().toString(timeFormat) ;600 recendts.time().toString(timeFormat) + offsetstr; 571 601 572 602 progMap["time"] = timeNow.time().toString(timeFormat); 573 603 -
mythtv/programs/mythfrontend/globalsettings.cpp
641 641 return bs; 642 642 } 643 643 644 static GlobalSpinBox *SchedSoftStart() 645 { 646 GlobalSpinBox *bs = new GlobalSpinBox("SchedSoftStart", 0, 10, 1, true); 647 bs->setLabel(QObject::tr("Time to schedule before start of show " 648 "(in minutes)")); 649 bs->setHelpText(QObject::tr("This global setting tells the scheduler " 650 "to change the start time for all shows. It is only " 651 "removed when there is no free recorders and for equal " 652 "or lower priority shows. Reschedule Higher " 653 "Priorities is need for removal on all shows.")); 654 bs->setValue(0); 655 return bs; 656 } 657 658 static GlobalSpinBox *SchedSoftEnd() 659 { 660 GlobalSpinBox *bs = new GlobalSpinBox("SchedSoftEnd", 0, 30, 1, true); 661 bs->setLabel(QObject::tr("Time to schedule past end of show (in minutes)")); 662 bs->setValue(0); 663 bs->setHelpText(QObject::tr("This global setting tells the scheduler " 664 "to change the end time for all shows. It is only " 665 "removed when there is no free recorders and for equal " 666 "or lower priority shows. Reschedule Higher " 667 "Priorities is need for removal on all shows. This end " 668 "time is preferred with respect to previous start time.")); 669 return bs; 670 } 671 644 672 static GlobalLineEdit *OverTimeCategory() 645 673 { 646 674 GlobalLineEdit *ge = new GlobalLineEdit("OverTimeCategory"); … … 3662 3690 general2->setLabel(QObject::tr("General (Advanced)")); 3663 3691 general2->addChild(RecordPreRoll()); 3664 3692 general2->addChild(RecordOverTime()); 3693 // These calls should remain as stubs so that they can be uncommeted by common patches 3694 // general2->addChild(SchedSoftStart()); 3695 // general2->addChild(SchedSoftEnd()); 3665 3696 general2->addChild(CategoryOverTimeSettings()); 3666 3697 general2->addChild(ATSCCheckSignalThreshold()); 3667 3698 general2->addChild(ATSCCheckSignalWait()); -
mythplugins/mythweb/modules/tv/includes/objects/Program.php
63 63 var $recpriority2 = 0; 64 64 var $parentid; 65 65 var $storagegroup = 'Default'; 66 var $softstart 67 var $softend 66 68 67 69 // The rest of these variables (which really need to get organized) are 68 70 // calculated or queried separately from the db. … … 142 144 $this->recpriority2 = $data[40]; 143 145 $this->parentid = $data[41]; 144 146 $this->storagegroup = $data[42]; 147 $this->softstart = $data[43]; 148 $this->softend = $data[44]; 145 149 // Is this a previously-recorded program? 146 150 if (!empty($this->filename)) { 147 151 // Calculate the filesize … … 355 359 $this->recpriority2 , // 40 recpriority2 356 360 $this->parentid , // 41 parentid 357 361 $this->storagegroup , // 42 storagegroup 358 '', // 43 trailing separator 362 $this->softstart , // 43 softstart 363 $this->softend , // 44 softend 364 '', // 45 trailing separator 359 365 ) 360 366 ); 361 367 }