Changed url reload
This commit is contained in:
parent
3d6a048a16
commit
73ae598c45
|
@ -212,6 +212,9 @@ function moviesGet(query, count, sorting, page, structure, options, callback) {
|
|||
|
||||
if (query.from) {
|
||||
q._from = query.from;
|
||||
if (process.env['CP_RT'] && q._from === process.env['CP_RT']) {
|
||||
q._from = 'rt_' + config.database.all_movies.replace(/[^a-z0-9]/gi, '_');
|
||||
}
|
||||
delete query.from;
|
||||
} else {
|
||||
q._from =
|
||||
|
@ -219,10 +222,9 @@ function moviesGet(query, count, sorting, page, structure, options, callback) {
|
|||
process.env['CP_XMLPIPE2'] !== process.env['CP_RT']
|
||||
? process.env['CP_XMLPIPE2'] + ', '
|
||||
: '') + process.env['CP_RT'];
|
||||
}
|
||||
|
||||
if (!q._from || q._from.indexOf(',') === -1) {
|
||||
q._from = 'rt_' + config.database.all_movies.replace(/[^a-z0-9]/gi, '_');
|
||||
if (!q._from || q._from.indexOf(',') === -1) {
|
||||
q._from = 'rt_' + config.database.all_movies.replace(/[^a-z0-9]/gi, '_');
|
||||
}
|
||||
}
|
||||
|
||||
if (query.full) {
|
||||
|
|
|
@ -110,7 +110,8 @@
|
|||
if (err) {
|
||||
self.innerHTML = '<span class="fa fa-bug"></span> ' + err;
|
||||
} else {
|
||||
window.location.href += (window.location.href.indexOf('?') + 1 ? '&' : '?') + 'reload';
|
||||
var href = window.location.href.replace(/\?reload=.*/ig,'').replace(/&reload=.*/ig,'');
|
||||
window.location.href = href + (href.indexOf('?') + 1 ? '&' : '?') + 'reload=' + Math.random().toString(36).substr(2, 5);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -159,7 +160,8 @@
|
|||
|
||||
setTimeout(function() {
|
||||
if (stop) return;
|
||||
window.location.href += (window.location.href.indexOf('?') + 1 ? '&' : '?') + 'reload';
|
||||
var href = window.location.href.replace(/\?reload=.*/ig,'').replace(/&reload=.*/ig,'');
|
||||
window.location.href = href + (href.indexOf('?') + 1 ? '&' : '?') + 'reload=' + Math.random().toString(36).substr(2, 5);
|
||||
}, 25000);
|
||||
}
|
||||
|
||||
|
@ -187,7 +189,8 @@
|
|||
|
||||
setTimeout(function() {
|
||||
if (stop) return;
|
||||
window.location.href += (window.location.href.indexOf('?') + 1 ? '&' : '?') + 'reload';
|
||||
var href = window.location.href.replace(/\?reload=.*/ig,'').replace(/&reload=.*/ig,'');
|
||||
window.location.href = href + (href.indexOf('?') + 1 ? '&' : '?') + 'reload=' + Math.random().toString(36).substr(2, 5);
|
||||
}, 25000);
|
||||
|
||||
}
|
||||
|
@ -211,13 +214,15 @@
|
|||
} else {
|
||||
self.innerHTML = '<i class="fa fa-sync-alt"></i>';
|
||||
self.addEventListener('click', reloadMoviesData);
|
||||
window.location.href += (window.location.href.indexOf('?') + 1 ? '&' : '?') + 'reload';
|
||||
var href = window.location.href.replace(/\?reload=.*/ig,'').replace(/&reload=.*/ig,'');
|
||||
window.location.href = href + (href.indexOf('?') + 1 ? '&' : '?') + 'reload=' + Math.random().toString(36).substr(2, 5);
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
if (stop) return;
|
||||
window.location.href += (window.location.href.indexOf('?') + 1 ? '&' : '?') + 'reload';
|
||||
var href = window.location.href.replace(/\?reload=.*/ig,'').replace(/&reload=.*/ig,'');
|
||||
window.location.href = href + (href.indexOf('?') + 1 ? '&' : '?') + 'reload=' + Math.random().toString(36).substr(2, 5);
|
||||
}, 25000);
|
||||
|
||||
}
|
||||
|
@ -249,7 +254,8 @@
|
|||
|
||||
setTimeout(function() {
|
||||
if (stop) return;
|
||||
window.location.href += (window.location.href.indexOf('?') + 1 ? '&' : '?') + 'reload';
|
||||
var href = window.location.href.replace(/\?reload=.*/ig,'').replace(/&reload=.*/ig,'');
|
||||
window.location.href = href + (href.indexOf('?') + 1 ? '&' : '?') + 'reload=' + Math.random().toString(36).substr(2, 5);
|
||||
}, 25000);
|
||||
|
||||
}
|
||||
|
@ -281,7 +287,8 @@
|
|||
|
||||
setTimeout(function() {
|
||||
if (stop) return;
|
||||
window.location.href += (window.location.href.indexOf('?') + 1 ? '&' : '?') + 'reload';
|
||||
var href = window.location.href.replace(/\?reload=.*/ig,'').replace(/&reload=.*/ig,'');
|
||||
window.location.href = href + (href.indexOf('?') + 1 ? '&' : '?') + 'reload=' + Math.random().toString(36).substr(2, 5);
|
||||
}, 25000);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue