Use generator comprehension instead of list comprehension for ?q.

master
voussoir 2020-08-11 21:50:38 -07:00
parent e90254cfeb
commit be45de55f5
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ def get_channel(channel_id=None, download_filter=None):
search_terms = request.args.get('q', '').lower().strip().replace('+', ' ').split()
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)
if limit is not None: