Skip to content

Implement new re-transcoding API changes#1026

Merged
subodhr258 merged 6 commits into
mainfrom
fix/video-retranscoding
Sep 8, 2025
Merged

Implement new re-transcoding API changes#1026
subodhr258 merged 6 commits into
mainfrom
fix/video-retranscoding

Conversation

@KMchaudhary
Copy link
Copy Markdown
Collaborator

@KMchaudhary KMchaudhary commented Sep 2, 2025

This pull request refactors how retranscoding requests are handled.

Retranscoding Job Handling

  • The logic in wp_media_transcoding (in class-rtgodam-transcoder-handler.php) now checks for an existing rtgodam_transcoding_job_id and, if present, uses a PUT request to update the existing job instead of always creating a new one with a POST request. The API endpoint is also updated to include the job ID when updating. [1] [2] [3]
  • The REST API retranscoding endpoint (class-transcoding.php) no longer deletes the existing rtgodam_transcoding_job_id before retranscoding, allowing the update logic to function as intended.
  • The AJAX handler method ajax_process_retranscode_request and its associated wp_ajax_retranscodemedia action have been removed from class-rtgodam-retranscodemedia.php, simplifying the retranscoding interface and removing duplicate logic. [1] [2]

Related Issue

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request refactors retranscoding requests to use a PUT/POST pattern for updating existing jobs rather than always creating new ones, and removes the AJAX handler for retranscoding.

  • Replaces job creation logic with conditional PUT/POST based on existing job ID
  • Removes deletion of transcoding job ID to allow job updates
  • Eliminates duplicate AJAX handler for retranscoding requests

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
inc/classes/rest-api/class-transcoding.php Removes deletion of transcoding job ID to preserve it for updates
admin/class-rtgodam-transcoder-handler.php Updates transcoding logic to use PUT for existing jobs and POST for new ones
admin/class-rtgodam-retranscodemedia.php Removes AJAX handler and associated action hook for retranscoding

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@KMchaudhary KMchaudhary marked this pull request as draft September 2, 2025 12:05
@KMchaudhary KMchaudhary marked this pull request as ready for review September 3, 2025 12:28
@subodhr258 subodhr258 changed the base branch from develop to main September 3, 2025 12:34
@subodhr258 subodhr258 merged commit f528d66 into main Sep 8, 2025
5 checks passed
@subodhr258 subodhr258 deleted the fix/video-retranscoding branch September 8, 2025 04:53
@subodhr258
Copy link
Copy Markdown
Collaborator

Validated these items:

  • Normal Transcoding with status should work
  • reTranscoding should not update job Id and should show Transcoded status
  • reTranscoding with settings changed should imply that (Count of thumbnail (lets says initial video had 5 thumbnail re transcode after updating count to 7, after re transcode count should be 7), logo, custom thumbnails)
  • Status should have proper progress bar
  • Check comment retention after re-transcoding
  • Check AI Transcript retention after re-transcoding

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.

3 participants