Skip to main content

Module storage

Module storage 

Source
Expand description

Tauri commands for database/storage operations

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

Re-exports§

pub use people::*;
pub use series_prefs::*;
pub use thumbnails::*;

Modules§

people 🔒
Person/cast metadata cache commands.
series_prefs 🔒
Per-series preferred audio track commands.
thumbnails 🔒
Thumbnail cache and image-URL commands.

Structs§

ActiveSession
Active session info (for session restoration)
CachedItem
Cached media item returned to frontend
CachedLibrary
Cached library info returned to frontend
CredentialStoreWrapper
Wrapper for thread-safe credential store access
DatabaseWrapper
Wrapper for thread-safe database access
PlaybackProgress
Playback progress info
SecurityStatus
Security status info
ServerInfo
Server info returned to frontend
ThumbnailCacheWrapper
Wrapper for thread-safe thumbnail cache access
UserInfo
User info returned to frontend

Functions§

media_local_selection
The stream selection for a downloaded file.
media_local_url
A playable URL for a downloaded file on disk.
row_to_cached_item 🔒
storage_delete_server
Delete a server and all associated data
storage_delete_user
Delete a user account and their token from secure storage
storage_get_access_token
Get user’s access token from secure storage
storage_get_active_session
Get the active session (user + server + token) for session restoration
storage_get_active_user
Get the active user for a server
storage_get_item
Get a single cached item by ID
storage_get_items
Get cached items with optional filtering
storage_get_libraries
Get cached libraries for a server
storage_get_path
Get storage directory path (parent directory of the database file)
storage_get_pending_sync_count
Get count of pending sync operations for a user
storage_get_playback_progress
Get playback progress for an item
storage_get_security_status
Get security status (keyring vs encrypted file fallback)
storage_get_servers
Get all saved servers
storage_get_size
Get database file size in bytes
storage_get_users
Get users for a server
storage_init
Initialize the database and run migrations
storage_mark_played
Mark item as played in local database
storage_mark_synced
Mark pending sync as completed for an item
storage_save_item
Save an item to the cache
storage_save_library
Save a library to the cache
storage_save_server
Save a server connection Uses INSERT … ON CONFLICT to avoid triggering CASCADE DELETE on users
storage_save_user
Save a user account (token stored in secure storage, not database)
storage_search_items
Search cached items using FTS
storage_set_active_user
Set a user as active (and deactivate all other users globally)
storage_set_watched
Set the watched flag locally for an item and everything inside it.
storage_toggle_favorite
Toggle favorite status for an item in local database This updates the is_favorite field and marks it for sync to Jellyfin
storage_update_playback_context
Update playback progress with context in local database This stores the progress along with playback context (container vs single)
storage_update_playback_progress
Update playback progress in local database This stores the progress locally for offline access and “continue watching”