Skip to content

fix(AVO-4098): show subtitles after upload, align sub flow with original#35

Open
bertyhell wants to merge 2 commits into
developfrom
bugfix/AVO-4098-subtitle-show-after-upload
Open

fix(AVO-4098): show subtitles after upload, align sub flow with original#35
bertyhell wants to merge 2 commits into
developfrom
bugfix/AVO-4098-subtitle-show-after-upload

Conversation

@bertyhell

@bertyhell bertyhell commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

https://meemoo.atlassian.net/browse/AVO-4098

Rework some subtitle upload code to align more with how the flow was before the upgrades/speechmatics track, since subtitles worked there, but not in the latest version

some code in mediahaven_api.py has been removed, to use the original code in ftp_uploader.py

after uploading, ensure the route:
http://localhost:8080/item_subtitles/testbeeld/qszg6jq77n/closed
correctly serves a vtt version of the subtitles (content type text/vtt)

then load the subtitles into the flowplayer tracks

image

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reworks the subtitle upload/playback flow to better match the pre-upgrade behavior, aiming to ensure uploaded subtitles are available as VTT via /item_subtitles/... and are loaded into Flowplayer tracks.

Changes:

  • Switch subtitle upload from MediaHaven API upload logic to FTP-based upload via FtpUploader.
  • Serve VTT subtitles with an explicit text/vtt content type and update Flowplayer setup to load available subtitle track types.
  • Add a Docker named volume for subtitle_uploads and adjust test skip reasons for VCR/live MediaHaven dependency.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_app.py Updates skip reasons for tests that require live MediaHaven/VCR recording.
docker-compose.yml Adds a named volume for subtitle uploads (currently mounted to the wrong service; see comments).
docker-compose.develop.yml Mounts the subtitle uploads named volume in development.
app/templates/metadata/edit.html Builds Flowplayer subtitle tracks dynamically from available subtitle types.
app/services/mediahaven_api.py Removes API-based subtitle upload/delete methods in favor of FTP flow.
app/redactietool.py Sets VTT response content type; switches subtitle upload path to FtpUploader; removes /delete_subtitle route.
.gitignore Adds app/subtitle_uploads/ (and also AGENTS.md, which likely isn’t intended).
Comments suppressed due to low confidence (1)

app/redactietool.py:423

  • The /delete_subtitle endpoint was removed, but the UI still calls it when the user deletes an existing subtitle (see app/templates/metadata/sections/subtitle_section.html, fetch('/delete_subtitle', ...)). This will now 404 and leave the UI in a broken state. Either restore /delete_subtitle (and the underlying MediaHaven delete call) or update the frontend to remove/disable the delete action.
@app.route('/subtitle_files', methods=['GET'])
@login_required
def get_subtitle_files():
    pid = request.args.get('pid')
    department = request.args.get('department')


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker-compose.yml Outdated
Comment thread app/templates/metadata/edit.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants