diff --git a/CHANGES.md b/CHANGES.md index cb81cac..1d0fe55 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,9 @@ -### 0.25.0 (2021-09-15 00:05:00 UTC) +### 0.25.1 (2021-09-18 00:06:00 UTC) + +* Fix history API endpoint to respect clear history + + +### 0.25.0 (2021-09-15 00:05:00 UTC) * Add ability to switch a TV info source for a show, initial support is for TheTVDb and TVMaze * Add column on manage/Bulk Change for TV info source so that shows can be sorted to isolate by source for switching diff --git a/sickbeard/webapi.py b/sickbeard/webapi.py index 9da54e2..144a3e7 100644 --- a/sickbeard/webapi.py +++ b/sickbeard/webapi.py @@ -1633,13 +1633,15 @@ class CMD_SickGearHistory(ApiCall): if 0 == ulimit: # noinspection SqlResolve sql_result = my_db.select( - "SELECT h.*, show_name, s.indexer FROM history h, tv_shows s WHERE h.showid=s.indexer_id" + + "SELECT h.*, show_name, s.indexer FROM history h, tv_shows s WHERE h.hide = 0" + + " AND h.showid=s.indexer_id" + ("", " AND s.indexer=%s" % TVINFO_TVDB)[self.sickbeard_call] + " AND action in (" + ','.join(['?'] * len(typeCodes)) + ") ORDER BY date DESC", typeCodes) else: # noinspection SqlResolve sql_result = my_db.select( - "SELECT h.*, show_name, s.indexer FROM history h, tv_shows s WHERE h.showid=s.indexer_id" + + "SELECT h.*, show_name, s.indexer FROM history h, tv_shows s WHERE h.hide = 0" + + " AND h.showid=s.indexer_id" + ("", " AND s.indexer=%s" % TVINFO_TVDB)[self.sickbeard_call] + " AND action in (" + ','.join(['?'] * len(typeCodes)) + ") ORDER BY date DESC LIMIT ?", typeCodes + [ulimit])