I’m looking for a way to find duplicates based on just the URL. Meaning items that have the same URL as another item in the database (but are not marked as a duplicate because e.g. their content differs).
I could ‘step’ through every item in the database and do a lookup for the URL, but is there a more efficient / easier way?
That’s the only possibility via AppleScript/JXA.
In JXA, I’d use an object with the URL as “key” and an array of UUIDs as value. That shouldn’t require more than 15 lines of code, I think.
Are you looking for a specific URL or just files that have matching URLs?
Matching URLs. My use case is that I’m clipping content to PDF but might have that content in my database already and I’m only finding out afterwards.
My current ‘workaround’ is checking the URL on import and tag the file as a duplicate (or giving another warning)
See Script: Lookup Safari URL in open databases.