Compare SAUCE for --update propertly

This commit is contained in:
Bryan Ashby 2018-12-29 13:28:08 -07:00
parent 6b02ddbdae
commit 78484a2352
1 changed files with 6 additions and 1 deletions

View File

@ -257,11 +257,16 @@ function scanFileAreaForChanges(areaInfo, options, cb) {
const optTags = Array.isArray(options.tags) ? new Set(options.tags) : existingEntry.hashTags;
const tagsEq = _.isEqual(optTags, existingEntry.hashTags);
let descSauceCompare;
if(existingEntry.meta.desc_sauce) {
descSauceCompare = JSON.stringify(existingEntry.meta.desc_sauce);
}
if( tagsEq &&
fileEntry.desc === existingEntry.desc &&
fileEntry.descLong === existingEntry.descLong &&
fileEntry.meta.est_release_year === existingEntry.meta.est_release_year &&
fileEntry.meta.desc_sauce === existingEntry.meta.desc_sauce
fileEntry.meta.desc_sauce === descSauceCompare
)
{
console.info('Dupe');