X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2FLibrary.java;h=3868bd3fee03d946214db55f8594f14bf34a5887;hp=8a3895ad8c82a5c3e8e8754f3202f9da48e3edf8;hb=b0e88ebd20f8b2950c382694e936da76ac3596b6;hpb=0d781e306746cf460f1f41338eb437f32cf9db33 diff --git a/src/be/nikiroo/fanfix/Library.java b/src/be/nikiroo/fanfix/Library.java index 8a3895a..3868bd3 100644 --- a/src/be/nikiroo/fanfix/Library.java +++ b/src/be/nikiroo/fanfix/Library.java @@ -38,8 +38,8 @@ import be.nikiroo.utils.Progress; public class Library { protected File baseDir; protected boolean localSpeed; + protected Map stories; - private Map stories; private int lastId; private OutputType text; private OutputType image; @@ -156,17 +156,12 @@ public class Library { * * @return the stories */ - public synchronized List getListByType(String type) { - if (type != null) { - // convert the type to dir name - type = getExpectedDir(type).getName(); - } - + public synchronized List getListBySource(String type) { List list = new ArrayList(); - for (Entry entry : getStories(null).entrySet()) { - String storyType = entry.getValue().getParentFile().getName(); + for (MetaData meta : getStories(null).keySet()) { + String storyType = meta.getSource(); if (type == null || type.equalsIgnoreCase(storyType)) { - list.add(entry.getKey()); + list.add(meta); } }