mirror of
https://github.com/glomatico/gamdl.git
synced 2026-06-13 20:25:13 +03:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 091ca3bf53 | |||
| e4498e11c0 | |||
| 5a8c5d2c25 |
+1
-1
@@ -1 +1 @@
|
||||
__version__ = "2.3"
|
||||
__version__ = "2.3.1"
|
||||
|
||||
+15
-10
@@ -266,15 +266,19 @@ class Downloader:
|
||||
self,
|
||||
tags: dict,
|
||||
):
|
||||
template_folder = self.template_file_playlist.split("/")[0:-1]
|
||||
template_file = self.template_file_playlist.split("/")[-1]
|
||||
template_folder = self.template_file_playlist.split("/")
|
||||
template_file = self.template_file_playlist.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) + ".m3u8"]
|
||||
*[
|
||||
self.get_sanitized_string(template_final[-1].format(**tags), False)
|
||||
+ ".m3u8"
|
||||
]
|
||||
)
|
||||
|
||||
def update_playlist_file(
|
||||
@@ -384,22 +388,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
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user