From 5a8c5d2c25f5fa3d647988a0df8861ce1ae10522 Mon Sep 17 00:00:00 2001 From: Rafael Moraes <50295204+glomatico@users.noreply.github.com> Date: Sat, 3 Aug 2024 14:13:38 -0300 Subject: [PATCH] fix `get_final_path` --- gamdl/downloader.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gamdl/downloader.py b/gamdl/downloader.py index c11836c..e802178 100644 --- a/gamdl/downloader.py +++ b/gamdl/downloader.py @@ -384,22 +384,23 @@ class Downloader: self.template_folder_compilation.split("/") if tags.get("compilation") else self.template_folder_album.split("/") - )[0:-1] + ) template_file = ( self.template_file_multi_disc.split("/") if tags["disc_total"] > 1 else self.template_file_single_disc.split("/") - )[-1] + ) else: - template_folder = self.template_folder_no_album.split("/")[0:-1] - template_file = self.template_file_no_album.split("/")[-1] + template_folder = self.template_folder_no_album.split("/") + template_file = self.template_file_no_album.split("/") + template_final = template_folder + template_file return self.output_path.joinpath( *[ self.get_sanitized_string(i.format(**tags), True) - for i in template_folder + for i in template_final[0:-1] ] ).joinpath( - self.get_sanitized_string(template_file.format(**tags), False) + self.get_sanitized_string(template_final[-1].format(**tags), False) + file_extension )