mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-04-24 10:42:48 +08:00
fix download
This commit is contained in:
@@ -62,7 +62,7 @@ class TorrentInfo:
|
||||
setattr(self, key, value)
|
||||
|
||||
@staticmethod
|
||||
def get_free_string(upload_volume_factor, download_volume_factor):
|
||||
def get_free_string(upload_volume_factor: float, download_volume_factor: float) -> str:
|
||||
"""
|
||||
计算促销类型
|
||||
"""
|
||||
@@ -80,7 +80,8 @@ class TorrentInfo:
|
||||
}
|
||||
return free_strs.get('%.1f %.1f' % (upload_volume_factor, download_volume_factor), "未知")
|
||||
|
||||
def get_volume_factor_string(self):
|
||||
@property
|
||||
def volume_factor(self):
|
||||
"""
|
||||
返回促销信息
|
||||
"""
|
||||
@@ -90,6 +91,8 @@ class TorrentInfo:
|
||||
"""
|
||||
返回字典
|
||||
"""
|
||||
dicts = asdict(self)
|
||||
dicts["volume_factor"] = self.volume_factor
|
||||
return asdict(self)
|
||||
|
||||
|
||||
|
||||
@@ -447,4 +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
|
||||
return dicts
|
||||
|
||||
Reference in New Issue
Block a user