Added trim query year

This commit is contained in:
zeldaroot 2021-06-06 02:49:47 +03:00
parent 8dd50d1c15
commit 1f24988728
2 changed files with 28 additions and 5 deletions

View File

@ -818,6 +818,15 @@ ip_install() {
echo "${PRC_}% database" >>/var/log/docker_log_"$(date '+%d_%m_%Y')".log
_header "MOVIES"
_content
_content "Update movies information"
_content "using the instructions:"
_content "https://enota.club/threads/3043"
_content
_s
exit 0
if [ "$(grep "_uptimerobot" /etc/crontab)" != "" ]; then
touch "/home/.uptimerobot" &>/dev/null
fi
@ -2789,6 +2798,13 @@ while [ "${WHILE}" -lt "2" ]; do
exit 0
;;
"images" )
_header "IMAGES"
_content
_content "No images!"
_content
_s
exit 0
_br "${3}"
read_domain "${2}"
sh_not
@ -2817,6 +2833,13 @@ while [ "${WHILE}" -lt "2" ]; do
exit 0
;;
"premium" )
_header "PREMIUM"
_content
_content "No premium themes!"
_content
_s
exit 0
_br "${4}"
read_domain "${2}"
sh_not
@ -4895,7 +4918,7 @@ while [ "${WHILE}" -lt "2" ]; do
"version"|"ver"|"v"|"V"|"--version"|"--ver"|"-v"|"-V" )
echo "CinemaPress ${CP_VER}"
_br
echo "Copyright (c) 2014-2020, CinemaPress (https://cinemapress.io)"
echo "Copyright (c) 2014-..., CinemaPress"
_br
exit 0
;;

View File

@ -372,9 +372,9 @@ function moviesGet(query, count, sorting, page, structure, options, callback) {
var str_search = search;
if (/[^0-9]+\s+[0-9]{4}$/.test(search)) {
match.push(
'MAYBE @year (' + search.substr(search.length - 4) + ')'
'MAYBE @year (' + search.substr(search.length - 4).trim() + ')'
);
str_search = search.substring(0, search.length - 4);
str_search = search.substring(0, search.length - 4).trim();
}
match.push('@' + attribute + ' ("' + str_search + '")');
match.push('@' + attribute + ' (' + str_search + ')');
@ -1011,9 +1011,9 @@ function countMoviesGet(query, sorting, callback) {
var str_search = search;
if (/[^0-9]+\s+[0-9]{4}$/.test(search)) {
match.push(
'MAYBE @year (' + search.substr(search.length - 4) + ')'
'MAYBE @year (' + search.substr(search.length - 4).trim() + ')'
);
str_search = search.substring(0, search.length - 4);
str_search = search.substring(0, search.length - 4).trim();
}
match.push('@' + attribute + ' ("' + str_search + '")');
match.push('@' + attribute + ' (' + str_search + ')');