# Library Inspector PluginA Navidrome plugin written in Rust that demonstrates the Library host service. It periodically logs details about all configured music libraries and finds the largest file in the root of each library directory.## Features- Logs comprehensive library statistics (songs, albums, artists, size, duration)- Lists the largest file found in each library's root directory- Configurable inspection interval via cron expression- Runs an initial inspection on plugin load## Requirements- Rust toolchain with `wasm32-wasip1` target- Navidrome with plugins enabled## Building```bash# Install the WASM target if you haven't alreadyrustup target add wasm32-wasip1# Build the plugincargo build --target wasm32-wasip1 --release# Package as .ndpzip -j library-inspector.ndp manifest.json target/wasm32-wasip1/release/library_inspector.wasm```Or use the provided Makefile from the examples directory:```bashcd plugins/examplesmake library-inspector.ndp```## Installation1. Copy the `.ndp` file to your Navidrome plugins folder2. Enable plugins in your Navidrome configuration:```toml[Plugins]Enabled = trueFolder = "/path/to/plugins"```3. Restart Navidrome and enable the plugin in the UI## ConfigurationConfigure the inspection interval in the Navidrome UI (Settings → Plugins → library-inspector):| Key | Description | Default ||--------|------------------------------------------|--------------|| `cron` | Cron expression for inspection interval | `@every 1m` |## PermissionsThis plugin requires:- **Library** (with filesystem): To read library metadata and scan directories- **Scheduler**: To schedule periodic inspections## Example Output```=== Library Inspection Started ===Found 2 libraries----------------------------------------Library: My Music (ID: 1)Songs: 5432 tracksAlbums: 456Artists: 234Size: 45.67 GBDuration: 312h 45mMount: /libraries/1Largest file in root: cover.jpg (2.34 MB)----------------------------------------Library: Podcasts (ID: 2)Songs: 128 tracksAlbums: 12Artists: 8Size: 3.21 GBDuration: 48h 15mMount: /libraries/2Largest file in root: episode-001.mp3 (156.78 MB)=== Library Inspection Complete ===```## LicenseGPL-3.0 - Same as Navidrome