Adds a per-library option to skip hidden files and directories during scans

This commit is contained in:
BinaryAlley committed 2026-11-27 09:52:40 +02:00
1 parent 0bb795dca5
commit 0e8d61b215
67 files changed
+4624 -19

No files matched your search

@@ -65,6 +65,7 @@ POST api/v1/libraries
"canDownloadMetadataFromWeb": true,
"shouldSaveMetadataInMediaDirectories": true,
"shouldSkipUnchangedDirectoriesDuringScan": true,
"shouldSkipHiddenFilesAndDirectoriesDuringScan": false,
"isContentOnSsd": false,
"shouldTrackConsumptionProgress": true,
"completionThresholdPercentage": 100,
@@ -85,7 +86,7 @@ POST api/v1/libraries
}
```
The `metadataProviders`, `artworkProviders` and `bookReaders` lists configure the providers and readers of the library in the same request: each entry names a plugin returned by the matching `GET api/v1/libraries/{metadata-providers|artwork-providers|book-readers}/{libraryType}` request, and whether it is enabled, and the order of the provider entries is the order in which the providers are tried. A supported plugin left out of a list is added disabled, after the listed ones. The `isEnabled` of an entry can be omitted, in which case the stored state is kept and a provider without one starts disabled, so a list can reorder providers without changing their state. A list that is `null` or absent adds every supported plugin disabled, in alphabetical order. A plugin that does not support the library type fails the request with `PluginNotSupportedForLibraryType`.
The `metadataProviders`, `artworkProviders` and `bookReaders` lists configure the providers and readers of the library in the same request: each entry names a plugin returned by the matching `GET api/v1/libraries/{metadata-providers|artwork-providers|book-readers}/{libraryType}` request, and whether it is enabled, and the order of the provider entries is the order in which the providers are tried. A supported plugin left out of a list is added disabled, after the listed ones. The `isEnabled` of an entry can be omitted, in which case the stored state is kept and a provider without one starts disabled, so a list can reorder providers without changing their state. A list that is `null` or absent adds every supported plugin disabled, in alphabetical order. A plugin that does not support the library type fails the request with `PluginNotSupportedForLibraryType`. The `shouldSkipHiddenFilesAndDirectoriesDuringScan` setting is optional and defaults to `false` when it is absent.
#### Add Library Response
@@ -108,6 +109,7 @@ The `metadataProviders`, `artworkProviders` and `bookReaders` lists configure th
"canDownloadMetadataFromWeb": true,
"shouldSaveMetadataInMediaDirectories": true,
"shouldSkipUnchangedDirectoriesDuringScan": true,
"shouldSkipHiddenFilesAndDirectoriesDuringScan": false,
"isContentOnSsd": false,
"shouldTrackConsumptionProgress": true,
"completionThresholdPercentage": 100,
@@ -147,6 +149,7 @@ GET api/v1/libraries
"canDownloadMetadataFromWeb": true,
"shouldSaveMetadataInMediaDirectories": true,
"shouldSkipUnchangedDirectoriesDuringScan": true,
"shouldSkipHiddenFilesAndDirectoriesDuringScan": false,
"isContentOnSsd": false,
"shouldTrackConsumptionProgress": true,
"completionThresholdPercentage": 100,
@@ -187,6 +190,7 @@ GET api/v1/libraries/enabled
"canDownloadMetadataFromWeb": true,
"shouldSaveMetadataInMediaDirectories": true,
"shouldSkipUnchangedDirectoriesDuringScan": true,
"shouldSkipHiddenFilesAndDirectoriesDuringScan": false,
"isContentOnSsd": false,
"shouldTrackConsumptionProgress": true,
"completionThresholdPercentage": 100,
@@ -226,6 +230,7 @@ GET api/v1/libraries/{id}
"canDownloadMetadataFromWeb": true,
"shouldSaveMetadataInMediaDirectories": true,
"shouldSkipUnchangedDirectoriesDuringScan": true,
"shouldSkipHiddenFilesAndDirectoriesDuringScan": false,
"isContentOnSsd": false,
"shouldTrackConsumptionProgress": true,
"completionThresholdPercentage": 100,
@@ -257,6 +262,7 @@ PUT api/v1/libraries/{id}
"canDownloadMetadataFromWeb": true,
"shouldSaveMetadataInMediaDirectories": true,
"shouldSkipUnchangedDirectoriesDuringScan": true,
"shouldSkipHiddenFilesAndDirectoriesDuringScan": false,
"isContentOnSsd": false,
"shouldTrackConsumptionProgress": true,
"completionThresholdPercentage": 100,
@@ -274,7 +280,7 @@ PUT api/v1/libraries/{id}
Updating a library requires being its owner and holding the `CanCreateLibraries` permission, or being an admin, who can update any library; any other user is answered with `403 NotAuthorized` before the cover image is read. The owner of the library is the user who created it: an update never changes it, so the request carries no owner.
The `metadataProviders`, `artworkProviders` and `bookReaders` lists work as for [Add Library](#add-library). A list that is sent also removes the stored configurations of the plugins that do not support the library type, even when the list does not name them, and keeps the stored state of the supported plugins it leaves out, ordering them after the listed ones. A list that is `null` or absent keeps the stored configurations when the library type is unchanged, and when the type changes, removes the configurations of the plugins that do not support the new type and adds the newly supported plugins disabled.
The `metadataProviders`, `artworkProviders` and `bookReaders` lists work as for [Add Library](#add-library). A list that is sent also removes the stored configurations of the plugins that do not support the library type, even when the list does not name them, and keeps the stored state of the supported plugins it leaves out, ordering them after the listed ones. A list that is `null` or absent keeps the stored configurations when the library type is unchanged, and when the type changes, removes the configurations of the plugins that do not support the new type and adds the newly supported plugins disabled. The `shouldSkipHiddenFilesAndDirectoriesDuringScan` setting is optional; when it is absent, the stored value is kept. Changing either `shouldSkipUnchangedDirectoriesDuringScan` or `shouldSkipHiddenFilesAndDirectoriesDuringScan` discards the library's stored directory fingerprints, so the next scan reads the whole library.
#### Update Library Response
@@ -297,6 +303,7 @@ The `metadataProviders`, `artworkProviders` and `bookReaders` lists work as for
"canDownloadMetadataFromWeb": true,
"shouldSaveMetadataInMediaDirectories": true,
"shouldSkipUnchangedDirectoriesDuringScan": true,
"shouldSkipHiddenFilesAndDirectoriesDuringScan": false,
"isContentOnSsd": false,
"shouldTrackConsumptionProgress": true,
"completionThresholdPercentage": 100,
@@ -14,6 +14,7 @@ Content-Type: application/json
"canDownloadMetadataFromWeb": true,
"shouldSaveMetadataInMediaDirectories": true,
"shouldSkipUnchangedDirectoriesDuringScan": true,
"shouldSkipHiddenFilesAndDirectoriesDuringScan": false,
"isContentOnSsd": false,
"shouldTrackConsumptionProgress": true,
"completionThresholdPercentage": 100,
@@ -15,6 +15,7 @@ Content-Type: application/json
"canDownloadMetadataFromWeb": true,
"shouldSaveMetadataInMediaDirectories": true,
"shouldSkipUnchangedDirectoriesDuringScan": true,
"shouldSkipHiddenFilesAndDirectoriesDuringScan": false,
"isContentOnSsd": false,
"shouldTrackConsumptionProgress": true,
"completionThresholdPercentage": 100,