From 26e36ba36f1545720908e46a8304fb588ce1c688 Mon Sep 17 00:00:00 2001 From: mungai-njoroge Date: Mon, 28 Aug 2023 13:16:12 +0300 Subject: [PATCH] add thumbnails lg path to be removed in migration --- app/migrations/v1_3_0/__init__.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/migrations/v1_3_0/__init__.py b/app/migrations/v1_3_0/__init__.py index 2fd8078..27648fd 100644 --- a/app/migrations/v1_3_0/__init__.py +++ b/app/migrations/v1_3_0/__init__.py @@ -34,12 +34,15 @@ class RemoveSmallThumbnailFolder(Migration): @staticmethod def migrate(): - path = Paths.get_sm_thumb_path() + thumbs_sm_path = Paths.get_sm_thumb_path() + thumbs_lg_path = Paths.get_lg_thumb_path() - if os.path.exists(path): - shutil.rmtree(path) + for path in [thumbs_sm_path, thumbs_lg_path]: + if os.path.exists(path): + shutil.rmtree(path) - os.mkdir(path) + for path in [thumbs_sm_path, thumbs_lg_path]: + os.makedirs(path, exist_ok=True) class RemovePlaylistArtistHashes(Migration): @@ -299,4 +302,4 @@ class UpdateAppSettingsTable(Migration): with SQLiteManager(userdata_db=True) as cur: cur.execute(drop_table_sql) - cur.execute(create_table_sql) \ No newline at end of file + cur.execute(create_table_sql)