diff --git a/scraper.py b/scraper.py index bcb83aa..12f617a 100755 --- a/scraper.py +++ b/scraper.py @@ -44,6 +44,7 @@ def copy_file(track: Track, targetFolder) -> str: copyfile(path, dst) else: print('File {0} not found.') + return None return dst def tag_file(track: Track, file_name: str): @@ -95,7 +96,8 @@ def main(): for t in tracks: new_file = copy_file(t, args.target) - tag_file(t, new_file) + if new_file is not None: + tag_file(t, new_file) if __name__ == "__main__": main()