/
/
/
# What does this implement/fix? A filesystem provider could report the same number of changed files on every sync and never converge. Two independent causes, both leaving files that the scan queues but nothing ever imports, so their stored checksum is never refreshed. **Missing content type.** `media_content_type` was read from the setup data without a default, so an instance created before that key joined the setup flow resolved it to `None`. Nothing matches `None`: `supported_features` still falls through to the music feature set, `sync_library` never returns early, and the scan runs and queues changed files as usual — but every branch of `_process_item_async` is gated on the content type, so all of them are skipped and the file is silently dropped. `_process_deletions` is gated the same way, so nothing is removed either. The visible effect is a sync that reports work twice a day forever while no change on the share ever reaches the library. **Files the content type cannot import.** The scan walks the union of every content type's extensions. A music provider never imports `.m4b`/`.aax`/`.aa`, and an audiobooks or podcasts provider never imports the track-only extensions plus `.m3u`/`.cue`. Those files get no provider mapping, so they are queued as new on every sync. **Related issue (if applicable):** - n/a ## 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` ## Changes - Fall back to the content type entry's own default when the setup data has no value for it. - Skip files the provider's content type never imports in `_classify_scan_item`, via a new `_is_imported_file` helper, so they are not queued every sync. This also covers files skipped because `library_sync_tracks` or `library_sync_playlists` is off. - Move the `_sync_tracks` / `_sync_playlists` defaults to class attributes. - Tests for both, including the missing-content-type case and the per-content-type extension filter. ## 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. Co-authored-by: Marvin Schenkel <[email protected]> Co-authored-by: Chris <[email protected]>