From 91b7ec2b67d74e4d2e41c857232414feb3cb7bfd Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 02 四月 2025 18:32:10 +0800
Subject: [PATCH] 功能完善

---
 video_manager.py |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/video_manager.py b/video_manager.py
index eb6d74e..6fb6832 100644
--- a/video_manager.py
+++ b/video_manager.py
@@ -18,18 +18,17 @@
                 if lines:
                     self.__video_data_cache_dict = eval(lines[0])
 
-    def is_need_click(self, video_name, video_time, comment_count):
+    def is_need_click(self, video_info):
         """
         鏄惁闇�瑕佺偣鍑�
-        :param video_name: 瑙嗛鍚嶇О
-        :param video_time: 瑙嗛鏃堕棿
-        :param comment_count: 璇勮鏁伴噺
+        :param video_info:
         :return:
         """
+        video_name, video_time, comment_count = video_info[0], video_info[1], video_info[2]
         k = f"{video_name}{video_time}"
         if k not in self.__video_data_cache_dict:
             return True
-        if comment_count - self.__video_data_cache_dict[k][0] > 0:
+        if int(comment_count) - int(self.__video_data_cache_dict[k][0]) > 0:
             return True
         return False
 
@@ -44,4 +43,3 @@
         # 淇濆瓨鍒版枃浠�
         with open(self.__video_cache_path, encoding="utf-8", mode='w') as f:
             f.write(f"{self.__video_data_cache_dict}")
-

--
Gitblit v1.8.0