Ticket #3196: maxepisodes.diff
File maxepisodes.diff, 1.2 KB (added by , 17 years ago) |
---|
-
scheduler.cpp
2119 2119 { 2120 2120 MSqlQuery epicnt(dbConn); 2121 2121 2122 epicnt.prepare("SELECT count(*) FROM recorded " 2123 "WHERE title = :TITLE AND duplicate <> 0;"); 2124 epicnt.bindValue(":TITLE", qtitle.utf8()); 2122 epicnt.prepare("SELECT DISTINCT chanid, progstart, progend " 2123 "FROM recorded " 2124 "WHERE recordid = :RECID AND preserve = 0 " 2125 "AND recgroup <> 'LiveTV';"); 2126 epicnt.bindValue(":RECID", recid); 2125 2127 2126 epicnt.exec(); 2127 2128 if (epicnt.isActive() && epicnt.size() > 0) 2128 if (epicnt.exec() && epicnt.isActive()) 2129 2129 { 2130 epicnt.next(); 2130 int curEpisodes = 0; 2131 while (epicnt.next()) 2132 curEpisodes++; 2131 2133 2132 if ( epicnt.value(0).toInt()>= maxEpisodes)2134 if (curEpisodes >= maxEpisodes) 2133 2135 { 2134 2136 tooManyMap[recid] = true; 2135 2137 checkTooMany = true;