Skip to main content

## resume_queued_downloads

# Function resume_queued_downloads

Source

    pub async fn resume_queued_downloads(
        repository: State<'_, RepositoryManagerWrapper>,
        db: State<'_, DatabaseWrapper>,
        download_manager: State<'_, DownloadManagerWrapper>,
        app: AppHandle,
        handle: String,
    ) -> Result<ResumeQueuedResult, String>

Expand description

Resolve the stream URL for every download row that was queued while offline (`status = 'pending' AND stream_url IS NULL`), then pump the queue so they start. Call this on reconnect.

Audio rows resolve via `get_audio_stream_url`; video rows (media_type = ‘video’) via the pure `get_video_download_url` builder using the row’s stored `quality_preset` — mirroring `enqueue_video_downloads`. Rows whose URL can’t be resolved are left pending (they retry on the next reconnect).