Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Commit

Permalink
update connection methods
Browse files Browse the repository at this point in the history
  • Loading branch information
LukePulverenti committed Jun 17, 2018
1 parent 2efea4f commit 5c99760
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions apiclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,13 @@ class ApiClient {
* @param {String} name
* @param {Object} params
*/
getUrl(name, params) {
getUrl(name, params, serverAddress) {

if (!name) {
throw new Error("Url name cannot be empty");
}

let url = this._serverAddress;
let url = serverAddress || this._serverAddress;

if (!url) {
throw new Error("serverAddress is yet not set");
Expand Down Expand Up @@ -3602,7 +3602,7 @@ function getTryConnectPromise(instance, url, state, resolve, reject) {

console.log('getTryConnectPromise ' + url);

fetchWithTimeout(url + "/system/info/public", {
fetchWithTimeout(instance.getUrl('system/info/public', null, url), {

method: 'GET',
accept: 'application/json'
Expand Down
2 changes: 1 addition & 1 deletion connectionmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ export default class ConnectionManager {

ajax({

url: url + "/system/info/public",
url: getEmbyServerUrl(url, 'system/info/public'),
timeout: defaultTimeout,
type: 'GET',
dataType: 'json'
Expand Down

0 comments on commit 5c99760

Please sign in to comment.