🔶 add update_playlist route

This commit is contained in:
geoffrey45
2022-04-08 06:28:49 +03:00
parent 6cf9a58d6d
commit 0e946974a3
6 changed files with 101 additions and 18 deletions
+4 -11
View File
@@ -13,27 +13,20 @@ def create_config_dir() -> None:
_home_dir = os.path.expanduser("~")
config_folder = os.path.join(_home_dir, settings.CONFIG_FOLDER)
print(config_folder)
dirs = [
"",
"images",
os.path.join("images", "artists"),
os.path.join("images", "thumbnails"),
os.path.join("images", "playlists"),
]
for _dir in dirs:
path = os.path.join(config_folder, _dir)
exists = os.path.exists(path)
try:
os.path.exists(path)
except FileNotFoundError:
if not exists:
os.makedirs(path)
os.chmod(path, 0o755)
if _dir == dirs[3]:
default_thumbnails_path = "../setup/default-images/thumbnails"
try:
os.path.exists(os.path.join(path, "defaults"))
except FileNotFoundError:
pass