Skip to main content

## delete_downloads_under

# Function delete_downloads_under

Source

    pub async fn delete_downloads_under(
        db: State<'_, DatabaseWrapper>,
        item_id: String,
        user_id: String,
    ) -> Result<i64, String>

Expand description

Remove every completed download at or under a container item.

Works at any level of the Downloaded browse: a leaf (removes just that download), an album/season/series (removes all downloaded descendants linked via album_id/season_id/series_id/parent_id). Deletes the DB rows and the on-disk files. Returns the number of downloads removed. Idempotent.

TRACES: UR-055 | DR-083