Skip to content

Commit

Permalink
video_hasher: no divide by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
dale-wahl committed Dec 20, 2024
1 parent d4c43a7 commit b4aef77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion processors/visualisation/video_hasher.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def process(self):

video_hashes = {}
video_metadata = None
total_possible_videos = min(self.source_dataset.num_rows - 1, max_videos) if max_videos != 0 else self.source_dataset.num_rows - 1 # for the metadata file that is included in archives
total_possible_videos = max((min(self.source_dataset.num_rows - 1, max_videos) if max_videos != 0 else self.source_dataset.num_rows), 1)
processed_videos = 0

self.dataset.update_status("Creating video hashes")
Expand Down

0 comments on commit b4aef77

Please sign in to comment.