From 0d781e306746cf460f1f41338eb437f32cf9db33 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Sat, 1 Jul 2017 18:42:43 +0200 Subject: [PATCH] Update nikiroo-utils, update Library --- ...es.jar => nikiroo-utils-1.6.0-sources.jar} | Bin 65341 -> 69968 bytes src/be/nikiroo/fanfix/Library.java | 71 ++++++++++++------ 2 files changed, 50 insertions(+), 21 deletions(-) rename libs/{nikiroo-utils-1.5.1-sources.jar => nikiroo-utils-1.6.0-sources.jar} (68%) diff --git a/libs/nikiroo-utils-1.5.1-sources.jar b/libs/nikiroo-utils-1.6.0-sources.jar similarity index 68% rename from libs/nikiroo-utils-1.5.1-sources.jar rename to libs/nikiroo-utils-1.6.0-sources.jar index 786794b6334d9d21272d0395f38ec40b52f18f58..1ec2951b17dc08ac7051355d62f75c9813b28aac 100644 GIT binary patch delta 11462 zcmZ{K1zeO}(C@<1;es>^($d{2jUe3}N_Pm-OQV#)Qc}_>xrCIYq;!LTG$`H8U3}wv zz4w00Z-2mI)zeJ^&334Ir1e9EU9geE6lHj0k3mOC={! z!(dXB1^@su@b3dB1^|Et0EA#^#Em=w^4X8Z9X5uT#|MZ<6zh1NN90==*_ zpjyV%(6%#VXz4q9U~ZfR%sw;=5%|?@6c!sWiv)z_PeEA*esjQ5(plht23#<)sNZ59<2882|B%&uc&L0T6bt!I$-)`D!X zHyzKw7H9(844Bv+&i%F@R8-qv(U;(VEkIoM7al$VzOEW^!X;2OaiK^(pDMm8V0nvPRGe}6p#16UKD-;CTX6Y2sf>htFS49X zN71||Q;Hd5ety3XcCcPd;sRJz8bhg!RyRtNpS!-*?OG%}{ev%JpR0zr3g7Wi{Bk~V zps|ro!ke8<@*bDz(C0p8R-%tZoSa1XBZym?5evGnkl7tS^g}2kbk#m*B-va$f8&Yg zos1Jd&{`?AThe(&mSRFB25{kh>5Dkb;V#J|#1{P7Bi&a(QPl2@;s2(8-NFF3OPujnPOqI=!Ey&QS7rQv~`?wj1 zN*cb1Y;E%^Zk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#2SoQ2Y^Wf`7)uYHWUr1l;tL zAP~JC2*mT3=ZwK`Ppr^QhuhdILZAd)r{626_C$*R7qeHqoZbxz0=WTu0~-Cu)#m)$ z6J19Hrok0&0D13O2nMu12nfXc2N(pp>h>QT5X|XuC0xOl;N|}B3hQ4zT!#RQkFEfV z^k{Y{m>B1g3uP5P*Zcs2Mu7p2j zRqnq^Ai0f2qTbMxooyOBu+jKHh!-jURsctlvl8M~aj}}=3d0M)cGjsupuc0eX8<2=N0m6MsUg)#uBMxgq?H*Sl;#$`s&k%Q^jfw9pKy}suZ3qXm;|99wnns6nc zgf_|1y5zt%0hw7peyQLGF#!nFMf1P;vs!R)^mz&}g}{FY03bu_BSI&@!$1x{5)g>} zk4=I=Kf2GHZj*z_(avx%9IHa3If#L~LG=o~NCIX=+YpW-T;w={)(c9 zgEFCwNx_8v^;ExUH2mBlMzyAYb Ce&c8W diff --git a/src/be/nikiroo/fanfix/Library.java b/src/be/nikiroo/fanfix/Library.java index 80a9e8c5..8a3895ad 100644 --- a/src/be/nikiroo/fanfix/Library.java +++ b/src/be/nikiroo/fanfix/Library.java @@ -36,7 +36,9 @@ import be.nikiroo.utils.Progress; * @author niki */ public class Library { - private File baseDir; + protected File baseDir; + protected boolean localSpeed; + private Map stories; private int lastId; private OutputType text; @@ -53,8 +55,10 @@ public class Library { * the {@link OutputType} to save the images-focused stories into */ public Library(File dir, OutputType text, OutputType image) { + this(); + this.baseDir = dir; - this.stories = new HashMap(); + this.lastId = 0; this.text = text; this.image = image; @@ -62,6 +66,15 @@ public class Library { dir.mkdirs(); } + /** + * Create a new {@link Library} with no link to the local machine. + *

+ * Reserved for extensions. + */ + protected Library() { + this.stories = new HashMap(); + } + /** * Refresh the {@link Library}, that is, make sure all stories are loaded. * @@ -146,7 +159,7 @@ public class Library { public synchronized List getListByType(String type) { if (type != null) { // convert the type to dir name - type = getDir(type).getName(); + type = getExpectedDir(type).getName(); } List list = new ArrayList(); @@ -162,8 +175,8 @@ public class Library { } /** - * Retrieve a {@link File} corresponding to the given {@link Story}, cover - * image not included. + * Retrieve a {@link MetaData} corresponding to the given {@link Story}, + * cover image MAY not be included. * * @param luid * the Library UID of the story @@ -213,8 +226,10 @@ public class Library { public synchronized BufferedImage getCover(String luid) { MetaData meta = getInfo(luid); if (meta != null) { + getFile(luid); // to help remote implementation try { - File infoFile = new File(getFile(meta).getPath() + ".info"); + File infoFile = new File(getExpectedFile(meta).getPath() + + ".info"); meta = readMeta(infoFile, true).getKey(); return meta.getCover(); } catch (IOException e) { @@ -239,23 +254,24 @@ public class Library { if (luid != null) { for (Entry entry : getStories(null).entrySet()) { if (luid.equals(entry.getKey().getLuid())) { + MetaData meta = entry.getKey(); + File file = getFile(luid); // to help remote implementation try { - SupportType type = SupportType.valueOfAllOkUC(entry - .getKey().getType()); - URL url = entry.getValue().toURI().toURL(); + SupportType type = SupportType.valueOfAllOkUC(meta + .getType()); + URL url = file.toURI().toURL(); if (type != null) { return BasicSupport.getSupport(type).process(url, pg); } else { throw new IOException("Unknown type: " - + entry.getKey().getType()); + + meta.getType()); } } catch (IOException e) { // We should not have not-supported files in the // library Instance.syserr(new IOException( - "Cannot load file from library: " - + entry.getValue().getPath(), e)); + "Cannot load file from library: " + file, e)); } } } @@ -378,8 +394,8 @@ public class Library { key.setLuid(luid); } - getDir(key.getSource()).mkdirs(); - if (!getDir(key.getSource()).exists()) { + getExpectedDir(key.getSource()).mkdirs(); + if (!getExpectedDir(key.getSource()).exists()) { throw new IOException("Cannot create library dir"); } @@ -391,7 +407,7 @@ public class Library { } BasicOutput it = BasicOutput.getOutput(out, true); - it.process(story, getFile(key).getPath(), pg); + it.process(story, getExpectedFile(key).getPath(), pg); // empty cache stories.clear(); @@ -439,7 +455,7 @@ public class Library { MetaData meta = getInfo(luid); if (meta != null) { meta.setSource(newType); - File newDir = getDir(meta.getSource()); + File newDir = getExpectedDir(meta.getSource()); if (!newDir.exists()) { newDir.mkdir(); } @@ -469,6 +485,18 @@ public class Library { return false; } + /** + * The library is accessed locally or at local speed (for operations like + * {@link Library#getFile(String)}). + *

+ * It could be cached, too, it is only about the access speed. + * + * @return TRUE if it is accessed locally + */ + public boolean isLocalSpeed() { + return localSpeed; + } + /** * Return the list of files/dirs on disk for this {@link Story}. *

@@ -483,7 +511,7 @@ public class Library { List files = new ArrayList(); MetaData meta = getInfo(luid); - File file = getStories(null).get(meta); + File file = getFile(luid); // to help remote implementation if (file != null) { files.add(file); @@ -539,7 +567,7 @@ public class Library { * * @return the target directory */ - private File getDir(String type) { + private File getExpectedDir(String type) { String source = type.replaceAll("[^a-zA-Z0-9._+-]", "_"); return new File(baseDir, source); } @@ -553,13 +581,14 @@ public class Library { * * @return the target */ - private File getFile(MetaData key) { + private File getExpectedFile(MetaData key) { String title = key.getTitle(); if (title == null) { title = ""; } title = title.replaceAll("[^a-zA-Z0-9._+-]", "_"); - return new File(getDir(key.getSource()), key.getLuid() + "_" + title); + return new File(getExpectedDir(key.getSource()), key.getLuid() + "_" + + title); } /** @@ -570,7 +599,7 @@ public class Library { * * @return the stories */ - private synchronized Map getStories(Progress pg) { + protected synchronized Map getStories(Progress pg) { if (pg == null) { pg = new Progress(); } else { -- 2.27.0