Private GIT

Skip to content
Snippets Groups Projects
Commit f10030ec authored by echel0n's avatar echel0n
Browse files

Merge pull request #995 from Hellowlol/apishowstats

added snatched episodes to shows.stats api command
parents 87a5e35b 586bdeac
Branches
Tags
No related merge requests found
......@@ -2861,6 +2861,10 @@ class CMD_ShowsStats(ApiCall):
[str(show) for show in
Quality.DOWNLOADED + [ARCHIVED]]) + ") AND season != 0 and episode != 0 AND airdate <= " + today + "")[0][
0]
stats["ep_snatched"] = myDB.select("SELECT COUNT(*) FROM tv_episodes WHERE status IN (" + ",".join(
[str(show) for show in
Quality.SNATCHED + Quality.SNATCHED_PROPER]) + ") AND season != 0 and episode != 0 AND airdate <= " + today + "")[0][
0]
stats["ep_total"] = myDB.select(
"SELECT COUNT(*) FROM tv_episodes WHERE season != 0 AND episode != 0 AND (airdate != 1 OR status IN (" + ",".join(
[str(show) for show in (Quality.DOWNLOADED + Quality.SNATCHED + Quality.SNATCHED_PROPER) + [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment