Page 1 of 1

XMP issue since v5.0

PostPosted: Sun Dec 27, 2020 4:58 pm
by squaredpx
Hi. I have a hazel rule that has been running for years that renames a .XMP (image sidecar file) based on its metadata (xmp:CreateDate). But after the 5.0 update it stopped working. I've been trying to fix it but hazel reports the files content as empty, and it can't match the data. Anyone having this issue? Those .XMP file are just text files so it's contents should be readable by Hazel but I've tried multiple times, even with old files that worked in the past and always get the same result, the rule doesn't match because "contents" is empty. Any idea about how to fix it?

Thanks

Re: XMP issue since v5.0

PostPosted: Mon Dec 28, 2020 10:12 am
by Mr_Noodle
Try the mdls command on the file to see how Spotlight is characterizing them and post the output from that. Also, are you using "Contents contain" or "Contents contain match".

Re: XMP issue since v5.0

PostPosted: Mon Dec 28, 2020 11:06 am
by squaredpx
Thanks for the quick reply. I'm using "contents contain match". Here is the output from the mdls command on one of those files:
Code: Select all
_kMDItemDisplayNameWithExtensions      = "DSC01218.xmp"
kMDItemContentCreationDate             = 2020-12-27 20:30:11 +0000
kMDItemContentCreationDate_Ranking     = 2020-12-27 00:00:00 +0000
kMDItemContentModificationDate         = 2020-12-27 20:30:11 +0000
kMDItemContentModificationDate_Ranking = 2020-12-27 00:00:00 +0000
kMDItemContentType                     = "com.seriflabs.xmp"
kMDItemContentTypeTree                 = (
    "com.seriflabs.xmp",
    "public.xml",
    "public.text",
    "public.data",
    "public.item",
    "public.content"
)
kMDItemDateAdded                       = 2020-12-28 14:58:18 +0000
kMDItemDateAdded_Ranking               = 2020-12-28 00:00:00 +0000
kMDItemDisplayName                     = "DSC01218.xmp"
kMDItemDocumentIdentifier              = 0
kMDItemFSContentChangeDate             = 2020-12-27 20:30:11 +0000
kMDItemFSCreationDate                  = 2020-12-27 20:30:11 +0000
kMDItemFSCreatorCode                   = ""
kMDItemFSFinderFlags                   = 0
kMDItemFSHasCustomIcon                 = (null)
kMDItemFSInvisible                     = 0
kMDItemFSIsExtensionHidden             = 0
kMDItemFSIsStationery                  = (null)
kMDItemFSLabel                         = 0
kMDItemFSName                          = "DSC01218.xmp"
kMDItemFSNodeCount                     = (null)
kMDItemFSOwnerGroupID                  = 20
kMDItemFSOwnerUserID                   = 501
kMDItemFSSize                          = 8878
kMDItemFSTypeCode                      = ""
kMDItemInterestingDate_Ranking         = 2020-12-27 00:00:00 +0000
kMDItemKind                            = "XMP Sidecar"
kMDItemLastUsedDate                    = 2020-12-27 20:34:03 +0000
kMDItemLastUsedDate_Ranking            = 2020-12-27 00:00:00 +0000
kMDItemLogicalSize                     = 8878
kMDItemPhysicalSize                    = 12288
kMDItemUseCount                        = 1
kMDItemUsedDates                       = (
    "2020-12-26 23:00:00 +0000"
)

Re: XMP issue since v5.0

PostPosted: Tue Dec 29, 2020 11:23 am
by Mr_Noodle
In the preview, can you click on the badge for the "Contents contain match" condition and see what the contents look like there?

Re: XMP issue since v5.0

PostPosted: Sat Jan 02, 2021 11:08 am
by squaredpx
Sorry for the delay... the "contents" on those file were empty... but... I haven't been able to check those file in a few days and when I came back today the hazel rules have been applied... I don't know when/how it happened (those file were in that folder a couple of days before and nothing happened (contents were empty) and after a few days more suddenly de content were filled and triggers the rule...
I've now test it with new files and again, empty contents and no rule trigger (although other hazel rules for the same folder are working fine with other types of documents). Those XMP files seem lazy ;)