Added logging e outputs

This commit is contained in:
Fabio Scotto di Santolo
2024-10-25 10:19:51 +02:00
parent de6138870d
commit dd01ddb5cf
3 changed files with 12 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ def arg_parser():
async def main(src, dst) -> Any:
for song_file in scan_folder(src):
if accepted_file_type(song_file):
print(f"Found file {song_file}")
track_info = await search_song(song_file)
logging.info(f"Recognize file {song_file} as {track_info}")
album_path: str = os.path.join(dst, track_info.artist,
@@ -32,6 +33,8 @@ async def main(src, dst) -> Any:
# I can copy to file now
shutil.copy(song_file,
os.path.join(album_path, f"{track_info.track_number} - {track_info.title}.mp3"))
else:
print(f"Skipped file {song_file}")
if __name__ == '__main__':