From 8356c480c39703cc3960a29fb30f49e69ad7c43b Mon Sep 17 00:00:00 2001 From: ChaotiCryptidz Date: Thu, 10 Feb 2022 12:50:07 +0000 Subject: [PATCH] add a comment to explain why skip_existing does what it does --- musicutil/commands/process_command.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/musicutil/commands/process_command.py b/musicutil/commands/process_command.py index 00712b6..47cf666 100644 --- a/musicutil/commands/process_command.py +++ b/musicutil/commands/process_command.py @@ -103,10 +103,13 @@ class ProcessCommand(): print("Adding ReplayGain Tags") for file in self.state.files: + # Even though r128gain has a flag to skip when tags already exist + # it's very slow compared to just checking when getting tags + # so skip early if self.args.replaygain == "skip_existing": if file.tags.has_replaygain: continue print( f"Adding ReplayGain Tags to \"{file.filename}.{file.extension}\"") - do_replaygain(file) + do_replaygain(file, False)