mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 00:16:57 +08:00
refactor(meta): 将 web_source 处理逻辑统一到 MetaBase 并添加到消息模板
This commit is contained in:
@@ -55,6 +55,8 @@ class MetaBase(object):
|
||||
resource_team: Optional[str] = None
|
||||
# 识别的自定义占位符
|
||||
customization: Optional[str] = None
|
||||
# 识别的流媒体平台
|
||||
web_source: Optional[str] = None
|
||||
# 视频编码
|
||||
video_encode: Optional[str] = None
|
||||
# 音频编码
|
||||
@@ -402,6 +404,8 @@ class MetaBase(object):
|
||||
返回资源类型字符串,含分辨率
|
||||
"""
|
||||
ret_string = ""
|
||||
if self.web_source:
|
||||
ret_string = f"{ret_string} {self.web_source}"
|
||||
if self.resource_type:
|
||||
ret_string = f"{ret_string} {self.resource_type}"
|
||||
if self.resource_effect:
|
||||
@@ -416,6 +420,8 @@ class MetaBase(object):
|
||||
返回资源类型字符串,不含分辨率
|
||||
"""
|
||||
ret_string = ""
|
||||
if self.web_source:
|
||||
ret_string = f"{ret_string} {self.web_source}"
|
||||
if self.resource_type:
|
||||
ret_string = f"{ret_string} {self.resource_type}"
|
||||
if self.resource_effect:
|
||||
|
||||
Reference in New Issue
Block a user