From fd1384778fff8e87708b74c0bb2c0890ee1bc9cb Mon Sep 17 00:00:00 2001 From: xuyanling Date: Tue, 9 Jan 2024 00:23:27 +0800 Subject: [PATCH] =?UTF-8?q?fix(download):=20=E7=A7=81=E6=9C=89PT=E7=AB=99?= =?UTF-8?q?=E7=82=B9=EF=BC=8C=E7=82=B9=E5=87=BB=E4=B8=8B=E8=BD=BD=E4=B8=8D?= =?UTF-8?q?=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/utils/torrent.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/utils/torrent.py b/app/utils/torrent.py index 35e4ca31..3f62027a 100644 --- a/app/utils/torrent.py +++ b/app/utils/torrent.py @@ -14,7 +14,7 @@ from app.utils.http_utils import RequestUtils from app.utils.types import MediaType from config import Config - +from app.sites_config import SitesConfig class Torrent: _torrent_temp_path = None @@ -456,12 +456,12 @@ def maybe_torrent_url(link): def format_enclosure(link): """ 格式化一个链接 - 如果是磁力链接则直接返回 + 如果是磁力链接或者为私有PT站点则直接返回 如果不是磁力链接看是否是种子链接,如果是则下载种子后转换为磁力链接 """ if not StringUtils.is_string_and_not_empty(link): return None - if Torrent.is_magnet(link): + if Torrent.is_magnet(link) or SitesConfig().get_site_config_info(link): return link if not Torrent.maybe_torrent_url(link): return None