From f88e332186ec8ed6086166b490bd444d2eeac9e9 Mon Sep 17 00:00:00 2001 From: DigiServer Developer Date: Wed, 26 Nov 2025 19:59:30 +0200 Subject: [PATCH] updated playlis version --- app/blueprints/content.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/blueprints/content.py b/app/blueprints/content.py index 7b4c4cd..82a7a26 100644 --- a/app/blueprints/content.py +++ b/app/blueprints/content.py @@ -583,6 +583,7 @@ def process_file_in_background(app, filepath: str, filename: str, file_ext: str, playlist.version += 1 db.session.commit() + cache.clear() if os.path.exists(filepath): os.remove(filepath) @@ -638,6 +639,7 @@ def process_file_in_background(app, filepath: str, filename: str, file_ext: str, playlist.version += 1 db.session.commit() + cache.clear() if os.path.exists(filepath): os.remove(filepath) @@ -681,6 +683,7 @@ def process_file_in_background(app, filepath: str, filename: str, file_ext: str, playlist.version += 1 db.session.commit() + cache.clear() _background_tasks[task_id] = {'status': 'complete', 'message': f'{filename} processed successfully!'} log_action('info', f'Background: {filename} processed successfully') else: @@ -1059,7 +1062,7 @@ def upload_media(): # Increment playlist version if pages were added if playlist_id and page_files: - playlist.version += 1 + playlist.increment_version() # Delete original PDF file if os.path.exists(filepath): @@ -1118,7 +1121,7 @@ def upload_media(): # Increment playlist version if slides were added if playlist_id and slide_files: - playlist.version += 1 + playlist.increment_version() # Delete original PPTX file if os.path.exists(filepath): @@ -1167,7 +1170,7 @@ def upload_media(): db.session.execute(stmt) # Increment playlist version - playlist.version += 1 + playlist.increment_version() uploaded_count += 1