From 129f8d72bd6515671a9474cd9b9387fea6f1655b Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 13 May 2013 21:37:54 +0200 Subject: [PATCH] API movie.list didn't return proper total. fix #1727 --- couchpotato/core/plugins/movie/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/plugins/movie/main.py b/couchpotato/core/plugins/movie/main.py index 1ce68f08..b3bbe8ac 100644 --- a/couchpotato/core/plugins/movie/main.py +++ b/couchpotato/core/plugins/movie/main.py @@ -174,8 +174,6 @@ class MoviePlugin(Plugin): if release_status and len(release_status) > 0: q = q.filter(or_(*[Release.status.has(identifier = s) for s in release_status])) - total_count = q.count() - filter_or = [] if starts_with: starts_with = toUnicode(starts_with.lower()) @@ -193,6 +191,8 @@ class MoviePlugin(Plugin): if filter_or: q = q.filter(or_(*filter_or)) + total_count = q.count() + if order == 'release_order': q = q.order_by(desc(Release.last_edit)) else: