Implement new re-transcoding API changes#1026
Merged
Merged
Conversation
Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com>
Contributor
There was a problem hiding this comment.
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.
subodhr258
approved these changes
Sep 8, 2025
Collaborator
|
Validated these items:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors how retranscoding requests are handled.
Retranscoding Job Handling
wp_media_transcoding(inclass-rtgodam-transcoder-handler.php) now checks for an existingrtgodam_transcoding_job_idand, if present, uses aPUTrequest to update the existing job instead of always creating a new one with aPOSTrequest. The API endpoint is also updated to include the job ID when updating. [1] [2] [3]class-transcoding.php) no longer deletes the existingrtgodam_transcoding_job_idbefore retranscoding, allowing the update logic to function as intended.ajax_process_retranscode_requestand its associatedwp_ajax_retranscodemediaaction have been removed fromclass-rtgodam-retranscodemedia.php, simplifying the retranscoding interface and removing duplicate logic. [1] [2]Related Issue