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