From f40dbebd3a63c724bdad6e1beec3518aab384999 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Mon, 26 Mar 2018 22:32:53 +0200 Subject: [PATCH] MetaData comparison fix (take LUID into account) --- src/be/nikiroo/fanfix/data/MetaData.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/be/nikiroo/fanfix/data/MetaData.java b/src/be/nikiroo/fanfix/data/MetaData.java index 53525fdc..b2217ae3 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 -- 2.27.0