diff --git a/mythtv/programs/mythbackend/autoexpire.cpp b/mythtv/programs/mythbackend/autoexpire.cpp
index 0c1b9e8354..0f85a74da7 100644
a
|
b
|
void AutoExpire::FillDBOrdered(pginfolist_t &expireList, int expMethod)
|
980 | 980 | "SELECT recorded.chanid, starttime " |
981 | 981 | "FROM recorded " |
982 | 982 | "LEFT JOIN channel ON recorded.chanid = channel.chanid " |
983 | | "WHERE %1 AND deletepending = 0 " |
| 983 | "WHERE %1 AND ( deletepending = 0 OR lastmodified <= DATE_ADD(NOW(), INTERVAL '-5' MINUTE) ) " |
984 | 984 | "ORDER BY autoexpire DESC, %2").arg(where).arg(orderby); |
985 | 985 | |
986 | 986 | query.prepare(querystr); |