X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix_swing%2Fgui%2FBooksPanel.java;h=04ee86fce036602c9e15962f463b4eabc1270049;hb=04eafeeaebf720196018d65a7a62b4276e26d0d1;hp=73de77e974d7e6e313489ffb3b17ba969c1540b5;hpb=2a03ecc0ae449a05763db2d47935a4c256cd092f;p=fanfix.git diff --git a/src/be/nikiroo/fanfix_swing/gui/BooksPanel.java b/src/be/nikiroo/fanfix_swing/gui/BooksPanel.java index 73de77e..04ee86f 100644 --- a/src/be/nikiroo/fanfix_swing/gui/BooksPanel.java +++ b/src/be/nikiroo/fanfix_swing/gui/BooksPanel.java @@ -129,7 +129,7 @@ public class BooksPanel extends ListenerPanel { protected List doInBackground() throws Exception { List bookInfos = new ArrayList(); BasicLibrary lib = Instance.getInstance().getLibrary(); - for (MetaData meta : lib.getList(null).filter(sources, authors, tags)) { + for (MetaData meta : lib.getList().filter(sources, authors, tags)) { bookInfos.add(BookInfo.fromMeta(lib, meta)); } @@ -164,7 +164,8 @@ public class BooksPanel extends ListenerPanel { private void filter(String filter) { data.clear(); for (BookInfo bookInfo : bookInfos) { - if (filter.isEmpty() || bookInfo.getMainInfo().toLowerCase().contains(filter.toLowerCase())) { + if (bookInfo.getMainInfo() == null || filter.isEmpty() + || bookInfo.getMainInfo().toLowerCase().contains(filter.toLowerCase())) { data.addElement(bookInfo); } } @@ -232,6 +233,7 @@ public class BooksPanel extends ListenerPanel { @Override public void invalidateCache() { + // TODO: also reset the popup menu for sources/author fireActionPerformed(INVALIDATE_CACHE); } });