mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
🔶 add update_playlist route
This commit is contained in:
+4
-11
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user