Skip to content

Commit

Permalink
Update FCDJ.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Djpd66 authored Nov 10, 2023
1 parent f573e10 commit 2869147
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions FCDJ.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def process_files(root, files, pair_conditions, dirty_files, valid_pairs, lock,
if os.path.splitext(file)[1].lower() == '.mp3':
file_path = os.path.normpath(os.path.join(root, file))
progress_bar.set_postfix(file=file, refresh=True, count="")
scanned_files_count.increment() # Increment the scanned files counter
scanned_files_count.increment()
for condition in pair_conditions:
clean_tag = condition.get("clean_condition")
dirty_tag = condition.get("dirty_condition")
Expand All @@ -31,7 +31,7 @@ def process_files(root, files, pair_conditions, dirty_files, valid_pairs, lock,
valid_pairs.append((file_path, dirty_file))
progress_bar.update(1)
log_to_file(log_file, f"Znaleziono parę plików: {file_path}, {dirty_file}", config)
total_pairs_found += 1 # Increment the global variable
total_pairs_found += 1
break

def check_pair_conditions(file_path, dirty_file, pair_conditions):
Expand Down Expand Up @@ -70,7 +70,7 @@ def remove_files_based_on_condition(output_file, remove_condition, autoremove=Fa
try:
if os.path.exists(file_path):
os.remove(file_path)
total_files_removed += 1 # Increment the global variable
total_files_removed += 1
print(f"Usunięto plik: {file_path}")
log_to_file(log_file, f"Usunięto plik: {file_path}", config)
else:
Expand All @@ -91,7 +91,7 @@ def remove_files_based_on_condition(output_file, remove_condition, autoremove=Fa
try:
if os.path.exists(file_path):
os.remove(file_path)
total_files_removed += 1 # Increment the global variable
total_files_removed += 1
print(f"Usunięto plik: {file_path}")
log_to_file(log_file, f"Usunięto plik: {file_path}", config)
else:
Expand Down Expand Up @@ -123,7 +123,7 @@ def find_and_save_files(base_folder, output_file, pair_conditions, use_threadpoo
max_workers = multiprocessing.cpu_count()

start_time = time.time()
scanned_files_count = Counter() # Initialize the scanned files counter
scanned_files_count = Counter()

with tqdm(total=buffer_size) as progress_bar:
with executor_class(max_workers=max_workers) as executor:
Expand Down

0 comments on commit 2869147

Please sign in to comment.