Skip to main content

Module library

Module library 

Source
Expand description

Library view module – browse, search, and download assets from an Immich server.

Constructs the main GTK window with a split-pane sidebar, paginated grid view, timeline scrubber, and search bar. Submodules handle the explore dashboard, album grids, lightbox, sidebar, and thumbnail caching independently.

Re-exportsΒ§

pub use texture_decode::set_raw_cache_enabled;
pub use texture_decode::set_raw_full_decode;

ModulesΒ§

actions πŸ”’
Selection-mode wiring and bulk batch operations.
album_link πŸ”’
Album-folder linking, sync dialog, and link/unlink actions.
album_sync
Album-folder bidirectional sync diff and execution.
albums_view
Albums landing page with Recent / Owned / Shared sections.
asset_model
Custom gio::ListModel backing the library grid.
asset_object
GObject subclass representing a single asset in the library grid.
context_menu πŸ”’
Right-click context menu popover and its action handlers.
controls πŸ”’
Header bar button wiring, search, sort, source-mode, timeline, and sidebar/grid handlers.
download πŸ”’
Download flow, video handoff, and transfer-tracking helpers.
explore_view
Sectioned landing page mirroring Immich web’s Explore tab.
lightbox πŸ”’
Lightbox image viewer: full-screen preview with zoom, pan, EXIF details, and keyboard navigation.
local_exif
EXIF / XMP metadata extraction for local files.
local_source
Local file enumeration for the library view.
masonry
Justified-row masonry layout pieces for the photos grid.
search_filters
search_view
Dedicated search view for the library sidebar.
server_stats_dialog πŸ”’
Server statistics dialog.
sidebar
Sidebar navigation panel for the library window.
staging_view
Staging view for files opened via β€œOpen With” or the --upload CLI flag.
state
Library runtime state used by the built-in asset browser.
style
Library view CSS: subtle pulsing placeholder for loading thumbnails, a muted error tile, and a rounded transfer progress treatment.
texture_decode πŸ”’
Image decoding pipeline – codec dispatch, RAW/HEIF/JXL/JPEG2K/SVG/PSD/WebP decoders, embedded-preview extraction, EXIF orientation, and decode-cache management.
thumbnail_cache
Two-tier (memory + disk) thumbnail cache for the library grid.
upload_picker πŸ”’
Manual upload entry point.

StructsΒ§

LibraryWindowUi πŸ”’
The complete UI widgets state wrapper for the library window interface.

ConstantsΒ§

LOCAL_ID_PREFIX πŸ”’
PAGE_SIZE πŸ”’

FunctionsΒ§

album_click_handler πŸ”’
Produce a click callback handler for handling album activation events.
apply_timeline_ui_state πŸ”’
Apply header control layout adjustments when switching view modes.
bootstrap_window πŸ”’
Bootstrap initial data loading and background tasks for the library window.
build_album_sidebar_row πŸ”’
build_drop_overlay πŸ”’
Build a drop overlay widget and wrap content in a gtk::Overlay.
build_library_window
Build and display the main library window application layout.
build_loading_view πŸ”’
Construct a styled placeholder view containing an icon, header title, and description text. Centered Mimick-icon spinner used while library data is fetching. Shares the mimick-loader-icon animation with the lightbox image-load spinner.
build_search_source πŸ”’
Decide which LibrarySource variant to use based on mode, query, and filters.
build_status_view πŸ”’
connect_albums_create πŸ”’
Connect action handlers to the album creation widgets.
connect_drop_target πŸ”’
Attach a DropTarget to the library window for drag-and-drop file uploads.
connect_lightweight_filters πŸ”’
Wire the lightweight filter entries embedded in Albums and Explore views.
connect_search_view πŸ”’
Wire the dedicated search view’s interactive handlers.
dispatch_search_from_view πŸ”’
Read the search view widgets and dispatch the appropriate search source.
fetch_current_user πŸ”’
Fetch current logged-in API user ID and store it in app context.
handle_album_drop_upload πŸ”’
handle_drop πŸ”’
handle_library_drop_upload πŸ”’
immich_checksum_to_hex πŸ”’
Convert a Base64-encoded Immich checksum string to its standard hexadecimal representation.
linked_entry_path_for_album πŸ”’
Return the path of the watch entry linked to album_name, if any. Find the local directory watch path mapped to the specified album.
load_albums πŸ”’
Retrieve albums from the API and update the side navigation sidebar entries.
load_explore_landing πŸ”’
Load smart/metadata sections onto the Explore dashboard view.
load_source_page πŸ”’
Load a paginated subset of assets for the current source.
load_status πŸ”’
Fetch and populate active server version details and stats into the UI.
load_texture_oriented πŸ”’
Load a local texture, preferring decoders that cover formats outside the GDK-Pixbuf runtime loader set before falling back to pixbuf and image-rs.
local_to_library_asset πŸ”’
Build a synthetic LibraryAsset from a physical local folder file.
merge_album_unified_page πŸ”’
Album-scoped variant of merge_unified_page: takes the album’s asset page from the remote API and overlays sync state from the album’s linked local folder only β€” never from siblings. Merge a page of remote album assets with local folder files linked to the album.
merge_unified_page πŸ”’
Merge a page of remote API assets with local files that haven’t been synchronized yet.
month_year_label πŸ”’
Convert an ISO 8601 string to a human-readable β€œMonth Year” label.
open_asset_in_lightbox πŸ”’
Fetch a single asset by ID and open it in lightbox without leaving explore.
prompt_create_album πŸ”’
Show a popup modal dialog prompting the user to name and create a new album.
refresh_albums_view πŸ”’
Asynchronously fetch the latest albums from the server and redraw the album views.
register_app_icons πŸ”’
Register application custom icons with the Gtk icon theme system.
reload_sidebar πŸ”’
Repopulate and select the active album or fixed row in the side navigation sidebar.
select_fixed_row πŸ”’
Helper to select a sidebar row matching a specific string key.
setup_album_drop_target πŸ”’
show_library_permission_error πŸ”’
Helper to show a permissions error dialog for library views.
show_unsupported_drop_toast πŸ”’
spawn_server_ping_loop πŸ”’
spawn_transfer_poll_loop πŸ”’
Start a quick periodic polling loop updating the transfer progress bar UI.
sync_content_state πŸ”’
Sync the visibility of the grid, loading, empty, and error page widgets.
update_footer πŸ”’
Update the status sidebar rows with the current server route and statistics.
update_timeline_banner_if_active πŸ”’
Compute and refresh the month-year overlay text dynamically while scrubbing the timeline list.
update_transfer_ui πŸ”’
Synchronize the ongoing upload/download progress indicator bar and rate information text.