mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-03-27 10:05:57 +00:00
fix 修复strm重定向
This commit is contained in:
@@ -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文件内容"
|
||||
}
|
||||
|
||||
@@ -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"):
|
||||
|
||||
Reference in New Issue
Block a user