Refactor video synchronization logic in `server/videoSync.ts` to utilize Drizzle ORM for all database interactions, replacing raw SQL queries for selecting, inserting, and updating video records. This change also includes adding default values for potentially missing video properties.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 45a1dcfc-f8a2-475a-a6b9-96fbb841dc27
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/60d372ff-2c10-46c7-b01b-10c3435136b0/45a1dcfc-f8a2-475a-a6b9-96fbb841dc27/pjFeepJ
Update BunnyService to include artist, filename, and episode details, and modify VideoSyncService to insert/update these new fields in the database, while also increasing the database sync timeout.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 636b67ca-6f18-4eb7-b992-168c6c8b7078
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Modify the `VideoSyncService` in `server/videoSync.ts` to insert new videos into the database with all required columns, including `content_type`, `genre`, and `upload_status`.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: d17a6e5e-0a8b-4a50-b346-88bffd02af01
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Implement robust error handling and directory creation for video uploads, enhance file validation with MIME type checking, and adjust database sync timeout for improved reliability.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 70557b10-8a46-4f62-9cec-2397b6c48e73
Replit-Commit-Checkpoint-Type: full_checkpoint
Refactor server-side video retrieval logic to first check local cache via `videoSyncService.getVideos` and `videoSyncService.getVideo`, falling back to `bunnyService.getVideo` only if cache misses. This change removes database merging logic from `videoSyncService` and integrates it into `BunnyStorage` when retrieving individual videos, optimizing data access.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 2cd2c0bc-434c-4bc9-ad3f-b99d3897a0d1
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2cd2c0bc-434c-4bc9-ad3f-b99d3897a0d1/DVlzRoR
Adjust the video synchronization service to correctly determine if more pages of videos exist by checking the total fetched count against the total available videos and the number of videos returned per page. A small delay is introduced between paginated requests to prevent potential rate limiting issues from the video source.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 2eb1084e-b728-4449-9231-f1665924c8d5
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2eb1084e-b728-4449-9231-f1665924c8d5/h92OTmA
Implement a paginated fetching mechanism for all videos from an external service and synchronize them to the PostgreSQL database, handling both new insertions and updates for existing video records.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 2eb1084e-b728-4449-9231-f1665924c8d5
Replit-Commit-Checkpoint-Type: full_checkpoint