Update SQL to match TVRage edition

This commit is contained in:
Nils Vogels 2014-05-02 11:59:13 +02:00
parent 6a8bef76c9
commit 2b2e2d484d

View file

@ -224,7 +224,7 @@ class SpeedCDProvider(generic.TorrentProvider):
results = []
sqlResults = db.DBConnection().select('SELECT s.show_name, e.showid, e.season, e.episode, e.status, e.airdate FROM tv_episodes AS e' +
' INNER JOIN tv_shows AS s ON (e.showid = s.tvdb_id)' +
' INNER JOIN tv_shows AS s ON (e.showid = s.indexer_id)' +
' WHERE e.airdate >= ' + str(search_date.toordinal()) +
' AND (e.status IN (' + ','.join([str(x) for x in Quality.DOWNLOADED]) + ')' +
' OR (e.status IN (' + ','.join([str(x) for x in Quality.SNATCHED]) + ')))'