Ticket #1629: autoexpire-actions.2.diff
File autoexpire-actions.2.diff, 3.5 KB (added by , 18 years ago) |
---|
-
programs/mythbackend/autoexpire.cpp
740 740 " progend, filesize, recgroup " 741 741 "FROM recorded " 742 742 "LEFT JOIN channel ON recorded.chanid = channel.chanid " 743 "WHERE %1 "743 "WHERE %1 AND deletepending=0 " 744 744 "ORDER BY autoexpire DESC, %2").arg(where).arg(orderby); 745 745 746 746 query.prepare(querystr); -
programs/mythfrontend/statusbox.h
6 6 #include "mythdialogs.h" 7 7 #include "uitypes.h" 8 8 #include "xmlparse.h" 9 #include "programinfo.h" 9 10 10 11 typedef QMap<QString, unsigned int> recprof2bps_t; 11 12 … … 64 65 QMap<int, QString> contentData; 65 66 recprof2bps_t recordingProfilesBPS; 66 67 68 vector<ProgramInfo *> expList; 69 67 70 MythMainWindow *my_parent; 68 71 69 72 bool isBackend; -
programs/mythfrontend/statusbox.cpp
24 24 #include "mythdbcon.h" 25 25 #include "cardutil.h" 26 26 27 #define REC_CAN_BE_DELETED(rec) \ 28 ((((rec)->programflags & FL_INUSEPLAYING) == 0) && \ 29 ((((rec)->programflags & FL_INUSERECORDING) == 0) || \ 30 ((rec)->recgroup != "LiveTV"))) 31 32 27 33 /** \class StatusBox 28 34 * \brief Reports on various status items. 29 35 * … … 611 617 } 612 618 } 613 619 } 620 else if (currentItem == QObject::tr("AutoExpire List")) 621 { 622 ProgramInfo* rec; 614 623 615 return; 624 rec = expList[contentPos]; 625 626 if (rec) 627 { 628 QStringList msgs; 629 int retval; 630 631 msgs << QObject::tr("Delete Now"); 632 msgs << QObject::tr("Disable AutoExpire"); 633 msgs << QObject::tr("No Change"); 634 635 retval = MythPopupBox::showButtonPopup(my_parent, 636 QString("AutoExpirePopup"), 637 QObject::tr("AutoExpire Actions:"), 638 msgs, 2); 639 640 if (retval == 0 && REC_CAN_BE_DELETED(rec)) 641 { 642 RemoteDeleteRecording(rec, false, false); 643 } 644 else if (retval == 1) 645 { 646 rec->SetAutoExpire(0); 647 if ((rec)->recgroup == "LiveTV") 648 rec->ApplyRecordRecGroupChange("Default"); 649 } 650 651 // Update list, prevent selected item going off bottom 652 doAutoExpireList(); 653 if (contentPos >= (int)expList.size()) 654 contentPos = max((int)expList.size()-1,0); 655 } 656 } 657 return; 616 658 } 617 659 618 660 // Clear all visible content elements here … … 1286 1328 void StatusBox::doAutoExpireList() 1287 1329 { 1288 1330 int count(0); 1289 vector<ProgramInfo *> expList;1290 1331 ProgramInfo* pginfo; 1291 1332 QString contentLine; 1292 1333 QString detailInfo; … … 1300 1341 contentFont.clear(); 1301 1342 doScroll = true; 1302 1343 1344 vector<ProgramInfo *>::iterator it; 1345 for (it = expList.begin(); it != expList.end(); it++) 1346 delete *it; 1347 expList.clear(); 1348 1303 1349 RemoteGetAllExpiringRecordings(expList); 1304 1350 1305 vector<ProgramInfo *>::iterator it;1306 1351 for (it = expList.begin(); it != expList.end(); it++) 1307 1352 { 1308 1353 pginfo = *it;