Merge branch 'jxxghp:main' into main

This commit is contained in:
Ma 2023-07-08 23:38:22 +08:00 committed by GitHub
commit 0cb08a34cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 5 deletions

View File

@ -93,7 +93,7 @@ class TorrentInfo:
"""
dicts = asdict(self)
dicts["volume_factor"] = self.volume_factor
return asdict(self)
return dicts
@dataclass

View File

@ -332,7 +332,7 @@ class MetaBase(object):
return ret_string
@property
def edtion(self) -> str:
def edition(self) -> str:
"""
返回资源类型字符串不含分辨率
"""
@ -447,5 +447,5 @@ class MetaBase(object):
dicts = asdict(self)
dicts["type"] = self.type.value if self.type else None
dicts["season_episode"] = self.season_episode
dicts["edtion"] = self.edtion
dicts["edition"] = self.edition
return dicts

View File

@ -487,7 +487,7 @@ class FileTransferModule(_ModuleBase):
# 年份
"year": mediainfo.year,
# 版本
"edition": meta.edtion,
"edition": meta.edition,
# 分辨率
"videoFormat": meta.resource_pix,
# 制作组/字幕组

View File

@ -52,6 +52,8 @@ class MetaInfo(BaseModel):
video_encode: Optional[str] = None
# 音频编码
audio_encode: Optional[str] = None
# 资源类型
edition: Optional[str] = None
class MediaInfo(BaseModel):

View File

@ -26,7 +26,7 @@ class MetaInfoTest(TestCase):
"part": meta_info.part or "",
"season": meta_info.season,
"episode": meta_info.episode,
"restype": meta_info.edtion,
"restype": meta_info.edition,
"pix": meta_info.resource_pix or "",
"video_codec": meta_info.video_encode or "",
"audio_codec": meta_info.audio_encode or ""