home · contact · privacy
Fix bug of queries index getting appended to all other page views.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 11 Nov 2024 03:36:41 +0000 (04:36 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 11 Nov 2024 03:36:41 +0000 (04:36 +0100)
ytplom.py

index dac6f7d60cfd8a52ea3206fc22be7042e52490e0..b6d45defce5d62e30e36be8d248eb47c288deaa0 100755 (executable)
--- 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()