diff --git a/components/MusicTable.py b/components/MusicTable.py index fb8a803..c075b3e 100644 --- a/components/MusicTable.py +++ b/components/MusicTable.py @@ -545,8 +545,6 @@ class MusicTable(QTableView): threadpool.start(worker) else: logging.warning("Application window could not be found") - # add_files_to_library(files, progress_callback) - return def load_music_table(self, *playlist_id): """ diff --git a/utils/batch_delete_filepaths_from_database.py b/utils/batch_delete_filepaths_from_database.py index 48e4d9d..74d3c65 100644 --- a/utils/batch_delete_filepaths_from_database.py +++ b/utils/batch_delete_filepaths_from_database.py @@ -49,6 +49,7 @@ def batch_delete_filepaths_from_database( db.execute(query, chunk) if progress_callback: progress_callback.emit(f"Deleting songs: {i}") + except Exception as e: logging.error( f"batch_delete_filepaths_from_database.py | An error occurred during batch processing: {e}" diff --git a/utils/convert_date_str_to_tyer_tdat_id3_tag.py b/utils/convert_date_str_to_tyer_tdat_id3_tag.py index f168d5a..3191ee8 100644 --- a/utils/convert_date_str_to_tyer_tdat_id3_tag.py +++ b/utils/convert_date_str_to_tyer_tdat_id3_tag.py @@ -13,11 +13,7 @@ def convert_date_str_to_tyer_tdat_id3_tag(date_str) -> Tuple: match = re.match(r"(\d{4})[-/](\d{2})[-/](\d{2})", date_str) if not match: raise ValueError("Invalid date format") - # print(f"convert_date_str_to_tyer_tdat_id3_tag(): match: {match}") year, month, day = match.groups() - # print( - # f"convert_date_str_to_tyer_tdat_id3_tag(): month: {month} | day: {day} | year: {year}" - # ) # only year if not month or not day: # print(TYER(encoding=3, text=year)) diff --git a/utils/create_waveform_from_file.py b/utils/create_waveform_from_file.py index 8b89ce1..3525e1e 100644 --- a/utils/create_waveform_from_file.py +++ b/utils/create_waveform_from_file.py @@ -26,9 +26,8 @@ def create_waveform_from_file(file): start_index = 0 while start_index < len(audio_data): end_index = start_index + process_chunk_size - signal = audio_data[start_index:end_index].astype( - float - ) # Get chunk and convert to float + # Get chunk and convert to float + signal = audio_data[start_index:end_index].astype(float) # Take mean of absolute values per 0.5 seconds sub_waveform = np.nanmean(