X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fdata%2FMetaData.java;h=586196a663fea88aa39fe45111445d76df0d5651;hb=67efdbf7aa0e96e2207c40a8061a9f29c20fff65;hp=1781d869f263c559d6e7f5240399db5e498a4fd5;hpb=c289a297c0e819c9c944732e52e30a35db7a1796;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/data/MetaData.java b/src/be/nikiroo/fanfix/data/MetaData.java index 1781d86..586196a 100644 --- a/src/be/nikiroo/fanfix/data/MetaData.java +++ b/src/be/nikiroo/fanfix/data/MetaData.java @@ -112,6 +112,8 @@ public class MetaData implements Cloneable, Comparable, Serializable { /** * The story resume (a.k.a. description). + *

+ * This can be NULL if we don't have a resume for this {@link Story}. * * @return the resume */ @@ -388,12 +390,14 @@ public class MetaData implements Cloneable, Comparable, Serializable { return 1; } - String id = (getUuid() == null ? "" : getUuid()) + String id = (getTitle() == null ? "" : getTitle()) + + (getUuid() == null ? "" : getUuid()) + (getLuid() == null ? "" : getLuid()); - String oId = (getUuid() == null ? "" : o.getUuid()) + String oId = (getTitle() == null ? "" : o.getTitle()) + + (getUuid() == null ? "" : o.getUuid()) + (o.getLuid() == null ? "" : o.getLuid()); - return id.compareTo(oId); + return id.compareToIgnoreCase(oId); } @Override @@ -470,7 +474,7 @@ public class MetaData implements Cloneable, Comparable, Serializable { String cover = "none"; if (getCover() != null) { - cover = StringUtils.formatNumber(getCover().getData().length) + cover = StringUtils.formatNumber(getCover().getSize()) + "bytes"; }