Beispiel #1
0
def view_search(request):
    from api.search import SearchEngine
    search = request.GET.get("q", "").strip()
    terms = [x.strip() for x in search.split(" ") if x]
    se = SearchEngine()
    query = se.search_series(user=request.user, *terms)
    return render_series_list_page(request, query, search=search,
                                   project=se.project(),
                                   keywords=se.last_keywords())
Beispiel #2
0
 def _update_watch_queue(self, series):
     se = SearchEngine()
     for wq in WatchedQuery.objects.all():
         if se.query_test_message(wq.query, series):
             self._add_to_queue(wq.user, series, "watched")
Beispiel #3
0
 def handle(self, request, terms):
     se = SearchEngine()
     q = se.search_series(user=request.user, *terms)
     for s in q:
         _instance.clear_and_start_testing(s)
Beispiel #4
0
 def _update_watch_queue(self, series):
     se = SearchEngine()
     for wq in WatchedQuery.objects.all():
         if se.query_test_message(wq.query, series):
             self._add_to_queue(wq.user, series, "watched")