X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Flibrary%2FLocalLibrary.java;h=59310fdc4f906b3247efb2b796e887c94666c41b;hb=d4449e9632aac4c20bdb9183cabb37b377270c41;hp=90e10c3024a61949762fe6a95fb30b5472e0f54c;hpb=c956ff52ac789f80c9b694a8f74ca8f1f47db67c;p=nikiroo-utils.git diff --git a/src/be/nikiroo/fanfix/library/LocalLibrary.java b/src/be/nikiroo/fanfix/library/LocalLibrary.java index 90e10c3..59310fd 100644 --- a/src/be/nikiroo/fanfix/library/LocalLibrary.java +++ b/src/be/nikiroo/fanfix/library/LocalLibrary.java @@ -414,6 +414,22 @@ public class LocalLibrary extends BasicLibrary { return text; } + /** + * Return the default {@link OutputType} for this kind of {@link Story}. + * + * @param imageDocument + * TRUE for images document, FALSE for text documents + * + * @return the type + */ + public String getOutputType(boolean imageDocument) { + if (imageDocument) { + return image.toString(); + } + + return text.toString(); + } + /** * Get the target {@link File} related to the given .info * {@link File} and {@link MetaData}. @@ -623,7 +639,8 @@ public class LocalLibrary extends BasicLibrary { boolean info = file != null && file.isFile() && file.getPath().toLowerCase().endsWith(".info"); boolean dir = file != null && file.isDirectory(); - return info || dir; + boolean isExpandedHtml = new File(file, "index.html").isFile(); + return info || (dir && !isExpandedHtml); } });