Cloud Sync
Synchronize bookmarks across devices using Google Drive or Dropbox
Cloud Sync
Keep your bookmarks synchronized across multiple devices using cloud storage providers.
Overview
Cloud Sync allows you to:
- Backup bookmarks to cloud storage
- Sync bookmarks across multiple Macs
- Restore bookmarks from cloud backups
- Merge local and cloud bookmarks intelligently
Supported Providers
Google Drive Setup
- Open the Cloud Sync dialog in the sidebar
- Select Google Drive as your provider
- Click Authenticate
- Follow OAuth flow to grant access
- Enter your access token
Requirements:
- Google account
- OAuth 2.0 access token with Drive API scope
https://www.googleapis.com/auth/drive.filepermission
The plugin stores bookmarks in an app-specific folder, isolated from your other Drive files.
Dropbox Setup
- Open the Cloud Sync dialog in the sidebar
- Select Dropbox as your provider
- Click Authenticate
- Generate an access token from Dropbox App Console
- Enter your access token
Requirements:
- Dropbox account
- App access token with
files.content.writeandfiles.content.readscopes
Keep your access tokens secure. Never share them publicly or commit them to version control.
Sync Operations
Upload
Upload your local bookmarks to cloud storage:
- Click Cloud Sync in the sidebar
- Select your provider and authenticate
- Choose Upload action
- Click Sync
Result: Local bookmarks are uploaded to cloud storage. Existing cloud backup is overwritten.
Download
Download bookmarks from cloud storage:
- Click Cloud Sync in the sidebar
- Select your provider and authenticate
- Choose Download action
- Click Sync
Result: Cloud bookmarks are displayed but not automatically merged with local. Review before importing.
Sync (Merge)
Intelligently merge local and cloud bookmarks:
- Click Cloud Sync in the sidebar
- Select your provider and authenticate
- Choose Sync action
- Click Sync
Result: Local and cloud bookmarks are merged with conflict resolution.
Conflict Resolution
When syncing, the plugin detects conflicts based on filepath + timestamp matching.
Conflict Handling
- Same content → Keep one copy
- Different content → Keep both with conflict markers
- Local only → Add to merged result
- Cloud only → Add to merged result
Conflicts are marked with:
{
"title": "Bookmark Title [CONFLICT]",
"description": "⚠️ Merged from cloud sync conflict",
// ... other fields
}Review conflict-marked bookmarks after sync and manually resolve by editing or deleting duplicates.
Sync Statistics
After each sync operation, the UI displays:
- Added - New bookmarks merged from cloud
- Updated - Existing bookmarks modified
- Conflicts - Number of conflicts detected
- Total - Final bookmark count
Backup Format
Bookmarks are stored in cloud as JSON files:
{
"bookmarks": [
{
"id": "abc123",
"title": "Important Scene",
"timestamp": 125.5,
"filepath": "/path/to/video.mp4",
"description": "Key plot point",
"tags": ["plot", "important"],
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
],
"metadata": {
"version": "1.0.0",
"timestamp": "2024-01-15T10:30:00Z",
"deviceId": "unique-device-id",
"bookmarkCount": 1
}
}Concurrency Protection
Cloud sync operations include safety mechanisms:
Sync Lock
- Only one sync operation can run at a time
- Prevents race conditions and data corruption
- Displays error if sync already in progress
Timeout Protection
- Operations timeout after 60 seconds
- Prevents hanging on network issues
- Automatically releases sync lock on timeout
If a sync operation times out, check your internet connection and try again.
Security Considerations
Data Transmission
- All cloud connections use HTTPS only
- Access tokens are stored in IINA's secure preferences
- No credentials are logged or transmitted to third parties
File Validation
- Filenames are validated to prevent path traversal
- Only alphanumeric characters, dashes, underscores, and dots allowed
- Dropbox paths are sanitized to remove
../sequences
Access Scopes
- Google Drive: Limited to app-created files only
- Dropbox: Limited to app folder (not full Dropbox access)
Best Practices
Regular Backups
- Sync before major changes (e.g., bulk imports)
- Keep local backups via Export
- Test restore process periodically
Multiple Devices
- Sync on each device before editing
- Avoid simultaneous edits on different devices
- Review conflicts carefully before resolving
Token Management
- Rotate access tokens periodically
- Revoke tokens for unused devices
- Use OAuth refresh tokens when available
Troubleshooting
Authentication Failed
Cause: Invalid or expired access token
Solution:
- Generate new access token from provider console
- Re-authenticate in Cloud Sync dialog
- Ensure correct scopes/permissions
Sync Timeout
Cause: Slow network or large bookmark collection
Solution:
- Check internet connection
- Try uploading/downloading instead of sync
- Reduce bookmark count via export/delete
Conflicts After Every Sync
Cause: Timestamps may differ slightly between devices
Solution:
- Manually resolve conflicts once
- Perform full upload from primary device
- Download (don't sync) on other devices
No Backups Found
Cause: No previous uploads to cloud
Solution:
- Perform Upload operation first
- Check provider console to verify file was created
- Ensure authentication was successful
API Reference
For developers, see: