diff --git a/orpheus/core.py b/orpheus/core.py index bed2ee8..4ad9c63 100644 --- a/orpheus/core.py +++ b/orpheus/core.py @@ -404,4 +404,7 @@ def orpheus_core_download(orpheus_session: Orpheus, media_to_download, third_par else: raise Exception(f'\tUnknown media type "{mediatype}"') - if os.path.exists('temp'): shutil.rmtree('temp') \ No newline at end of file + if os.path.isdir('temp') and not os.listdir('temp'): # Only if the temporary directory is empty + shutil.rmtree('temp') # Remove temporary directory + else: + print(f'=== The temporary folder is not empty ==={os.linesep}=== The temporary folder will not be deleted ==={os.linesep}=== Another instance of OrpheusDL is likely running ===')