mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix recording icons
This commit is contained in:
parent
a919223fb2
commit
663412b891
14 changed files with 100 additions and 60 deletions
26
dashboard-ui/cordova/android/iap.js
vendored
26
dashboard-ui/cordova/android/iap.js
vendored
|
@ -51,10 +51,7 @@
|
|||
if (feature == 'embypremieremonthly') {
|
||||
return MainActivity.purchasePremiereMonthly(email);
|
||||
}
|
||||
if (feature == 'embypremiereweekly') {
|
||||
return MainActivity.purchasePremiereWeekly(email);
|
||||
}
|
||||
return MainActivity.purchaseUnlock(email);
|
||||
return MainActivity.purchaseUnlock();
|
||||
}
|
||||
|
||||
function onPurchaseComplete(result) {
|
||||
|
@ -97,10 +94,9 @@
|
|||
|
||||
var deferred = DeferredBuilder.Deferred();
|
||||
|
||||
if (feature == 'playback') {
|
||||
isPlaybackUnlockedViaOldApp(deferred);
|
||||
} else if (feature == 'livetv') {
|
||||
isLiveTvUnlockedViaOldApp(deferred);
|
||||
if (feature == 'playback' || feature == 'livetv') {
|
||||
deferred.resolveWith(null, [false]);
|
||||
//isPlaybackUnlockedViaOldApp(deferred);
|
||||
} else {
|
||||
deferred.resolveWith(null, [false]);
|
||||
}
|
||||
|
@ -131,16 +127,17 @@
|
|||
|
||||
function testDeviceId(deviceId) {
|
||||
|
||||
var deferred = DeferredBuilder.Deferred();
|
||||
|
||||
var cacheKey = 'oldapp-' + deviceId;
|
||||
var cacheValue = appStorage.getItem(cacheKey);
|
||||
if (cacheValue) {
|
||||
|
||||
var deferred = DeferredBuilder.Deferred();
|
||||
deferred.resolveWith(null, [cacheValue == 'true']);
|
||||
return deferred.promise();
|
||||
|
||||
} else {
|
||||
HttpClient.send({
|
||||
return HttpClient.send({
|
||||
|
||||
type: 'GET',
|
||||
url: 'https://mb3admin.com/admin/service/statistics/appAccess?application=AndroidV1&deviceId=' + deviceId
|
||||
|
@ -148,23 +145,14 @@
|
|||
}).done(function () {
|
||||
|
||||
appStorage.setItem(cacheKey, 'true');
|
||||
deferred.resolveWith(null, [true]);
|
||||
|
||||
}).fail(function (e) {
|
||||
|
||||
if (e.status == 404) {
|
||||
appStorage.setItem(cacheKey, 'false');
|
||||
}
|
||||
deferred.resolveWith(null, [false]);
|
||||
});
|
||||
}
|
||||
|
||||
return deferred.promise();
|
||||
}
|
||||
|
||||
function isLiveTvUnlockedViaOldApp(deferred) {
|
||||
|
||||
isPlaybackUnlockedViaOldApp(deferred);
|
||||
}
|
||||
|
||||
window.IapManager = {
|
||||
|
|
31
dashboard-ui/cordova/imagestore.js
vendored
31
dashboard-ui/cordova/imagestore.js
vendored
|
@ -111,6 +111,11 @@
|
|||
setImageIntoElement(elem, url);
|
||||
}
|
||||
|
||||
//if ($.browser.safari) {
|
||||
// setImageWithSdWebImage(elem, url);
|
||||
// return;
|
||||
//}
|
||||
|
||||
self.getImageUrl(url).done(function (localUrl) {
|
||||
|
||||
setImageIntoElement(elem, localUrl);
|
||||
|
@ -118,6 +123,32 @@
|
|||
}).fail(onFail);
|
||||
};
|
||||
|
||||
var imageIdIndex = 1;
|
||||
|
||||
function setImageWithSdWebImage(elem, url) {
|
||||
|
||||
var rect = elem.getBoundingClientRect();
|
||||
|
||||
var options = {
|
||||
data: url,
|
||||
index: imageIdIndex,
|
||||
quality: 0,
|
||||
scale: Math.round(rect.width) + 'x' + Math.round(rect.height),
|
||||
downloadOptions: window.CollectionRepeatImageOptions.SDWebImageRetryFailed | window.CollectionRepeatImageOptions.SDWebImageLowPriority | window.CollectionRepeatImageOptions.SDWebImageAllowInvalidSSLCertificates
|
||||
};
|
||||
|
||||
if (elem.classList.contains('coveredCardImage')) {
|
||||
options.scale += '!';
|
||||
}
|
||||
|
||||
imageIdIndex++;
|
||||
|
||||
window.CollectionRepeatImage.getImage(options, function (data) {
|
||||
var dataUrl = 'data:image/jpeg;base64,' + data;
|
||||
elem.style.backgroundImage = "url('" + dataUrl + "')";
|
||||
});
|
||||
}
|
||||
|
||||
window.ImageStore = self;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue