Add checkbox to enable or disable automatic book match search on opening book details
This commit is contained in:
committed by
Aditya Chandel
parent
bb5c0d473c
commit
2ef67f450a
+1
@@ -13,6 +13,7 @@ import lombok.NoArgsConstructor;
|
||||
public class AppSettings {
|
||||
private CoverSettings coverSettings;
|
||||
private MetadataRefreshOptions metadataRefreshOptions;
|
||||
private boolean autoBookSearch;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
|
||||
@@ -23,6 +23,7 @@ public class AppSettingService {
|
||||
private final ObjectMapper objectMapper;
|
||||
|
||||
public static final String QUICK_BOOK_MATCH = "quick_book_match";
|
||||
public static final String AUTO_BOOK_SEARCH = "auto_book_search";
|
||||
public static final String COVER_IMAGE_RESOLUTION = "cover_image_resolution";
|
||||
|
||||
private volatile AppSettings appSettings;
|
||||
@@ -86,6 +87,9 @@ public class AppSettingService {
|
||||
.resolution(settingsMap.get(COVER_IMAGE_RESOLUTION))
|
||||
.build());
|
||||
}
|
||||
if(settingsMap.containsKey(AUTO_BOOK_SEARCH)) {
|
||||
builder.autoBookSearch(Boolean.parseBoolean(settingsMap.get(AUTO_BOOK_SEARCH)));
|
||||
}
|
||||
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
INSERT INTO app_settings (name, val)
|
||||
VALUES ('auto_book_search', 'true');
|
||||
Reference in New Issue
Block a user