mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
move string.Replace extension
This commit is contained in:
parent
248c09b642
commit
54f736af62
1 changed files with 2 additions and 8 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue