+ public void setAuthorCover(String author, String luid) throws IOException {
+ lib.setAuthorCover(author, luid);
+ cacheLib.setAuthorCover(author, getCover(luid));
+ }
+
+ @Override
+ protected void updateInfo(MetaData meta) throws IOException {
+ if (meta != null && metas != null) {
+ for (int i = 0; i < metas.size(); i++) {
+ if (metas.get(i).getLuid().equals(meta.getLuid())) {
+ metas.set(i, meta);
+ }
+ }
+ }
+
+ cacheLib.updateInfo(meta);
+ lib.updateInfo(meta);
+ }
+
+ @Override
+ protected void invalidateInfo(String luid) {
+ if (luid == null) {
+ metas = null;
+ } else if (metas != null) {
+ for (int i = 0; i < metas.size(); i++) {
+ if (metas.get(i).getLuid().equals(luid)) {
+ metas.remove(i--);
+ }
+ }
+ }
+
+ cacheLib.invalidateInfo(luid);
+ lib.invalidateInfo(luid);