Fix duplicate debug output
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
8d70f5dc54
commit
87d0b95b39
@ -316,7 +316,6 @@ const processBlock = async (items) => {
|
|||||||
let duplicate = insertHash.find(entry => entry.hash === asset.hash)
|
let duplicate = insertHash.find(entry => entry.hash === asset.hash)
|
||||||
|| updateHash.find(entry => entry.hash === asset.hash);
|
|| updateHash.find(entry => entry.hash === asset.hash);
|
||||||
|
|
||||||
|
|
||||||
let results = [];
|
let results = [];
|
||||||
|
|
||||||
/* In addition to checking new entries, check the DB for old
|
/* In addition to checking new entries, check the DB for old
|
||||||
@ -336,16 +335,16 @@ const processBlock = async (items) => {
|
|||||||
} else if (results[0].hash != asset.hash) {
|
} else if (results[0].hash != asset.hash) {
|
||||||
updateHash.push(asset);
|
updateHash.push(asset);
|
||||||
} else if (results[0].photoId != asset.id) {
|
} else if (results[0].photoId != asset.id) {
|
||||||
duplicate = true;
|
duplicate = results[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (duplicate) {
|
if (duplicate) {
|
||||||
setStatus("Duplicate asset: " +
|
setStatus("Duplicate asset: " +
|
||||||
"'" + asset.album.path + asset.filename + "' is a copy of " +
|
"'" + asset.album.path + asset.filename + "' is a copy of " +
|
||||||
"'" + results[0].path + results[0].filename + "'");
|
"'" + duplicate.album.path + duplicate.filename + "'");
|
||||||
if (asset.duplicate != results[0].photoId) {
|
if (asset.duplicate != duplicate.photoId) {
|
||||||
asset.duplicate = results[0].photoId;
|
asset.duplicate = duplicate.photoId;
|
||||||
duplicates.push(asset);
|
duplicates.push(asset);
|
||||||
}
|
}
|
||||||
return; /* Done processing this asset (DUPLICATE) */
|
return; /* Done processing this asset (DUPLICATE) */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user