Expand description
Tauri commands for download operations
Re-exports§
pub use pinning::*;pub use smart_cache::*;
Modules§
- pinning 🔒
- Pinning commands - protect an item’s cached metadata from cache clearing.
- smart_
cache 🔒 - Smart-cache statistics/config and album recommendation commands.
Structs§
- Album
Storage Info - Storage info for a single album
- Album
Track 🔒 - One track of an album, as the album-download path queues it.
- Download
Item AndStart Request - Request payload for download_item_and_start (bundled to stay within specta’s 10-argument command limit).
- Download
Item Request - Request payload for download_item.
- Download
Manager Stats - Download manager statistics
- Download
Manager Wrapper - Wrapper for DownloadManager to be used as Tauri state
- Download
Stats - Download statistics computed server-side
- Download
Video Request - Request payload for download_video.
- Downloads
Response - Enhanced response with pre-computed stats
- Network
State Wrapper - Wrapper for the current network transport, used by the WiFi-only gate.
- Network
State Wrapper Arg - Argument struct for
set_network_state. - Storage
Stats - Storage statistics for downloads
Functions§
- album_
file_ 🔒names - Queue one download row per track and link every track to its album.
- cached_
album_ 🔒tracks - The album’s tracks as the local catalog cache knows them.
- cancel_
download - Cancel a download
- clear_
stale_ downloads - Clear all stale pending/failed/paused downloads
- compute_
download_ 🔒stats - Helper to compute download statistics from a list of downloads
- confine_
queued_ 🔒path - Sanitize a queued download’s path and confine it to the download directory.
- confine_
to_ 🔒root - Fold
..out ofcandidateand require what is left to sit insideroot. - delete_
album_ downloads - Delete all downloads for a specific album
- delete_
all_ downloads - Delete all downloads for a user
- delete_
download - Delete a completed download
- delete_
downloads_ under - Remove every completed download at or under a container item.
- download_
album - Queue an entire album for download.
- download_
item - Queue a media item for download
- download_
item_ and_ start - Queue and start a download in a single atomic operation This simplifies the frontend flow by combining multiple steps
- download_
root 🔒 - The directory every download has to stay inside: the storage root
storage_get_pathhands the frontend, which is the database’s parent. - download_
season - Queue all episodes of a specific season for download
- download_
series - Queue all episodes of a series for download
- download_
video - Queue a video item (movie or episode) for download with quality preset
- downloads_
allowed_ 🔒on_ current_ network - Whether the current network permits downloads, given the user’s WiFi-only preference.
- enqueue_
download - Enqueue a download with its resolved stream URL, then let the queue pump start it (or a higher-priority pending item) when a slot is free.
- enqueue_
video_ downloads - Enqueue a batch of already-queued video downloads, resolving each one’s
transcode URL from the repository using the
quality_presetstored on the row. Then let the pump start them subject to the concurrency limit. - get_
download_ manager_ stats - Get download manager statistics
- get_
download_ storage_ stats - Get storage statistics for downloads
- get_
downloads - Get all downloads for a user, optionally filtered by status
- get_
downloads_ allowed - Whether downloads are currently permitted by the WiFi-only gate.
- map_
download_ 🔒row - Helper function to map database row to DownloadInfo
- mark_
download_ completed - Mark a download as completed
- mark_
download_ failed - Mark a download as failed
- pause_
download - Pause a download.
- pump_
download_ 🔒queue - Start as many pending downloads as there are free concurrency slots.
- queue_
album_ 🔒tracks - TRACES: UR-018, UR-055 | DR-173 | UT-170
- resume_
download - Resume a paused download.
- sanitize_
filename 🔒 - Sanitize filename by removing invalid characters
- set_
max_ concurrent_ downloads - Set the maximum concurrent downloads
- set_
network_ state - Report the device’s current network transport (Android → Rust).
- spawn_
download_ 🔒worker - Spawn the background worker for one download. On completion or failure it unregisters the slot, emits the terminal event, and pumps the queue so the next pending download starts automatically.
- start_
download - Start downloading a file immediately This command actually downloads the file using the worker
Type Aliases§
- Episode
Row 🔒 - One row of the series episode listing used when queueing a whole series:
(id, name, season_name, index_number, parent_index_number).