#set$numDLEpisodes=$myDB.select("SELECT COUNT(*) FROM tv_episodes WHERE status IN ("+",".join([str(x)forxin$Quality.DOWNLOADED+[$ARCHIVED]])+") AND season != 0 and episode != 0 AND airdate <= "+$today+"")[0][0]
#set$numEpisodes=$myDB.select("SELECT COUNT(*) FROM tv_episodes WHERE season != 0 and episode != 0 AND (airdate != 1 OR status IN ("+",".join([str(x)forxin($Quality.DOWNLOADED+$Quality.SNATCHED+$Quality.SNATCHED_PROPER)+[$ARCHIVED]])+")) AND airdate <= "+$today+" AND status != "+str($IGNORED)+"")[0][0]