From 6912eb66226074119e7f0274ea2fb60ee41ee858 Mon Sep 17 00:00:00 2001 From: thsrite Date: Tue, 11 Mar 2025 09:08:15 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8Dstrm=E9=87=8D=E5=AE=9A?= =?UTF-8?q?=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.v2.json | 4 ++-- plugins.v2/strmredirect/__init__.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.v2.json b/package.v2.json index c99b91f..256d58b 100644 --- a/package.v2.json +++ b/package.v2.json @@ -478,12 +478,12 @@ "name": "Strm重定向", "description": "重写Strm文件内容。", "labels": "云盘", - "version": "1.2", + "version": "1.2.1", "icon": "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/softlinkredirect.png", "author": "thsrite", "level": 1, - "v2": true, "history": { + "v1.2.1": "修复strm重定向", "v1.2": "支持解码URL重新写入Strm", "v1.0": "重写Strm文件内容" } diff --git a/plugins.v2/strmredirect/__init__.py b/plugins.v2/strmredirect/__init__.py index 7b0d89d..cbe61cb 100644 --- a/plugins.v2/strmredirect/__init__.py +++ b/plugins.v2/strmredirect/__init__.py @@ -16,7 +16,7 @@ class StrmRedirect(_PluginBase): # 插件图标 plugin_icon = "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/softlinkredirect.png" # 插件版本 - plugin_version = "1.2" + plugin_version = "1.2.1" # 插件作者 plugin_author = "thsrite" # 作者主页 @@ -70,7 +70,7 @@ class StrmRedirect(_PluginBase): strm_content = file.read() if not strm_content: continue - unencoded = self.find_unencoded_parts(strm_content) + # unencoded = self.find_unencoded_parts(strm_content) # 解码url unercoded_strm_content = urllib.parse.unquote(strm_content) if self._unquote: @@ -80,10 +80,10 @@ class StrmRedirect(_PluginBase): if target_from and target_to: if str(unercoded_strm_content).startswith(target_from): strm_content = unercoded_strm_content.replace(target_from, target_to) - no_encoded = unencoded[0] - encoded = strm_content.replace(no_encoded, "") + # no_encoded = unencoded[0] + # encoded = strm_content.replace(no_encoded, "") # encoded = urllib.parse.quote(encoded) - strm_content = no_encoded + encoded + # strm_content = no_encoded + encoded # 如果不是url,不进行编码 if not str(strm_content).startswith("http"):