Ticket #5251: watch-weight-expire.diff
File watch-weight-expire.diff, 3.8 KB (added by , 16 years ago) |
---|
-
programs/mythfrontend/globalsettings.cpp
669 669 bc->setLabel(QObject::tr("Auto Expire Method")); 670 670 bc->addSelection(QObject::tr("Oldest Show First"), "1"); 671 671 bc->addSelection(QObject::tr("Lowest Priority First"), "2"); 672 bc->addSelection(QObject::tr("Weighted Time/Priority Combination"), "3"); 672 bc->addSelection(QObject::tr("Weighted Time/Priority/Watched Combination"), 673 "3"); 673 674 bc->setHelpText(QObject::tr("Method used to determine which recorded " 674 675 "shows to delete first. LiveTV recordings will always " 675 676 "expire before normal recordings.")); … … 684 685 bc->setValue(false); 685 686 bc->setHelpText(QObject::tr("If set, programs that have been marked as " 686 687 "watched will be expired before programs that have not " 687 "been watched.")); 688 "been watched. Does not apply to Weighted " 689 "Time/Priority/Watched Auto Expire Method " 690 "(use Watched Weight instead).")); 688 691 return bc; 689 692 } 690 693 … … 694 697 bs->setLabel(QObject::tr("Priority Weight")); 695 698 bs->setHelpText(QObject::tr("The number of days bonus a program gets for " 696 699 "each priority point. This is only used when the Weighted " 697 "Time/Priority Auto Expire Method is selected."));700 "Time/Priority/Watched Auto Expire Method is selected.")); 698 701 bs->setValue(3); 699 702 return bs; 700 703 }; 701 704 705 static GlobalSpinBox *AutoExpireWatchedWeight() 706 { 707 GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireWatchedWeight", 1, 400, 1); 708 bs->setLabel(QObject::tr("Watched Weight")); 709 bs->setHelpText(QObject::tr("The number of days fewer a program gets when " 710 "it is marked as watched. This is only used when the " 711 "Weighted Time/Priority/Watched Auto Expire Method " 712 "is selected.")); 713 bs->setValue(14); 714 return bs; 715 }; 716 717 702 718 static GlobalCheckBox *AutoExpireDefault() 703 719 { 704 720 GlobalCheckBox *bc = new GlobalCheckBox("AutoExpireDefault"); … … 4760 4776 new VerticalConfigurationGroup(false, false, true, true); 4761 4777 expgrp1->addChild(AutoExpireLiveTVMaxAge()); 4762 4778 expgrp1->addChild(AutoExpireDayPriority()); 4779 expgrp1->addChild(AutoExpireWatchedWeight()); 4763 4780 expgrp1->addChild(AutoExpireExtraSpace()); 4764 4781 4765 4782 HorizontalConfigurationGroup *expgrp = -
programs/mythbackend/autoexpire.cpp
869 869 case emWeightedTimePriority: 870 870 msg = "Adding expirable programs in Weighted Time Priority order"; 871 871 where = "autoexpire > 0"; 872 if (gContext->GetNumSetting("AutoExpireWatchedPriority", 0)) 873 orderby = "recorded.watched DESC, "; 874 orderby += QString("DATE_ADD(starttime, INTERVAL '%1' * " 875 "recorded.recpriority DAY) ASC") 876 .arg(gContext->GetNumSetting("AutoExpireDayPriority", 3)); 872 orderby = 873 QString("starttime" 874 " + INTERVAL '%1' * recorded.recpriority DAY" 875 " - INTERVAL '%2' * recorded.watched DAY" 876 " ASC") 877 .arg(gContext->GetNumSetting("AutoExpireDayPriority", 3)) 878 .arg(gContext->GetNumSetting("AutoExpireWatchedWeight", 14)); 877 879 break; 878 880 case emShortLiveTVPrograms: 879 881 msg = "Adding Short LiveTV programs in starttime order";