mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
move string.Replace extension
This commit is contained in:
parent
248c09b642
commit
54f736af62
@ -230,15 +230,9 @@
|
|||||||
return deferred.promise();
|
return deferred.promise();
|
||||||
}
|
}
|
||||||
|
|
||||||
function replaceServerAddress(url, newBaseUrl) {
|
function replaceServerAddress(url, oldBaseUrl, newBaseUrl) {
|
||||||
|
|
||||||
var index = url.toLowerCase().indexOf("/mediabrowser");
|
return url.replace(oldBaseUrl, newBaseUrl);
|
||||||
|
|
||||||
if (index != -1) {
|
|
||||||
return newBaseUrl + url.substring(index);
|
|
||||||
}
|
|
||||||
|
|
||||||
return url;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.ajaxWithFailover = function (request, deferred, enableReconnection, replaceUrl) {
|
self.ajaxWithFailover = function (request, deferred, enableReconnection, replaceUrl) {
|
||||||
|
Loading…
Reference in New Issue
Block a user