API movie.list didn't return proper total. fix #1727
This commit is contained in:
1 parent
7314b5ecae
commit
129f8d72bd
1 file changed
+2
-2
@@ -174,8 +174,6 @@ class MoviePlugin(Plugin):
|
|||||||
if release_status and len(release_status) > 0:
|
if release_status and len(release_status) > 0:
|
||||||
q = q.filter(or_(*[Release.status.has(identifier = s) for s in release_status]))
|
q = q.filter(or_(*[Release.status.has(identifier = s) for s in release_status]))
|
||||||
|
|
||||||
total_count = q.count()
|
|
||||||
|
|
||||||
filter_or = []
|
filter_or = []
|
||||||
if starts_with:
|
if starts_with:
|
||||||
starts_with = toUnicode(starts_with.lower())
|
starts_with = toUnicode(starts_with.lower())
|
||||||
@@ -193,6 +191,8 @@ class MoviePlugin(Plugin):
|
|||||||
if filter_or:
|
if filter_or:
|
||||||
q = q.filter(or_(*filter_or))
|
q = q.filter(or_(*filter_or))
|
||||||
|
|
||||||
|
total_count = q.count()
|
||||||
|
|
||||||
if order == 'release_order':
|
if order == 'release_order':
|
||||||
q = q.order_by(desc(Release.last_edit))
|
q = q.order_by(desc(Release.last_edit))
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in new issue
Block a user