Skip to content

Vimeo Migration Hotfixes#1052

Merged
subodhr258 merged 3 commits into
mainfrom
hotfix/vimeo-issues
Sep 8, 2025
Merged

Vimeo Migration Hotfixes#1052
subodhr258 merged 3 commits into
mainfrom
hotfix/vimeo-issues

Conversation

@subodhr258
Copy link
Copy Markdown
Collaborator

@subodhr258 subodhr258 commented Sep 5, 2025

Fixes

1. GoDAM Central (Virtual Media) Logo now appears for Vimeo Migrated Videos:

Screenshot 2025-09-05 at 9 56 26 PM

2. Same videos migrated from Vimeo in subsequent migrations will not create duplicate attachments in Media Library.

3. Fixed fatal error when Vimeo Migration is in progress on Central

Before:
Screenshot 2025-09-07 at 5 17 00 PM

After:

Screen.Recording.2025-09-07.at.5.18.10.PM.mov

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 PR fixes two issues with Vimeo video migration: ensuring the GoDAM Central (Virtual Media) logo appears for migrated Vimeo videos and preventing duplicate attachments when the same video is migrated multiple times.

  • Refactored video metadata update logic into a reusable method to handle both new and existing attachments
  • Added duplicate prevention by checking for existing attachments using job IDs before creating new ones
  • Updated attachment metadata handling to save job IDs for proper tracking

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

Comment thread inc/classes/rest-api/class-video-migration.php
Comment thread inc/classes/rest-api/class-video-migration.php
@subodhr258 subodhr258 changed the title fix: Virtual Media Logo and Duplicate Vimeo imports Vimeo Migration Hotfixes Sep 7, 2025
$status = $godam_migration_status['message']['migration_status'];
if ( 'Completed' !== $status ) {
// Reset migration status since Central migration is not completed.
delete_option( $wp_option_key );
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What happens if migration is already done, and the user tries to run the migration a second time?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

If user tries to run the migration a second time, there are two cases:

  1. If the migration stayed as "Completed" on Central, then this condition won't happen, the status will not be deleted.
  2. If the migration on central is in progress or it returns failed state or error, then this status will be deleted.

@subodhr258 subodhr258 merged commit cfa113a into main Sep 8, 2025
5 checks passed
@subodhr258 subodhr258 deleted the hotfix/vimeo-issues branch September 8, 2025 05:27
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