- for (GuiReaderGroup group : booksByType.keySet()) {
- List<MetaData> stories = lib
- .getListBySource(booksByType.get(group));
- group.refreshBooks(stories, words);
+ for (String value : books.keySet()) {
+ List<GuiReaderBookInfo> infos = new ArrayList<GuiReaderBookInfo>();
+
+ List<MetaData> metas;
+ if (currentType) {
+ metas = lib.getListBySource(value);
+ } else {
+ metas = lib.getListByAuthor(value);
+ }
+ for (MetaData meta : metas) {
+ infos.add(GuiReaderBookInfo.fromMeta(meta));
+ }
+
+ books.get(value).refreshBooks(infos, words);