From: Niki Roo Date: Mon, 26 Mar 2018 20:32:53 +0000 (+0200) Subject: MetaData comparison fix (take LUID into account) X-Git-Tag: fanfix-1.7.0~9 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=f40dbebd3a63c724bdad6e1beec3518aab384999;p=fanfix.git MetaData comparison fix (take LUID into account) --- diff --git a/src/be/nikiroo/fanfix/data/MetaData.java b/src/be/nikiroo/fanfix/data/MetaData.java index 53525fd..b2217ae 100644 --- a/src/be/nikiroo/fanfix/data/MetaData.java +++ b/src/be/nikiroo/fanfix/data/MetaData.java @@ -384,18 +384,12 @@ public class MetaData implements Cloneable, Comparable { return 1; } - String uuid = getUuid(); - String oUuid = o.getUuid(); - - if (uuid == null) { - uuid = ""; - } - - if (oUuid == null) { - oUuid = ""; - } + String id = (getUuid() == null ? "" : getUuid()) + + (getLuid() == null ? "" : getLuid()); + String oId = (getUuid() == null ? "" : o.getUuid()) + + (o.getLuid() == null ? "" : o.getLuid()); - return uuid.compareTo(oUuid); + return id.compareTo(oId); } @Override