add a comment to explain why skip_existing does what it does

This commit is contained in:
ChaotiCryptidz 2022-02-10 12:50:07 +00:00
parent 0f66213dfd
commit 8356c480c3

View file

@ -103,10 +103,13 @@ class ProcessCommand():
print("Adding ReplayGain Tags") print("Adding ReplayGain Tags")
for file in self.state.files: 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 self.args.replaygain == "skip_existing":
if file.tags.has_replaygain: if file.tags.has_replaygain:
continue continue
print( print(
f"Adding ReplayGain Tags to \"{file.filename}.{file.extension}\"") f"Adding ReplayGain Tags to \"{file.filename}.{file.extension}\"")
do_replaygain(file) do_replaygain(file, False)