Skip to content

Commit

Permalink
feat(filetransfer): 新增简化入库通知
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuyelin committed Jan 8, 2024
1 parent f78865d commit befc693
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions app/filetransfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,10 +863,17 @@ def __finish_transfer(status, message):
self.update_transfer_unknown_state(file_item)
# 电影立即发送消息
if media.type == MediaType.MOVIE:
self.message.send_transfer_movie_message(in_from,
media,
exist_filenum,
self._movie_category_flag)
is_simplify_notification = Config().get_config('laboratory').get('simplify_library_notification', False)
if is_simplify_notification:
self.message.send_simplify_transfer_movie_message(in_from,
media,
exist_filenum,
self._movie_category_flag)
else:
self.message.send_transfer_movie_message(in_from,
media,
exist_filenum,
self._movie_category_flag)
# 否则登记汇总发消息
else:
# 按季汇总
Expand Down Expand Up @@ -922,7 +929,11 @@ def __finish_transfer(status, message):
# 循环结束
# 统计完成情况,发送通知
if message_medias:
self.message.send_transfer_tv_message(message_medias, in_from)
is_simplify_notification = Config().get_config('laboratory').get('simplify_library_notification', False)
if is_simplify_notification:
self.message.send_simplify_transfer_tv_message(message_medias, in_from)
else:
self.message.send_transfer_tv_message(message_medias, in_from)
# 总结
log.info("【Rmt】%s 处理完成,总数:%s,失败:%s" % (in_path, total_count, failed_count))
if alert_count > 0:
Expand Down

0 comments on commit befc693

Please sign in to comment.