diff options
Diffstat (limited to 'tidal_dl_ng')
| -rw-r--r-- | tidal_dl_ng/download.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tidal_dl_ng/download.py b/tidal_dl_ng/download.py index 6679371..ceec5c5 100644 --- a/tidal_dl_ng/download.py +++ b/tidal_dl_ng/download.py @@ -468,14 +468,20 @@ class Download: # Move item and symlink it if path_media_dst != path_media_src: if self.skip_existing: - skip_file: bool = check_file_exists(path_media_dst, extension_ignore=True) + skip_file: bool = check_file_exists(path_media_dst, extension_ignore=False) + skip_symlink: bool = path_media_src.is_symlink() else: skip_file: bool = False + skip_symlink: bool = False if not skip_file: + self.fn_logger.debug(f"Move: {path_media_src} -> {path_media_dst}") shutil.move(path_media_src, path_media_dst) - os.symlink(path_media_dst, path_media_src) + if not skip_symlink: + self.fn_logger.debug(f"Symlink: {path_media_src} -> {path_media_dst}") + path_media_src.unlink(missing_ok=True) + path_media_src.symlink_to(path_media_dst) return path_media_dst @@ -712,6 +718,8 @@ class Download: path_playlist = dir_scoped / (PLAYLIST_PREFIX + name_list + PLAYLIST_EXTENSION) path_playlist = pathlib.Path(path_file_sanitize(path_playlist, adapt=True)) + self.fn_logger.debug(f"Playlist: Creating {path_playlist}") + # Get all tracks in the directory path_tracks: [pathlib.Path] = [] |
