4 Commits

Author SHA1 Message Date
Ritiek Malhotra
d53a6ea471 Add changelog entry for 2aa7dce4a4 2020-05-20 12:55:37 +05:30
Ritiek Malhotra
c1b3949edb Disable logs from chardet 2020-05-20 12:32:21 +05:30
Ritiek Malhotra
6288e3c6e5 Prepare for v2.0.5 2020-05-20 12:21:20 +05:30
Ritiek Malhotra
2aa7dce4a4 Derive download directory from filename itself
In some cases when using `-f` to create sub-directories from metadata,
where the full slugified download filename and the non-slugified
download directory happen to differ, the download would fail. This
happens because the directory the track needs to be downloaded doesn't
get created.

With this, the download directory will now be derived from filename
itself so that the sub-directory name always overlaps.

Fixes #727.
2020-05-20 12:19:13 +05:30
4 changed files with 16 additions and 12 deletions

View File

@@ -8,6 +8,19 @@ The release dates mentioned follow the format `DD-MM-YYYY`.
## [Unreleased]
## [2.0.5] - 20-05-2020
### Fixed
- In some cases when using `-f` to create sub-directories from metadata, where the
full slugified download filename and the non-slugified download directory happen
to differ, the download would fail. The download directory will now be derived from
filename itself so that the sub-directory name always overlaps.
([@ritiek](https://github.com/ritiek/spotify-downloader))
(2aa7dce4a42feb5cd3ceb9324e58da524cdb4b6f)
### Changed
- Disable unneeded logs from `chardet`. ([@ritiek](https://github.com/ritiek))
(c1b3949edb943cc21a63c34d6a01ed59e9b6536d)
## [2.0.4] - 19-05-2020
### Fixed
- Do not remove the currently downloading track from file on `KeyboardInterrupt`

View File

@@ -9,7 +9,7 @@ from spotdl.command_line.exceptions import ArgumentError
# hardcode loglevel for dependencies so that they do not spew generic
# log messages along with spotdl.
for module in ("urllib3", "spotipy", "pytube"):
for module in ("chardet", "urllib3", "spotipy", "pytube"):
logging.getLogger(module).setLevel(logging.CRITICAL)
coloredlogs.DEFAULT_FIELD_STYLES = {

View File

@@ -261,16 +261,7 @@ class Spotdl:
if not self.arguments["no_metadata"]:
metadata["lyrics"].start()
filter_space_chars = self.output_filename_filter(not self.arguments["no_spaces"])
directory = os.path.dirname(
spotdl.metadata.format_string(
self.arguments["output_file"],
metadata,
output_extension=output_extension,
sanitizer=filter_space_chars
)
)
os.makedirs(directory or ".", exist_ok=True)
os.makedirs(os.path.dirname(filename) or ".", exist_ok=True)
logger.info('Downloading to "{filename}"'.format(filename=filename))
if self.arguments["no_encode"]:

View File

@@ -1,2 +1,2 @@
__version__ = "2.0.4"
__version__ = "2.0.5"