The hash can be different if the destination alters the file but the url is the same.
media.js
async function findHashDuplicates(medias) { const hashes = medias.map(media => media.meta?.hash || media.entry?.hash).filter(Boolean); const srcs = medias.map(media => media.src).filter(Boolean); const existingHashMediaEntries = await knex('media').whereIn('hash', hashes); const existingHashMediaEntriesByHash = itemsByKey(existingHashMediaEntries, 'hash'); const existingSourceMediaEntries = await knex('media').whereIn('source', srcs); const existingSourceMediaEntriesBySource = itemsByKey(existingSourceMediaEntries, 'source'); const uniqueHashMedias = medias.filter(media => !media.entry && !existingSourceMediaEntriesBySource[media.src] && !existingHashMediaEntriesByHash[media.meta?.hash]);
pendulum/traxxx#14
No dependencies set.
The note is not visible to the blocked user.
The hash can be different if the destination alters the file but the url is the same.
media.js
pendulum/traxxx#14