Index: mythtv/programs/mythcommflag/main.cpp =================================================================== --- mythtv/programs/mythcommflag/main.cpp (revision 19625) +++ mythtv/programs/mythcommflag/main.cpp (working copy) @@ -817,6 +817,7 @@ bool clearCutlist = false; bool getCutlist = false; bool getSkipList = false; + bool skipLiveTV = false; QString newCutList = QString::null; QMap settingsOverride; @@ -966,6 +967,8 @@ getCutlist = true; else if (!strcmp(a.argv()[argpos], "--getskiplist")) getSkipList = true; + else if (!strcmp(a.argv()[argpos], "--skiplivetv")) + skipLiveTV = true; else if (!strcmp(a.argv()[argpos], "--setcutlist")) newCutList = (a.argv()[++argpos]); else if (!strcmp(a.argv()[argpos], "-j")) @@ -1129,6 +1132,7 @@ " after the 'allstart' date (default = Jan 1, 1970).\n" "--allend YYYYMMDDHHMMSS when using --all, only flag programs ending\n" " before the 'allend' date (default is now).\n" + "--skiplivetv when using --all, skip LiveTV recording group.\n" "--force Force flagging of a video even if mythcommflag\n" " thinks it is already in use by another instance.\n" "--method Commercial flagging method[s] to employ\n" @@ -1362,11 +1366,13 @@ } else { + QString ltvclause = skipLiveTV ? "AND recgroup != 'LiveTV' " : ""; MSqlQuery query(MSqlQuery::InitCon()); query.prepare( "SELECT chanid, starttime " "FROM recorded " - "WHERE starttime >= :STARTTIME AND endtime <= :ENDTIME " + "WHERE starttime >= :STARTTIME AND endtime <= :ENDTIME " + + ltvclause + "ORDER BY starttime;"); query.bindValue(":STARTTIME", allStart); query.bindValue(":ENDTIME", allEnd);