From f39de968c813191c16742637dc0aa548574d21f5 Mon Sep 17 00:00:00 2001
From: Markos Gogoulos
Date: Fri, 23 May 2025 11:32:38 +0300
Subject: [PATCH] changes
---
README.md | 1 +
cms/version.py | 2 +-
deploy/scripts/build_and_deploy.sh | 5 +++--
docs/user_docs.md | 9 +++++++--
files/forms.py | 18 +-----------------
5 files changed, 13 insertions(+), 22 deletions(-)
diff --git a/README.md b/README.md
index 45308015..a77de3e6 100644
--- a/README.md
+++ b/README.md
@@ -28,6 +28,7 @@ A demo is available at https://demo.mediacms.io
- **Multiple media types support**: video, audio, image, pdf
- **Multiple media classification options**: categories, tags and custom
- **Multiple media sharing options**: social media share, videos embed code generation
+- **Video Trimmer**: trim video, replace, save as new or create segments
- **Role-Based Access Control (RBAC)**: create RBAC categories and connect users to groups with view/edit access on their media
- **SAML support**: with ability to add mappings to system roles and groups
- **Easy media searching**: enriched with live search functionality
diff --git a/cms/version.py b/cms/version.py
index 762fa9c4..d8fc4261 100644
--- a/cms/version.py
+++ b/cms/version.py
@@ -1 +1 @@
-VERSION = "5.0.1"
+VERSION = "6.0.0"
diff --git a/deploy/scripts/build_and_deploy.sh b/deploy/scripts/build_and_deploy.sh
index 7023b7fb..53e6e387 100644
--- a/deploy/scripts/build_and_deploy.sh
+++ b/deploy/scripts/build_and_deploy.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+# This script builds the video editor package and deploys the frontend assets to the static directory.
# Exit on any error
set -e
@@ -13,7 +14,7 @@ cd ../../
# Run npm build in the frontend container
echo "Building frontend assets..."
-docker compose -f docker-compose/docker-compose-dev-updated.yaml exec frontend npm run dist
+docker compose -f docker-compose-dev.yaml exec frontend npm run dist
# Copy static assets to the static directory
echo "Copying static assets..."
@@ -21,6 +22,6 @@ cp -r frontend/dist/static/* static/
# Restart the web service
echo "Restarting web service..."
-docker compose -f docker-compose/docker-compose-dev-updated.yaml restart web
+docker compose -f docker-compose-dev.yaml restart web
echo "Build and deployment completed successfully!"
\ No newline at end of file
diff --git a/docs/user_docs.md b/docs/user_docs.md
index 8e8afb6f..da23f5a6 100644
--- a/docs/user_docs.md
+++ b/docs/user_docs.md
@@ -11,6 +11,7 @@
- [Share media](#share-media)
- [Embed media](#embed-media)
- [Customize my profile options](#customize-my-profile-options)
+- [Trim videos](#trim-videos)
## Uploading media
@@ -198,7 +199,7 @@ You can now watch the captions/subtitles play back in the video player - and tog
-## Using Timestamps for sharing
+## Using Timestamps for sharing
### Using Timestamp in the URL
@@ -240,7 +241,7 @@ Comments send with mentions will contain a link to the user page, and can be set
When enabled, comments including a timestamp will also be displayed in the current video Timebar as a little colorful dot. The comment can be previewed by hovering the dot (left image) and it will be displayed on top of the video when reaching the correct time (right image).
Only comments with correct timestamps formats (HH:MM:SS or MM:SS) will be picked up and appear in the Timebar.
-
+
@@ -257,3 +258,7 @@ How to use the embed media option
## Customize my profile options
Customize profile and channel
+
+## Trim videos
+Once a video is uploaded, you can trim it to create a new video or to replace the original one. You can also create segments of the video, which will be available as separate videos. Edit the video and click on the "Trime Video" option. If the original video has finished processing (encodings are created for all resolutions), then this is an action that runs instantly. If the original video hasn't processed, which is the case when you upload a video and edit it right away, then the trim action will trigger processing of the video and will take some time to finish. In all cases, you get to see the original video (or the trimmed versions) immediately, so you are sure of what you have uploaded or trimmed, with a message that the video is being processed.
+
diff --git a/files/forms.py b/files/forms.py
index 8a455516..5fb31687 100644
--- a/files/forms.py
+++ b/files/forms.py
@@ -99,13 +99,6 @@ class MediaPublishForm(forms.ModelForm):
help_text=""
)
- create_segments = forms.BooleanField(
- required=False,
- initial=False,
- label="Create segments from video chapters",
- help_text="If checked, separate media files will be created for each chapter"
- )
-
class Meta:
model = Media
fields = (
@@ -168,16 +161,6 @@ class MediaPublishForm(forms.ModelForm):
CustomField('allow_download'),
)
- # Only add create_segments field if the media has chapters
- if self.instance.media_type == 'video' and self.instance.chapters.exists():
- self.fields['create_segments'] = forms.BooleanField(
- required=False,
- initial=False,
- label="Create segments from video chapters",
- help_text="If checked, separate media files will be created for each chapter"
- )
- self.helper.layout.append(CustomField('create_segments'))
-
self.helper.layout.append(FormActions(Submit('submit', 'Publish Media', css_class='primaryAction')))
def clean(self):
@@ -192,6 +175,7 @@ class MediaPublishForm(forms.ModelForm):
# Make the confirm_state field visible and add it to the layout
self.fields['confirm_state'].widget = forms.CheckboxInput()
+ # add it after the state field
state_index = None
for i, layout_item in enumerate(self.helper.layout):
if isinstance(layout_item, CustomField) and layout_item.fields[0] == 'state':