Fixed RSS single movie
This commit is contained in:
parent
5c997082c9
commit
0a69937a8c
2 changed files with 12 additions and 4 deletions
|
@ -433,7 +433,10 @@ function moviesGet(query, count, sorting, page, structure, options, callback) {
|
|||
where.push('`imdb_rating` <= ' + imdb_rating_end);
|
||||
}
|
||||
} else if (attribute === 'query_id' && search.indexOf('|') === -1) {
|
||||
where.push('`id` = ' + search);
|
||||
search = search.replace(/[^0-9]/g, '');
|
||||
if (search) {
|
||||
where.push('`id` = ' + search);
|
||||
}
|
||||
} else {
|
||||
if (attribute === 'genre') {
|
||||
match = match.filter(function(m) {
|
||||
|
|
|
@ -190,12 +190,17 @@ router.get('/?', function(req, res, next) {
|
|||
)
|
||||
.split(',')
|
||||
.map(function(key) {
|
||||
return parseInt(key.trim());
|
||||
});
|
||||
return key ? parseInt(key.trim()) : '';
|
||||
})
|
||||
.filter(Boolean);
|
||||
if (items && items.length) {
|
||||
var query_id = [];
|
||||
items.forEach(function(item, i, arr) {
|
||||
query_id.push(item + '^' + (arr.length - i));
|
||||
if (arr.length >= 2) {
|
||||
query_id.push(item + '^' + (arr.length - i));
|
||||
} else {
|
||||
query_id.push(item);
|
||||
}
|
||||
});
|
||||
var query = { query_id: query_id.join('|') };
|
||||
CP_get.movies(query, items.length, '', 1, true, options, function(
|
||||
|
|
Loading…
Reference in a new issue