Skip to content

feat: add core:audio2text:subtitles task type, register file action#577

Open
edward-ly wants to merge 2 commits into
mainfrom
feat/noid/subtitles-file-action
Open

feat: add core:audio2text:subtitles task type, register file action#577
edward-ly wants to merge 2 commits into
mainfrom
feat/noid/subtitles-file-action

Conversation

@edward-ly

@edward-ly edward-ly commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Registers a file action and adds support for the new core:audio2text:subtitles task type. The OCP\TaskProcessing\TaskTypes\AudioToTextSubtitles class is imported conditionally to maintain compatibility with NC versions older than 35.

To Fix

  • This does not seem to have any adverse affect on the tasks themselves, but when opening finished subtitles tasks, the browser currently reports a few errors in the console such as GET https://nextcloud.local/ocs/v2.php/apps/assistant/api/v1/file/104/info returning a 404 status.

Limitations

Currently, the Save this media button for output files automatically appends the .srt extension for .srt files, but not for .vtt files. This seems to be a limitation of the PHP Mimey package as it doesn't recognize the text/vtt MIME type.

By contrast, the Download this media button automatically appends the .vtt extension for .vtt files, but not for .srt files for me. Since the browser/OS looks to be doing the MIME type to extension conversion at that point, I'm not sure if there's anything we can do there.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@edward-ly edward-ly force-pushed the feat/noid/subtitles-file-action branch 2 times, most recently from 43ab519 to 5284315 Compare June 17, 2026 00:50
@edward-ly edward-ly force-pushed the feat/noid/subtitles-file-action branch 2 times, most recently from 1f404c4 to 83024f3 Compare June 17, 2026 01:49
@edward-ly edward-ly marked this pull request as ready for review June 18, 2026 15:51
@edward-ly

Copy link
Copy Markdown
Contributor Author

Question: do we want to try to maintain compatibility with NC 33 on the main branch, or is it OK to bump min-version up to 35 and remove class_exists and other checks accordingly?

@edward-ly edward-ly requested review from janepie and marcelklehr June 18, 2026 15:56
@edward-ly edward-ly force-pushed the feat/noid/subtitles-file-action branch from 83024f3 to 7bddb9c Compare June 19, 2026 00:14
@julien-nc julien-nc force-pushed the feat/noid/subtitles-file-action branch from 7bddb9c to b803865 Compare June 24, 2026 10:31
…will get in nextcloud/ocp soon

use php 8.3 in phpunit action

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc julien-nc force-pushed the feat/noid/subtitles-file-action branch from b803865 to 4e51314 Compare June 24, 2026 10:40
@julien-nc

Copy link
Copy Markdown
Member

I hope you don't mind, I added some changes

  • Rebased on main
  • Ignore the missing task type class error, it will come in nextcloud/ocp and there are some class_exists checks.
  • Use php 8.3 in phpunit action because NC 35 dropped support for 8.2

do we want to try to maintain compatibility with NC 33 on the main branch, or is it OK to bump min-version up to 35 and remove class_exists and other checks accordingly?

It is quite convenient to keep the compatibility with the last 2 or 3 NC versions. If we find a serious bug, we can publish one single release for all the supported NC versions. IMHO let's keep the compatibility with 33 for now.

@julien-nc julien-nc self-requested a review June 24, 2026 10:45
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