Files
jellytau/api/jellytau_lib/commands/download/index.html
T

13 lines
17 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Tauri commands for download operations"><title>jellytau_lib::commands::download - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module download</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module download</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#functions" title="Functions">Functions</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In jellytau_<wbr>lib::<wbr>commands</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">commands</a></div><h1>Module <span>download</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/commands/download/mod.rs.html#1-3458">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Tauri commands for download operations</p>
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><dl class="item-table reexports"><dt><code>pub use <a class="mod" href="pinning/index.html" title="mod jellytau_lib::commands::download::pinning">pinning</a>::*;</code></dt><dt><code>pub use <a class="mod" href="smart_cache/index.html" title="mod jellytau_lib::commands::download::smart_cache">smart_cache</a>::*;</code></dt></dl><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="pinning/index.html" title="mod jellytau_lib::commands::download::pinning">pinning</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Pinning commands - protect an items cached metadata from cache clearing.</dd><dt><a class="mod" href="smart_cache/index.html" title="mod jellytau_lib::commands::download::smart_cache">smart_<wbr>cache</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Smart-cache statistics/config and album recommendation commands.</dd></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.AlbumStorageInfo.html" title="struct jellytau_lib::commands::download::AlbumStorageInfo">Album<wbr>Storage<wbr>Info</a></dt><dd>Storage info for a single album</dd><dt><a class="struct" href="struct.AlbumTrack.html" title="struct jellytau_lib::commands::download::AlbumTrack">Album<wbr>Track</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>One track of an album, as the album-download path queues it.</dd><dt><a class="struct" href="struct.DownloadItemAndStartRequest.html" title="struct jellytau_lib::commands::download::DownloadItemAndStartRequest">Download<wbr>Item<wbr>AndStart<wbr>Request</a></dt><dd>Request payload for download_item_and_start (bundled to stay within spectas
10-argument command limit).</dd><dt><a class="struct" href="struct.DownloadItemRequest.html" title="struct jellytau_lib::commands::download::DownloadItemRequest">Download<wbr>Item<wbr>Request</a></dt><dd>Request payload for download_item.</dd><dt><a class="struct" href="struct.DownloadManagerStats.html" title="struct jellytau_lib::commands::download::DownloadManagerStats">Download<wbr>Manager<wbr>Stats</a></dt><dd>Download manager statistics</dd><dt><a class="struct" href="struct.DownloadManagerWrapper.html" title="struct jellytau_lib::commands::download::DownloadManagerWrapper">Download<wbr>Manager<wbr>Wrapper</a></dt><dd>Wrapper for DownloadManager to be used as Tauri state</dd><dt><a class="struct" href="struct.DownloadStats.html" title="struct jellytau_lib::commands::download::DownloadStats">Download<wbr>Stats</a></dt><dd>Download statistics computed server-side</dd><dt><a class="struct" href="struct.DownloadVideoRequest.html" title="struct jellytau_lib::commands::download::DownloadVideoRequest">Download<wbr>Video<wbr>Request</a></dt><dd>Request payload for download_video.</dd><dt><a class="struct" href="struct.DownloadsResponse.html" title="struct jellytau_lib::commands::download::DownloadsResponse">Downloads<wbr>Response</a></dt><dd>Enhanced response with pre-computed stats</dd><dt><a class="struct" href="struct.NetworkStateWrapper.html" title="struct jellytau_lib::commands::download::NetworkStateWrapper">Network<wbr>State<wbr>Wrapper</a></dt><dd>Wrapper for the current network transport, used by the WiFi-only gate.</dd><dt><a class="struct" href="struct.NetworkStateWrapperArg.html" title="struct jellytau_lib::commands::download::NetworkStateWrapperArg">Network<wbr>State<wbr>Wrapper<wbr>Arg</a></dt><dd>Argument struct for <a href="fn.set_network_state.html" title="fn jellytau_lib::commands::download::set_network_state"><code>set_network_state</code></a>.</dd><dt><a class="struct" href="struct.StorageStats.html" title="struct jellytau_lib::commands::download::StorageStats">Storage<wbr>Stats</a></dt><dd>Storage statistics for downloads</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.album_file_names.html" title="fn jellytau_lib::commands::download::album_file_names">album_<wbr>file_<wbr>names</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Queue one download row per track and link every track to its album.</dd><dt><a class="fn" href="fn.cached_album_tracks.html" title="fn jellytau_lib::commands::download::cached_album_tracks">cached_<wbr>album_<wbr>tracks</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>The albums tracks as the local catalog cache knows them.</dd><dt><a class="fn" href="fn.cancel_download.html" title="fn jellytau_lib::commands::download::cancel_download">cancel_<wbr>download</a></dt><dd>Cancel a download</dd><dt><a class="fn" href="fn.clear_stale_downloads.html" title="fn jellytau_lib::commands::download::clear_stale_downloads">clear_<wbr>stale_<wbr>downloads</a></dt><dd>Clear all stale pending/failed/paused downloads</dd><dt><a class="fn" href="fn.compute_download_stats.html" title="fn jellytau_lib::commands::download::compute_download_stats">compute_<wbr>download_<wbr>stats</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Helper to compute download statistics from a list of downloads</dd><dt><a class="fn" href="fn.confine_queued_path.html" title="fn jellytau_lib::commands::download::confine_queued_path">confine_<wbr>queued_<wbr>path</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Sanitize a queued downloads path and confine it to the download directory.</dd><dt><a class="fn" href="fn.confine_to_root.html" title="fn jellytau_lib::commands::download::confine_to_root">confine_<wbr>to_<wbr>root</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Fold <code>..</code> out of <code>candidate</code> and require what is left to sit inside <code>root</code>.</dd><dt><a class="fn" href="fn.delete_album_downloads.html" title="fn jellytau_lib::commands::download::delete_album_downloads">delete_<wbr>album_<wbr>downloads</a></dt><dd>Delete all downloads for a specific album</dd><dt><a class="fn" href="fn.delete_all_downloads.html" title="fn jellytau_lib::commands::download::delete_all_downloads">delete_<wbr>all_<wbr>downloads</a></dt><dd>Delete all downloads for a user</dd><dt><a class="fn" href="fn.delete_download.html" title="fn jellytau_lib::commands::download::delete_download">delete_<wbr>download</a></dt><dd>Delete a completed download</dd><dt><a class="fn" href="fn.delete_downloads_under.html" title="fn jellytau_lib::commands::download::delete_downloads_under">delete_<wbr>downloads_<wbr>under</a></dt><dd>Remove every completed download at or under a container item.</dd><dt><a class="fn" href="fn.download_album.html" title="fn jellytau_lib::commands::download::download_album">download_<wbr>album</a></dt><dd>Queue an entire album for download.</dd><dt><a class="fn" href="fn.download_item.html" title="fn jellytau_lib::commands::download::download_item">download_<wbr>item</a></dt><dd>Queue a media item for download</dd><dt><a class="fn" href="fn.download_item_and_start.html" title="fn jellytau_lib::commands::download::download_item_and_start">download_<wbr>item_<wbr>and_<wbr>start</a></dt><dd>Queue and start a download in a single atomic operation
This simplifies the frontend flow by combining multiple steps</dd><dt><a class="fn" href="fn.download_root.html" title="fn jellytau_lib::commands::download::download_root">download_<wbr>root</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>The directory every download has to stay inside: the storage root
<code>storage_get_path</code> hands the frontend, which is the databases parent.</dd><dt><a class="fn" href="fn.download_season.html" title="fn jellytau_lib::commands::download::download_season">download_<wbr>season</a></dt><dd>Queue all episodes of a specific season for download</dd><dt><a class="fn" href="fn.download_series.html" title="fn jellytau_lib::commands::download::download_series">download_<wbr>series</a></dt><dd>Queue all episodes of a series for download</dd><dt><a class="fn" href="fn.download_video.html" title="fn jellytau_lib::commands::download::download_video">download_<wbr>video</a></dt><dd>Queue a video item (movie or episode) for download with quality preset</dd><dt><a class="fn" href="fn.downloads_allowed_on_current_network.html" title="fn jellytau_lib::commands::download::downloads_allowed_on_current_network">downloads_<wbr>allowed_<wbr>on_<wbr>current_<wbr>network</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Whether the current network permits downloads, given the users WiFi-only
preference.</dd><dt><a class="fn" href="fn.enqueue_download.html" title="fn jellytau_lib::commands::download::enqueue_download">enqueue_<wbr>download</a></dt><dd>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.</dd><dt><a class="fn" href="fn.enqueue_video_downloads.html" title="fn jellytau_lib::commands::download::enqueue_video_downloads">enqueue_<wbr>video_<wbr>downloads</a></dt><dd>Enqueue a batch of already-queued video downloads, resolving each ones
transcode URL from the repository using the <code>quality_preset</code> stored on the
row. Then let the pump start them subject to the concurrency limit.</dd><dt><a class="fn" href="fn.get_download_manager_stats.html" title="fn jellytau_lib::commands::download::get_download_manager_stats">get_<wbr>download_<wbr>manager_<wbr>stats</a></dt><dd>Get download manager statistics</dd><dt><a class="fn" href="fn.get_download_storage_stats.html" title="fn jellytau_lib::commands::download::get_download_storage_stats">get_<wbr>download_<wbr>storage_<wbr>stats</a></dt><dd>Get storage statistics for downloads</dd><dt><a class="fn" href="fn.get_downloads.html" title="fn jellytau_lib::commands::download::get_downloads">get_<wbr>downloads</a></dt><dd>Get all downloads for a user, optionally filtered by status</dd><dt><a class="fn" href="fn.get_downloads_allowed.html" title="fn jellytau_lib::commands::download::get_downloads_allowed">get_<wbr>downloads_<wbr>allowed</a></dt><dd>Whether downloads are currently permitted by the WiFi-only gate.</dd><dt><a class="fn" href="fn.map_download_row.html" title="fn jellytau_lib::commands::download::map_download_row">map_<wbr>download_<wbr>row</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Helper function to map database row to DownloadInfo</dd><dt><a class="fn" href="fn.mark_download_completed.html" title="fn jellytau_lib::commands::download::mark_download_completed">mark_<wbr>download_<wbr>completed</a></dt><dd>Mark a download as completed</dd><dt><a class="fn" href="fn.mark_download_failed.html" title="fn jellytau_lib::commands::download::mark_download_failed">mark_<wbr>download_<wbr>failed</a></dt><dd>Mark a download as failed</dd><dt><a class="fn" href="fn.pause_download.html" title="fn jellytau_lib::commands::download::pause_download">pause_<wbr>download</a></dt><dd>Pause a download.</dd><dt><a class="fn" href="fn.pump_download_queue.html" title="fn jellytau_lib::commands::download::pump_download_queue">pump_<wbr>download_<wbr>queue</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Start as many pending downloads as there are free concurrency slots.</dd><dt><a class="fn" href="fn.queue_album_tracks.html" title="fn jellytau_lib::commands::download::queue_album_tracks">queue_<wbr>album_<wbr>tracks</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>TRACES: UR-018, UR-055 | DR-173 | UT-170</dd><dt><a class="fn" href="fn.resume_download.html" title="fn jellytau_lib::commands::download::resume_download">resume_<wbr>download</a></dt><dd>Resume a paused download.</dd><dt><a class="fn" href="fn.sanitize_filename.html" title="fn jellytau_lib::commands::download::sanitize_filename">sanitize_<wbr>filename</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Sanitize filename by removing invalid characters</dd><dt><a class="fn" href="fn.set_max_concurrent_downloads.html" title="fn jellytau_lib::commands::download::set_max_concurrent_downloads">set_<wbr>max_<wbr>concurrent_<wbr>downloads</a></dt><dd>Set the maximum concurrent downloads</dd><dt><a class="fn" href="fn.set_network_state.html" title="fn jellytau_lib::commands::download::set_network_state">set_<wbr>network_<wbr>state</a></dt><dd>Report the devices current network transport (Android → Rust).</dd><dt><a class="fn" href="fn.spawn_download_worker.html" title="fn jellytau_lib::commands::download::spawn_download_worker">spawn_<wbr>download_<wbr>worker</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>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.</dd><dt><a class="fn" href="fn.start_download.html" title="fn jellytau_lib::commands::download::start_download">start_<wbr>download</a></dt><dd>Start downloading a file immediately
This command actually downloads the file using the worker</dd></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.EpisodeRow.html" title="type jellytau_lib::commands::download::EpisodeRow">Episode<wbr>Row</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>One row of the series episode listing used when queueing a whole series:
<code>(id, name, season_name, index_number, parent_index_number)</code>.</dd></dl></section></div></main></body></html>