Fixed filter autocomplete

This commit is contained in:
zeldaroot 2021-04-10 02:55:16 +03:00
parent db24a4724f
commit 1de78e6f1e

View file

@ -1388,10 +1388,7 @@ if (Math.ceil(os.freemem()) < 50) {
set_info = true;
}
}
} else {
set_info = true;
}
if (sup_parse_no[0] && sup_parse_no[1]) {
} else if (sup_parse_no[0] && sup_parse_no[1]) {
sup_parse_no[0] = sup_parse_no[0].replace(
/(^"*)|("*)$/g,
''
@ -1593,12 +1590,24 @@ if (Math.ceil(os.freemem()) < 50) {
.replace(/\s*,\s*/g, ',')
.replace(/\s+/g, ' ')
.replace(/(^\s*)|(\s*)$/g, '');
var actor_arr = movie['actor'].split(',');
movie['actor'] = actor_arr
.filter(function(item, pos) {
return actor_arr.indexOf(item) === pos;
})
.join(',');
}
if (movie['director']) {
movie['director'] = (movie['director'] + '')
.replace(/\s*,\s*/g, ',')
.replace(/\s+/g, ' ')
.replace(/(^\s*)|(\s*)$/g, '');
var director_arr = movie['director'].split(',');
movie['director'] = director_arr
.filter(function(item, pos) {
return director_arr.indexOf(item) === pos;
})
.join(',');
}
if (movie['poster']) {
if (