Skip to content

Commit

Permalink
Fix race conditions in history.py and improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
SeoulSKY committed Sep 17, 2024
1 parent 1243e05 commit 173e103
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ytnoti/models/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def add(self, video: Video) -> None:
:param video: The video to add.
"""
async with self._lock:
if self.has(video):
if video.id in self._video_ids:
self._logger.debug("Skipping to add video (%s) that already "
"exists in history", video.id)
return
Expand Down

0 comments on commit 173e103

Please sign in to comment.