Skip to main content

## requeue_mistyped_video_downloads

# Function requeue_mistyped_video_downloads

Source

    pub(crate) async fn requeue_mistyped_video_downloads(
        db_service: &Arc<RusqliteService>,
    ) -> Result<usize, String>

Expand description

Requeue video downloads that were fetched as audio.

Before `resolve_pending_download_urls` consulted the item’s type, a row with no `media_type` — which is every row queued from a media card, since `download_item` does not record one — resolved against `get_audio_stream_url`. A movie queued that way completed with an audio-only transcode on disk, so playing it offline could only ever fail. Those rows are identifiable after the fact (no `media_type`, but a video item), so reset them to pending with no URL and let the resolver fetch the real video.

Rows carrying an explicit `media_type` were resolved correctly and are left alone, as are genuine audio downloads.

Returns the number of rows requeued.

TRACES: UR-071 | DR-136 | UT-126