From c2fc9095671f2409823f8b3dd6760a51b6614899 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 11 Nov 2024 04:36:41 +0100
Subject: [PATCH] Fix bug of queries index getting appended to all other page
 views.

---
 ytplom.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ytplom.py b/ytplom.py
index dac6f7d..b6d45de 100755
--- a/ytplom.py
+++ b/ytplom.py
@@ -210,12 +210,12 @@ class TaskHandler(BaseHTTPRequestHandler):
         page_name = toks_url[1]
         if 'thumbnails' == page_name:
             self._send_thumbnail(FilePathStr(toks_url[2]))
-        if 'dl' == page_name:
+        elif 'dl' == page_name:
             self._send_or_download_video(VideoId(toks_url[2]),
                                          parse_qs(url.query))
-        if 'videos' == page_name:
+        elif 'videos' == page_name:
             self._send_videos_index()
-        if 'query' == page_name:
+        elif 'query' == page_name:
             self._send_query_page(QueryId(toks_url[2]))
         else:  # e.g. for /
             self._send_queries_index_and_search()
-- 
2.30.2