/
/
/
# What does this implement/fix? When a library scan runs into storage that has gone away (a NAS rebooting, a share dropping out), the provider marks itself unavailable so a half-finished scan can't wipe the library. Until now only a *complete* library sync cleared that flag again — up to twelve hours later, and never from the artist or album sync tasks at all. For the whole of that window everything belonging to the provider stays out of reach even though the storage may have come back in seconds. Album art is the most visible casualty: covers stop loading, and a cast dashboard or Nest display keeps showing a placeholder until it is restarted. Changes: - A provider that went down now re-checks its storage every few minutes and comes back as soon as it can be read. - The check is deliberately cheap: a single directory stat for local, SMB and NFS. Cloud storage has no local path, so it asks the API for its root listing instead. - The check stops when the provider recovers or is unloaded. - How an aborted or incomplete scan protects the library is unchanged — the flag was never what guarded that. **Related issue (if applicable):** - follow-up to #5076, which called this out as a separate change ## Types of changes - [x] Bugfix (non-breaking change which fixes an issue) — `bugfix` - [ ] New feature (non-breaking change which adds functionality) — `new-feature` - [ ] Enhancement to an existing feature — `enhancement` - [ ] New music/player/metadata/plugin provider — `new-provider` - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) — `breaking-change` - [ ] Refactor (no behaviour change) — `refactor` - [ ] Documentation only — `documentation` - [ ] Maintenance / chore — `maintenance` - [ ] CI / workflow change — `ci` - [ ] Dependencies bump — `dependencies` ## Checklist - [x] The code change is tested and works locally. - [x] `pre-commit run --all-files` passes. - [x] `pytest` passes, and tests have been added/updated under `tests/` where applicable. - [ ] For changes to shared models, the companion PR in `music-assistant/models` is linked. - [ ] For changes affecting the UI, the companion PR in `music-assistant/frontend` is linked. - [x] I have read and complied with the project's [AI Policy](https://github.com/music-assistant/.github/blob/main/AI_POLICY.md) for any AI-assisted contributions. - [ ] I have [raised a PR against the documentation repository](https://github.com/music-assistant/music-assistant.io/blob/main/CONTRIBUTING.md) targeting the main or beta branch as appropriate.