From 32f5064f4ca9cda3826f5597bae60907b2df2dd9 Mon Sep 17 00:00:00 2001 From: Christian Heller <c.heller@plomlompom.de> Date: Fri, 21 Feb 2025 14:36:44 +0100 Subject: [PATCH] Remove youtube watch link. --- src/templates/yt_result.tmpl | 2 +- src/ytplom/http.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/templates/yt_result.tmpl b/src/templates/yt_result.tmpl index ea81f45..5216bc1 100644 --- a/src/templates/yt_result.tmpl +++ b/src/templates/yt_result.tmpl @@ -8,7 +8,7 @@ <tr><th>description:</th><td>{{video_data.description}}</td></tr> <tr><th>duration:</th><td>{{video_data.duration}}</td></tr> <tr><th>definition:</th><td>{{video_data.definition}}</td></tr> -<tr><th>YouTube ID:</th><td>{{video_data.id_}} (<a href="{{youtube_prefix}}{{video_data.id_}}">watch</a>)</td></tr> +<tr><th>YouTube ID:</th><td>{{video_data.id_}}</td></tr> <tr><th>download:</th><td>{% if is_temp %}working on it{% elif file_path %}<a href="/{{page_names.file}}/{{file_digest}}">{{file_path}}</a>{% else %}<a href="/{{page_names.download}}/{{video_data.id_}}">please do</a>{% endif %}</td></tr> <tr> <th>linked queries:</th> diff --git a/src/ytplom/http.py b/src/ytplom/http.py index c2a25d4..12fa9bc 100644 --- a/src/ytplom/http.py +++ b/src/ytplom/http.py @@ -14,8 +14,7 @@ from plomlib.web import ( from ytplom.db import Hash, DbConn from ytplom.misc import ( FilterStr, FlagName, QueryId, QueryText, TagSet, YoutubeId, - FILE_FLAGS, PATH_THUMBNAILS, YOUTUBE_URL_PREFIX, - ensure_expected_dirs, + FILE_FLAGS, PATH_THUMBNAILS, ensure_expected_dirs, Config, DownloadsManager, Player, QuotaLog, VideoFile, YoutubeQuery, YoutubeVideo ) @@ -393,7 +392,6 @@ class _TaskHandler(PlomHttpHandler): 'is_temp': video_id in self.server.downloads.ids_unfinished, 'file_digest': file_digest, 'file_path': file_path, - 'youtube_prefix': YOUTUBE_URL_PREFIX, 'queries': linked_queries}) def _send_yt_queries_index_and_search(self) -> None: -- 2.30.2