7 lines
14 KiB
HTML
7 lines
14 KiB
HTML
<!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 database/storage operations"><title>jellytau_lib::commands::storage - 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 storage</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.11.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module storage</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></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>storage</span> <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/storage/mod.rs.html#1-1753">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 database/storage operations</p>
|
||
<p>TRACES: UR-002, UR-011, UR-012, UR-017, UR-019, UR-025, UR-047 | IR-013 | DR-012, DR-013, DR-022, DR-060</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="people/index.html" title="mod jellytau_lib::commands::storage::people">people</a>::*;</code></dt><dt><code>pub use <a class="mod" href="series_prefs/index.html" title="mod jellytau_lib::commands::storage::series_prefs">series_prefs</a>::*;</code></dt><dt><code>pub use <a class="mod" href="thumbnails/index.html" title="mod jellytau_lib::commands::storage::thumbnails">thumbnails</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="people/index.html" title="mod jellytau_lib::commands::storage::people">people</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Person/cast metadata cache commands.</dd><dt><a class="mod" href="series_prefs/index.html" title="mod jellytau_lib::commands::storage::series_prefs">series_<wbr>prefs</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Per-series preferred audio track commands.</dd><dt><a class="mod" href="thumbnails/index.html" title="mod jellytau_lib::commands::storage::thumbnails">thumbnails</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Thumbnail cache and image-URL 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.ActiveSession.html" title="struct jellytau_lib::commands::storage::ActiveSession">Active<wbr>Session</a></dt><dd>Active session info (for session restoration)</dd><dt><a class="struct" href="struct.CachedItem.html" title="struct jellytau_lib::commands::storage::CachedItem">Cached<wbr>Item</a></dt><dd>Cached media item returned to frontend</dd><dt><a class="struct" href="struct.CachedLibrary.html" title="struct jellytau_lib::commands::storage::CachedLibrary">Cached<wbr>Library</a></dt><dd>Cached library info returned to frontend</dd><dt><a class="struct" href="struct.CredentialStoreWrapper.html" title="struct jellytau_lib::commands::storage::CredentialStoreWrapper">Credential<wbr>Store<wbr>Wrapper</a></dt><dd>Wrapper for thread-safe credential store access</dd><dt><a class="struct" href="struct.DatabaseWrapper.html" title="struct jellytau_lib::commands::storage::DatabaseWrapper">Database<wbr>Wrapper</a></dt><dd>Wrapper for thread-safe database access</dd><dt><a class="struct" href="struct.PlaybackProgress.html" title="struct jellytau_lib::commands::storage::PlaybackProgress">Playback<wbr>Progress</a></dt><dd>Playback progress info</dd><dt><a class="struct" href="struct.SecurityStatus.html" title="struct jellytau_lib::commands::storage::SecurityStatus">Security<wbr>Status</a></dt><dd>Security status info</dd><dt><a class="struct" href="struct.ServerInfo.html" title="struct jellytau_lib::commands::storage::ServerInfo">Server<wbr>Info</a></dt><dd>Server info returned to frontend</dd><dt><a class="struct" href="struct.ThumbnailCacheWrapper.html" title="struct jellytau_lib::commands::storage::ThumbnailCacheWrapper">Thumbnail<wbr>Cache<wbr>Wrapper</a></dt><dd>Wrapper for thread-safe thumbnail cache access</dd><dt><a class="struct" href="struct.UserInfo.html" title="struct jellytau_lib::commands::storage::UserInfo">User<wbr>Info</a></dt><dd>User info returned to frontend</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.media_local_selection.html" title="fn jellytau_lib::commands::storage::media_local_selection">media_<wbr>local_<wbr>selection</a></dt><dd>The stream selection for a downloaded file.</dd><dt><a class="fn" href="fn.media_local_url.html" title="fn jellytau_lib::commands::storage::media_local_url">media_<wbr>local_<wbr>url</a></dt><dd>A playable URL for a downloaded file on disk.</dd><dt><a class="fn" href="fn.row_to_cached_item.html" title="fn jellytau_lib::commands::storage::row_to_cached_item">row_<wbr>to_<wbr>cached_<wbr>item</a><span title="Restricted Visibility"> 🔒</span> </dt><dt><a class="fn" href="fn.storage_delete_server.html" title="fn jellytau_lib::commands::storage::storage_delete_server">storage_<wbr>delete_<wbr>server</a></dt><dd>Delete a server and all associated data</dd><dt><a class="fn" href="fn.storage_delete_user.html" title="fn jellytau_lib::commands::storage::storage_delete_user">storage_<wbr>delete_<wbr>user</a></dt><dd>Delete a user account and their token from secure storage</dd><dt><a class="fn" href="fn.storage_get_access_token.html" title="fn jellytau_lib::commands::storage::storage_get_access_token">storage_<wbr>get_<wbr>access_<wbr>token</a></dt><dd>Get user’s access token from secure storage</dd><dt><a class="fn" href="fn.storage_get_active_session.html" title="fn jellytau_lib::commands::storage::storage_get_active_session">storage_<wbr>get_<wbr>active_<wbr>session</a></dt><dd>Get the active session (user + server + token) for session restoration</dd><dt><a class="fn" href="fn.storage_get_active_user.html" title="fn jellytau_lib::commands::storage::storage_get_active_user">storage_<wbr>get_<wbr>active_<wbr>user</a></dt><dd>Get the active user for a server</dd><dt><a class="fn" href="fn.storage_get_item.html" title="fn jellytau_lib::commands::storage::storage_get_item">storage_<wbr>get_<wbr>item</a></dt><dd>Get a single cached item by ID</dd><dt><a class="fn" href="fn.storage_get_items.html" title="fn jellytau_lib::commands::storage::storage_get_items">storage_<wbr>get_<wbr>items</a></dt><dd>Get cached items with optional filtering</dd><dt><a class="fn" href="fn.storage_get_libraries.html" title="fn jellytau_lib::commands::storage::storage_get_libraries">storage_<wbr>get_<wbr>libraries</a></dt><dd>Get cached libraries for a server</dd><dt><a class="fn" href="fn.storage_get_path.html" title="fn jellytau_lib::commands::storage::storage_get_path">storage_<wbr>get_<wbr>path</a></dt><dd>Get storage directory path (parent directory of the database file)</dd><dt><a class="fn" href="fn.storage_get_pending_sync_count.html" title="fn jellytau_lib::commands::storage::storage_get_pending_sync_count">storage_<wbr>get_<wbr>pending_<wbr>sync_<wbr>count</a></dt><dd>Get count of pending sync operations for a user</dd><dt><a class="fn" href="fn.storage_get_playback_progress.html" title="fn jellytau_lib::commands::storage::storage_get_playback_progress">storage_<wbr>get_<wbr>playback_<wbr>progress</a></dt><dd>Get playback progress for an item</dd><dt><a class="fn" href="fn.storage_get_security_status.html" title="fn jellytau_lib::commands::storage::storage_get_security_status">storage_<wbr>get_<wbr>security_<wbr>status</a></dt><dd>Get security status (keyring vs encrypted file fallback)</dd><dt><a class="fn" href="fn.storage_get_servers.html" title="fn jellytau_lib::commands::storage::storage_get_servers">storage_<wbr>get_<wbr>servers</a></dt><dd>Get all saved servers</dd><dt><a class="fn" href="fn.storage_get_size.html" title="fn jellytau_lib::commands::storage::storage_get_size">storage_<wbr>get_<wbr>size</a></dt><dd>Get database file size in bytes</dd><dt><a class="fn" href="fn.storage_get_users.html" title="fn jellytau_lib::commands::storage::storage_get_users">storage_<wbr>get_<wbr>users</a></dt><dd>Get users for a server</dd><dt><a class="fn" href="fn.storage_init.html" title="fn jellytau_lib::commands::storage::storage_init">storage_<wbr>init</a></dt><dd>Initialize the database and run migrations</dd><dt><a class="fn" href="fn.storage_mark_played.html" title="fn jellytau_lib::commands::storage::storage_mark_played">storage_<wbr>mark_<wbr>played</a></dt><dd>Mark item as played in local database</dd><dt><a class="fn" href="fn.storage_mark_synced.html" title="fn jellytau_lib::commands::storage::storage_mark_synced">storage_<wbr>mark_<wbr>synced</a></dt><dd>Mark pending sync as completed for an item</dd><dt><a class="fn" href="fn.storage_save_item.html" title="fn jellytau_lib::commands::storage::storage_save_item">storage_<wbr>save_<wbr>item</a></dt><dd>Save an item to the cache</dd><dt><a class="fn" href="fn.storage_save_library.html" title="fn jellytau_lib::commands::storage::storage_save_library">storage_<wbr>save_<wbr>library</a></dt><dd>Save a library to the cache</dd><dt><a class="fn" href="fn.storage_save_server.html" title="fn jellytau_lib::commands::storage::storage_save_server">storage_<wbr>save_<wbr>server</a></dt><dd>Save a server connection
|
||
Uses INSERT … ON CONFLICT to avoid triggering CASCADE DELETE on users</dd><dt><a class="fn" href="fn.storage_save_user.html" title="fn jellytau_lib::commands::storage::storage_save_user">storage_<wbr>save_<wbr>user</a></dt><dd>Save a user account (token stored in secure storage, not database)</dd><dt><a class="fn" href="fn.storage_search_items.html" title="fn jellytau_lib::commands::storage::storage_search_items">storage_<wbr>search_<wbr>items</a></dt><dd>Search cached items using FTS</dd><dt><a class="fn" href="fn.storage_set_active_user.html" title="fn jellytau_lib::commands::storage::storage_set_active_user">storage_<wbr>set_<wbr>active_<wbr>user</a></dt><dd>Set a user as active (and deactivate all other users globally)</dd><dt><a class="fn" href="fn.storage_set_watched.html" title="fn jellytau_lib::commands::storage::storage_set_watched">storage_<wbr>set_<wbr>watched</a></dt><dd>Set the watched flag locally for an item <strong>and everything inside it</strong>.</dd><dt><a class="fn" href="fn.storage_toggle_favorite.html" title="fn jellytau_lib::commands::storage::storage_toggle_favorite">storage_<wbr>toggle_<wbr>favorite</a></dt><dd>Toggle favorite status for an item in local database
|
||
This updates the is_favorite field and marks it for sync to Jellyfin</dd><dt><a class="fn" href="fn.storage_update_playback_context.html" title="fn jellytau_lib::commands::storage::storage_update_playback_context">storage_<wbr>update_<wbr>playback_<wbr>context</a></dt><dd>Update playback progress with context in local database
|
||
This stores the progress along with playback context (container vs single)</dd><dt><a class="fn" href="fn.storage_update_playback_progress.html" title="fn jellytau_lib::commands::storage::storage_update_playback_progress">storage_<wbr>update_<wbr>playback_<wbr>progress</a></dt><dd>Update playback progress in local database
|
||
This stores the progress locally for offline access and “continue watching”</dd></dl></section></div></main></body></html> |