MediaInfo-based extended columns & commands v0.9, released on GitHub

Solved it

     var name_cleanup = function(){return{
        "nameOnly": [
            ["/x264|x265|H264|H265|DX50|DivX5|DivX4|DivX|XviD|VP9|VP6F|FLV1|HEVC|MPEG4|MP4V|MP42/ig",      ""],
            ["/AAC|AC3|DTS|MP3|OGG/ig",                                                          ""],
            ["/240p|320p|360p|480p|540p|640p|720p|960p|1080p|1440p|2160p|4K|UHD/ig",             ""],
            ["/(_|\\.)/g",                                                                        " " ],
            ["/(\\d+).+$/g",                                                                      "$1" ],
            ["/\\s+/g",                                                                           " " ],
            ["/-\\s*-/g",                                                                         "-" ]
        ],
        "extOnly": [
        ]
    }

add code to remove the comment line.

String.prototype.removecommentline = function () {
    return this.replace(/^\s*\/\/.*$/mg, '');
};
    JSON.stringify(JSON.parse(lookup_resolutions.removecommentline())); // test parseability on script load, do not remove
    config.addString('ref_lookup_resolutions', lookup_resolutions.normalizeLeadingWhiteSpace(), 'REF_LOOKUP_RESOLUTIONS');
    config.addPOJO('lookup_resolutions', JSON.parse(lookup_resolutions.removecommentline()), 'LOOKUP_RESOLUTIONS');
1 Like