Feat: Adds OPDS Chapter Filtering/Ordering (#1392)
* Adds server level configs for OPDS * PR comments * Refactor server-reference.conf (itemsPerPage range) * Coerce itemsPerPage (10, 5000) and default invalid sort orders to DESC * Coerce itemsPerPage (10, 5000) and default invalid sort orders to DESC * Change opdsChapterSortOrder type to Enum(SortOrder) * Fix serialization of SortOrderEnum & Add `opdsShowOnlyDownloadedChapters` config
This commit is contained in:
@@ -112,7 +112,8 @@ open class ConfigManager {
|
||||
value: Any,
|
||||
) {
|
||||
mutex.withLock {
|
||||
val configValue = ConfigValueFactory.fromAnyRef(value)
|
||||
val actualValue = if (value is Enum<*>) value.name else value
|
||||
val configValue = ConfigValueFactory.fromAnyRef(actualValue)
|
||||
|
||||
updateUserConfigFile(path, configValue)
|
||||
internalConfig = internalConfig.withValue(path, configValue)
|
||||
|
||||
Reference in New Issue
Block a user