Skip to content

Commit

Permalink
Invaild cross-device link issue resolved (#376)
Browse files Browse the repository at this point in the history
* Update of .gitignore

* os.rename exchanged against commands which are safe for cross devide links

---------

Co-authored-by: Sathyajith Bhat <[email protected]>
  • Loading branch information
marco-sorich and SathyaBhat authored Jul 5, 2024
1 parent 934b6ee commit e05d9e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ unins
.coverage
.vscode/**
.venv/*
.cache

# macOS temporary files
.DS_Store
4 changes: 3 additions & 1 deletion spotify_dl/youtube.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import urllib.request
from os import path
import os
import shutil
import multiprocessing

import json
Expand Down Expand Up @@ -334,7 +335,8 @@ def download_songs(**kwargs):
log.debug("Downloading to %s", url["save_path"])
reference_file = DOWNLOAD_LIST
track_db = write_tracks(reference_file, kwargs["songs"])
os.rename(reference_file, kwargs["output_dir"] + "/" + reference_file)
shutil.copy(reference_file, kwargs["output_dir"] + "/" + reference_file)
os.remove(reference_file)
reference_file = str(kwargs["output_dir"]) + "/" + reference_file
kwargs["reference_file"] = reference_file
kwargs["track_db"] = track_db
Expand Down

0 comments on commit e05d9e4

Please sign in to comment.