i try to color-code tracks (all fields of the track would be nice, but just the title would also be ok) in the main view, if a keyword is found in the tracks comment (example here "DUPLIKAT"). I used the "Highlight Bitrate" addon as a template, but the syntax of "includes" seems to fail me.
Code: Select all
// highlight track if comment contains 'DUPLIKAT'
uitools.tracklistFieldDefs.title.override({
bindData: function ($super, div, item) {
$super(div, item);
var CommentCheck = item.comment;
div.style.fontWeight = '';
if (CommentCheck.includes('DUPLIKAT')) {
div.style.color = 'blue';
} else
div.style.color = '';
}
});
Can anyone show me, what's wrong?