scale image sizes depending on pixel ratio
This commit is contained in:
parent
5677ce1011
commit
4962827f56
6 changed files with 51 additions and 27 deletions
|
@ -2087,6 +2087,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
|
|||
}
|
||||
}
|
||||
|
||||
options.quality = options.quality || (options.type.toLowerCase() == 'backdrop' ? 80 : 90);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2117,12 +2118,12 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
|
|||
url += "/" + options.index;
|
||||
}
|
||||
|
||||
normalizeImageOptions(options);
|
||||
|
||||
// Don't put these on the query string
|
||||
delete options.type;
|
||||
delete options.index;
|
||||
|
||||
normalizeImageOptions(options);
|
||||
|
||||
return self.getUrl(url, options);
|
||||
};
|
||||
|
||||
|
@ -2154,12 +2155,12 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
|
|||
url += "/" + options.index;
|
||||
}
|
||||
|
||||
normalizeImageOptions(options);
|
||||
|
||||
// Don't put these on the query string
|
||||
delete options.type;
|
||||
delete options.index;
|
||||
|
||||
normalizeImageOptions(options);
|
||||
|
||||
return self.getUrl(url, options);
|
||||
};
|
||||
|
||||
|
@ -2191,13 +2192,15 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
|
|||
url += "/" + options.index;
|
||||
}
|
||||
|
||||
options.quality = options.quality || (options.type.toLowerCase() == 'backdrop' ? 80 : 90);
|
||||
|
||||
// Don't put these on the query string
|
||||
delete options.type;
|
||||
delete options.index;
|
||||
|
||||
return self.getUrl(url, options);
|
||||
};
|
||||
|
||||
|
||||
self.getScaledImageUrl = function (itemId, options) {
|
||||
|
||||
if (!itemId) {
|
||||
|
@ -2212,12 +2215,12 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
|
|||
url += "/" + options.index;
|
||||
}
|
||||
|
||||
normalizeImageOptions(options);
|
||||
|
||||
// Don't put these on the query string
|
||||
delete options.type;
|
||||
delete options.index;
|
||||
|
||||
normalizeImageOptions(options);
|
||||
|
||||
return self.getUrl(url, options);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue