fix transfer message
This commit is contained in:
@ -41,6 +41,7 @@ RUN apt-get update \
|
||||
&& echo "${WORKDIR}/" > /usr/local/lib/python${python_ver%.*}/site-packages/app.pth \
|
||||
&& echo 'fs.inotify.max_user_watches=5242880' >> /etc/sysctl.conf \
|
||||
&& echo 'fs.inotify.max_user_instances=5242880' >> /etc/sysctl.conf \
|
||||
&& playwright install-deps chromium \
|
||||
&& rm -rf /root/.cache/
|
||||
EXPOSE 3001
|
||||
VOLUME ["/config"]
|
||||
|
@ -79,27 +79,13 @@ class TransferChain(ChainBase):
|
||||
transferinfo.get('target_path')
|
||||
)
|
||||
)
|
||||
if mediainfo.type == MediaType.TV:
|
||||
# 电影
|
||||
msg_title = f"{mediainfo.get_title_string()} {meta.get_season_episode_string()} 已入库"
|
||||
msg_title = f"{mediainfo.get_title_string()} 已入库"
|
||||
if mediainfo.vote_average:
|
||||
msg_str = f"评分:{mediainfo.vote_average},类型:{mediainfo.type.value}"
|
||||
else:
|
||||
msg_str = f"类型:{mediainfo.type.value}"
|
||||
if mediainfo.category:
|
||||
msg_str = f"{msg_str},类别:{mediainfo.category}"
|
||||
if meta.total_seasons <= 1 and meta.total_episodes == 1:
|
||||
msg_str = f"{msg_str},大小:{file_size}"
|
||||
else:
|
||||
msg_str = f"{msg_str},共{meta.total_seasons}季{meta.total_episodes}集,总大小:{file_size}"
|
||||
else:
|
||||
msg_title = f"{mediainfo.get_title_string()} 已入库"
|
||||
if mediainfo.vote_average:
|
||||
msg_str = f"评分:{mediainfo.vote_average},类型:电影"
|
||||
else:
|
||||
msg_str = "类型:电影"
|
||||
if mediainfo.category:
|
||||
msg_str = f"{msg_str},类别:{mediainfo.category}"
|
||||
if meta.get_resource_type_string():
|
||||
msg_str = f"{msg_str},质量:{meta.get_resource_type_string()}"
|
||||
msg_str = f"{msg_str}, 大小:{file_size}"
|
||||
|
@ -75,7 +75,7 @@ class Telegram(metaclass=Singleton):
|
||||
|
||||
try:
|
||||
if text:
|
||||
caption = f"*{title}*\n\n{text}"
|
||||
caption = f"*{title}*\n{text}"
|
||||
else:
|
||||
caption = title
|
||||
|
||||
|
@ -203,6 +203,8 @@ class TheMovieDb(_ModuleBase):
|
||||
for attr_name, attr_value in vars(mediainfo).items():
|
||||
if attr_value \
|
||||
and attr_name.endswith("_path") \
|
||||
and attr_value \
|
||||
and isinstance(attr_value, str) \
|
||||
and attr_value.startswith("http"):
|
||||
image_name = attr_name.replace("_path", "") + Path(attr_value).suffix
|
||||
self.__save_image(url=attr_value,
|
||||
@ -221,6 +223,8 @@ class TheMovieDb(_ModuleBase):
|
||||
if attr_value \
|
||||
and attr_name.endswith("_path") \
|
||||
and not attr_name.startswith("season") \
|
||||
and attr_value \
|
||||
and isinstance(attr_value, str) \
|
||||
and attr_value.startswith("http"):
|
||||
image_name = attr_name.replace("_path", "") + Path(attr_value).suffix
|
||||
self.__save_image(url=attr_value,
|
||||
@ -237,6 +241,8 @@ class TheMovieDb(_ModuleBase):
|
||||
for attr_name, attr_value in vars(mediainfo).items():
|
||||
if attr_value \
|
||||
and attr_name.startswith("season") \
|
||||
and attr_value \
|
||||
and isinstance(attr_value, str) \
|
||||
and attr_value.startswith("http"):
|
||||
image_name = attr_name.replace("_path",
|
||||
"").replace("season",
|
||||
|
Reference in New Issue
Block a user