Open wolfemir opened 1 week ago
This pull request introduces a new Alembic migration script that adds pause functionality to the MediaItem
table, including three new columns: is_paused
, paused_at
, and paused_by
. It modifies the MediaItem
class to incorporate these attributes and adds methods for pausing and unpausing media items. Additionally, the process_event
function in the state transition module is updated to skip processing paused items. New API endpoints and response models are created to manage pause and unpause operations for media items.
File Path | Change Summary |
---|---|
src/alembic/versions/20241114_1400_c99239e3445f_add_pause_functionality.py |
Added migration script with new columns is_paused , paused_at , paused_by , and an index on is_paused . |
src/program/media/item.py |
Modified MediaItem class to include is_paused and paused_at attributes; added pause and unpause methods. |
src/program/state_transition.py |
Updated process_event function to skip processing for paused items and refine logic for handling various item states. |
src/routers/secure/items.py |
Introduced new response models and endpoints for pausing/unpausing media items and retrieving pause states and counts. |
In the burrow where the media flows,
A pause was added, as everyone knows.
With a hop and a skip, we now can say,
"Pause and unpause, let's play today!"
🐇✨
New states to track, like a dance in the night,
Media's now managed, all snug and tight!
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@Gaisberg i have removed the rest in state transition, please let me know if anything else need to be changed
@Gaisberg i have removed the rest in state transition, please let me know if anything else need to be changed
Please squash and amend the commit message to follow conventional commits
feat: Add media item pause functionality with FastAPI endpoints
Implement comprehensive pause/unpause API endpoints for media item processing control.
API Endpoints:
Response Models:
Features:
Database Changes:
Breaking changes: None Migration: Required (adds new columns to MediaItem table)
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
These updates improve user control over media processing and streamline interactions with the system.