Fix minor problems when aggragating the results (#106)
This commit is contained in:
@@ -186,10 +186,10 @@ def compare_videos(video_path1, video_path2, max_frames_to_check=100, threshold=
|
||||
mismatch_count += 1
|
||||
# If there's a significant difference, the frames are not the same
|
||||
if mismatch_count > threshold:
|
||||
return False
|
||||
return 0.
|
||||
|
||||
# If we reach here, the content appears to be the same
|
||||
return True
|
||||
return 1.
|
||||
|
||||
|
||||
def are_audio_files_similar(mp3_file_path, mp4_file_path):
|
||||
@@ -203,7 +203,7 @@ def are_audio_files_similar(mp3_file_path, mp4_file_path):
|
||||
mp4_audio_path], check=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"An error occurred during audio extraction from MP4: {e}")
|
||||
return False
|
||||
return 0.
|
||||
|
||||
# Extract audio fingerprint from the extracted audio
|
||||
mp4_fingerprint, mp4_duration = acoustid.fingerprint_file(mp4_audio_path)
|
||||
@@ -213,9 +213,9 @@ def are_audio_files_similar(mp3_file_path, mp4_file_path):
|
||||
|
||||
# Compare fingerprints (rudimentary comparison)
|
||||
if mp3_duration >= mp4_duration and mp3_fingerprint == mp4_fingerprint:
|
||||
return True
|
||||
return 1.
|
||||
|
||||
return False
|
||||
return 0.
|
||||
|
||||
|
||||
def check_qt_bgcone(actual_config_path, rule):
|
||||
|
||||
Reference in New Issue
Block a user