Skip to main content

## create_media_item

# Function create_media_item

Source

    pub(super) async fn create_media_item(
        req: PlayItemRequest,
        db: Option<&DatabaseWrapper>,
    ) -> Result<MediaItem, String>

Expand description

Helper function to create MediaItem from video request

PlayItemRequest is now video-only, so we create a video MediaItem. Audio playback uses player_play_tracks which fetches full metadata from backend.