- OutputType text = null;
- OutputType images = null;
-
- try {
- text = OutputType.valueOfNullOkUC(Instance.getUiConfig().getString(
- UiConfig.NON_IMAGES_DOCUMENT_TYPE));
- if (text == null) {
- text = OutputType.HTML;
- }
-
- images = OutputType.valueOfNullOkUC(Instance.getUiConfig()
- .getString(UiConfig.IMAGES_DOCUMENT_TYPE));
- if (images == null) {
- images = OutputType.CBZ;
- }
- } catch (Exception e) {
- UiConfig key = (text == null) ? UiConfig.NON_IMAGES_DOCUMENT_TYPE
- : UiConfig.IMAGES_DOCUMENT_TYPE;
- String value = Instance.getUiConfig().getString(key);
-
- throw new IOException(
- String.format(
- "The configuration option %s is not valid: %s",
- key, value), e);
- }
-
- localLibrary = new LocalLibrary(dir, text, images);
+ localLibrary = new LocalLibrary(dir, Instance.getUiConfig().getString(
+ UiConfig.GUI_NON_IMAGES_DOCUMENT_TYPE), Instance.getUiConfig()
+ .getString(UiConfig.GUI_IMAGES_DOCUMENT_TYPE), true);