Skip to content

Commit

Permalink
Fix opening directory on already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
justin025 committed Nov 8, 2024
1 parent a371ee9 commit a5b20fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/onthespot/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def run(self):
matching_files = [file for file in files_in_directory if file.startswith(base_file_path) and not file.endswith('.lrc')]

if matching_files:
item['file_path'] = os.path.join(file_directory, matching_files[0])
if self.gui:
if item['item_status'] in (
"Downloading",
Expand Down
1 change: 1 addition & 0 deletions src/onthespot/post_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ def convert_audio_format(filename, metadata, bitrate, default_format):
subprocess.check_call(command, shell=False, creationflags=subprocess.CREATE_NO_WINDOW)
else:
subprocess.check_call(command, shell=False)
os.remove(temp_name)
else:
raise FileNotFoundError

Expand Down

0 comments on commit a5b20fc

Please sign in to comment.