From 24983bdd41fdfe628eadbd38cb3a3cc53c4cdf1c Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 12 Nov 2012 13:38:25 +0000 Subject: [PATCH] * store the most original filename as xattr instead of the latest --- source/net/sourceforge/filebot/media/MediaDetection.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/net/sourceforge/filebot/media/MediaDetection.java b/source/net/sourceforge/filebot/media/MediaDetection.java index 0b50b1d4..bc714894 100644 --- a/source/net/sourceforge/filebot/media/MediaDetection.java +++ b/source/net/sourceforge/filebot/media/MediaDetection.java @@ -807,7 +807,9 @@ public class MediaDetection { if (model instanceof Episode || model instanceof Movie) { xattr.setMetaData(model); } - xattr.setOriginalName(file.getName()); + if (xattr.getOriginalName() == null) { + xattr.setOriginalName(file.getName()); + } } catch (Exception e) { Logger.getLogger(MediaDetection.class.getClass().getName()).warning("Failed to set xattr: " + e.getMessage()); }