Use generator comprehension instead of list comprehension for ?q.
This commit is contained in:
parent
e90254cfeb
commit
be45de55f5
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ def get_channel(channel_id=None, download_filter=None):
|
||||||
|
|
||||||
search_terms = request.args.get('q', '').lower().strip().replace('+', ' ').split()
|
search_terms = request.args.get('q', '').lower().strip().replace('+', ' ').split()
|
||||||
if search_terms:
|
if search_terms:
|
||||||
videos = [v for v in videos if all(term in v.title.lower() for term in search_terms)]
|
videos = (v for v in videos if all(term in v.title.lower() for term in search_terms))
|
||||||
|
|
||||||
limit = request.args.get('limit', None)
|
limit = request.args.get('limit', None)
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
|
|
Loading…
Reference in a new issue