Posted by: Admin
« on: September 11, 2019, 19:48:42 »Sorry for the delay, I think you want this:
Code: [Select]
// unmark all files
results.audio.unmark();
// simple mark by lower bitrate
var dups = results.audio.dups;
for (var idx = 0; idx < dups.length; ++idx) {
// skip counter-pair (1-2 and 2-1), process pair only once
if (dups[idx].item1.path > dups[idx].item2.path) continue;
// check for our special tag restrictions
//if (!checkRestrictions(dups[idx].item1, dups[idx].item2)) continue;
// ok now we select by our priority
if (dups[idx].item1.analysis.rating > dups[idx].item2.analysis.rating && dups[idx].item1.audio.bitrate > dups[idx].item2.audio.bitrate)
dups[idx].item2.marked = true;
}