From e130c7403cc92096c20b42f7c459868a31835b85 Mon Sep 17 00:00:00 2001 From: Markos Gogoulos Date: Mon, 9 Mar 2026 19:58:14 +0200 Subject: [PATCH] py --- cms/version.py | 2 +- files/views/media.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cms/version.py b/cms/version.py index ab008357..8ae6c405 100644 --- a/cms/version.py +++ b/cms/version.py @@ -1 +1 @@ -VERSION = "8.0" +VERSION = "8.12" diff --git a/files/views/media.py b/files/views/media.py index de922fa1..1e1e7b95 100644 --- a/files/views/media.py +++ b/files/views/media.py @@ -35,6 +35,7 @@ from ..methods import ( ) from ..models import ( Category, + Comment, EncodeProfile, Media, MediaPermission, @@ -302,6 +303,7 @@ class MediaBulkUserActions(APIView): enum=[ "enable_comments", "disable_comments", + "delete_comments", "delete_media", "enable_download", "disable_download", @@ -386,6 +388,10 @@ class MediaBulkUserActions(APIView): media.update(enable_comments=False) return Response({"detail": f"Comments disabled for {media.count()} media items"}) + elif action == "delete_comments": + deleted_count, _ = Comment.objects.filter(media__in=media).delete() + return Response({"detail": f"{deleted_count} comments deleted"}) + elif action == "delete_media": count = media.count() media.delete()