mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update channel db
This commit is contained in:
parent
abdf95b4d7
commit
519af58a6a
10 changed files with 91 additions and 60 deletions
|
@ -31,6 +31,6 @@
|
|||
"commit": "34fc5e4a0f252964ed2790138b8d7d30d04b55c1"
|
||||
},
|
||||
"_source": "git://github.com/desandro/get-style-property.git",
|
||||
"_target": "1.x",
|
||||
"_target": "~1.0.4",
|
||||
"_originalSource": "get-style-property"
|
||||
}
|
1
dashboard-ui/cordova/android/iap.js
vendored
1
dashboard-ui/cordova/android/iap.js
vendored
|
@ -89,6 +89,7 @@
|
|||
}).map(function (o) {
|
||||
|
||||
o.buttonText = Globalize.translate(o.buttonText, getProduct(o.feature).price);
|
||||
o.owned = getProduct(o.feature).owned;
|
||||
return o;
|
||||
});
|
||||
|
||||
|
|
51
dashboard-ui/cordova/iap.js
vendored
51
dashboard-ui/cordova/iap.js
vendored
|
@ -14,9 +14,9 @@
|
|||
|
||||
function updateProductInfo(product) {
|
||||
|
||||
if (product.id == 'appunlock') {
|
||||
product.owned = false;
|
||||
}
|
||||
//if (product.id == 'appunlock') {
|
||||
// product.owned = false;
|
||||
//}
|
||||
|
||||
updatedProducts = updatedProducts.filter(function (r) {
|
||||
return r.id != product.id;
|
||||
|
@ -51,20 +51,42 @@
|
|||
enteredEmail = email;
|
||||
}
|
||||
|
||||
validationCache = {};
|
||||
|
||||
var id = getStoreFeatureId(feature);
|
||||
store.order(id);
|
||||
}
|
||||
|
||||
function restorePurchase(id) {
|
||||
validationCache = {};
|
||||
store.refresh();
|
||||
}
|
||||
|
||||
var validationCache = {};
|
||||
|
||||
function validateProduct(product, callback) {
|
||||
|
||||
var productId = product.id;
|
||||
var cacheKey = productId + (product.transaction.id || '');
|
||||
|
||||
var cachedResult = validationCache[cacheKey];
|
||||
if (cachedResult && (new Date().getTime() - cachedResult.date) < 60000) {
|
||||
if (cachedResult.result) {
|
||||
callback(true, product);
|
||||
} else {
|
||||
callback(false, {
|
||||
code: cachedResult.errorCode,
|
||||
error: {
|
||||
message: cachedResult.errorMessage
|
||||
}
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// product attributes:
|
||||
// https://github.com/j3k0/cordova-plugin-purchase/blob/master/doc/api.md#validation-error-codes
|
||||
|
||||
var productId = product.id;
|
||||
var receipt = product.transaction.appStoreReceipt;
|
||||
var price = product.price;
|
||||
|
||||
|
@ -94,7 +116,7 @@
|
|||
|
||||
} else {
|
||||
|
||||
promise = ApiClient.ajax({
|
||||
promise = HttpClient.send({
|
||||
type: "POST",
|
||||
url: "http://mb3admin.com/admin/service/appstore/register",
|
||||
data: JSON.stringify(postData),
|
||||
|
@ -107,12 +129,16 @@
|
|||
|
||||
promise.done(function () {
|
||||
|
||||
setCachedResult(cacheKey, true);
|
||||
|
||||
callback(true, product);
|
||||
|
||||
}).fail(function (e) {
|
||||
|
||||
if (e.status == 402) {
|
||||
|
||||
setCachedResult(cacheKey, false, store.PURCHASE_EXPIRED, 'Subscription Expired');
|
||||
|
||||
callback(false, {
|
||||
code: store.PURCHASE_EXPIRED,
|
||||
error: {
|
||||
|
@ -121,7 +147,9 @@
|
|||
});
|
||||
|
||||
} else {
|
||||
alert('validate fail - other');
|
||||
//alert('validate fail - other ' + e.status);
|
||||
|
||||
validationCache = {};
|
||||
|
||||
callback(false, {
|
||||
code: store.CONNECTION_FAILED,
|
||||
|
@ -133,6 +161,16 @@
|
|||
});
|
||||
}
|
||||
|
||||
function setCachedResult(key, result, code, message) {
|
||||
|
||||
validationCache[key] = {
|
||||
date: new Date().getTime(),
|
||||
result: result,
|
||||
errorCode: code,
|
||||
errorMessage: message
|
||||
};
|
||||
}
|
||||
|
||||
function initProduct(id, requiresVerification, type) {
|
||||
|
||||
store.register({
|
||||
|
@ -221,6 +259,7 @@
|
|||
|
||||
o.id = getStoreFeatureId(o.feature);
|
||||
o.buttonText = Globalize.translate(o.buttonText, getProduct(o.feature).price);
|
||||
o.owned = getProduct(o.feature).owned;
|
||||
return o;
|
||||
});
|
||||
|
||||
|
|
9
dashboard-ui/cordova/ios/vlcplayer.js
vendored
9
dashboard-ui/cordova/ios/vlcplayer.js
vendored
|
@ -225,7 +225,14 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (result.state == 4 || result.state == 6) {
|
||||
if (result.type === 'next') {
|
||||
console.log('skip to next audio track'); // typically fired by remote control/lock screen controls
|
||||
MediaPlayer.nextTrack();
|
||||
} else if (result.type === 'previous') {
|
||||
console.log('skip to previous track'); // typically fired by remote/control/lock screen controls
|
||||
MediaPlayer.previousTrack();
|
||||
}
|
||||
else if (result.state == 4 || result.state == 6) {
|
||||
reportEvent('playbackstop', result);
|
||||
}
|
||||
else {
|
||||
|
|
59
dashboard-ui/cordova/registrationservices.js
vendored
59
dashboard-ui/cordova/registrationservices.js
vendored
|
@ -1,36 +1,23 @@
|
|||
(function () {
|
||||
|
||||
function validateServerManagement(deferred) {
|
||||
deferred.resolve();
|
||||
}
|
||||
|
||||
function getRegistrationInfo(feature) {
|
||||
|
||||
return ConnectionManager.getRegistrationInfo(feature, ApiClient);
|
||||
}
|
||||
|
||||
var validatedFeatures = [];
|
||||
|
||||
function validateFeature(feature, deferred) {
|
||||
|
||||
if (validatedFeatures.indexOf(feature) != -1) {
|
||||
deferred.resolve();
|
||||
return;
|
||||
}
|
||||
var unlockableProduct = IapManager.getProductInfo(feature) || {};
|
||||
|
||||
var info = IapManager.getProductInfo(feature) || {};
|
||||
|
||||
if (info.owned) {
|
||||
notifyServer(info.id);
|
||||
validatedFeatures.push(feature);
|
||||
if (unlockableProduct.owned) {
|
||||
deferred.resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
var unlockableProductInfo = IapManager.isPurchaseAvailable(feature) ? {
|
||||
enableAppUnlock: IapManager.isPurchaseAvailable(feature),
|
||||
id: info.id,
|
||||
price: info.price,
|
||||
enableAppUnlock: true,
|
||||
id: unlockableProduct.id,
|
||||
price: unlockableProduct.price,
|
||||
feature: feature
|
||||
|
||||
} : null;
|
||||
|
@ -41,13 +28,19 @@
|
|||
getRegistrationInfo(prefix + 'appunlock').done(function (registrationInfo) {
|
||||
|
||||
if (registrationInfo.IsRegistered) {
|
||||
validatedFeatures.push(feature);
|
||||
deferred.resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
IapManager.getSubscriptionOptions().done(function (subscriptionOptions) {
|
||||
|
||||
if (subscriptionOptions.filter(function (p) {
|
||||
return p.owned;
|
||||
}).length > 0) {
|
||||
deferred.resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
var dialogOptions = {
|
||||
title: Globalize.translate('HeaderUnlockApp')
|
||||
};
|
||||
|
@ -60,33 +53,6 @@
|
|||
});
|
||||
}
|
||||
|
||||
function notifyServer(id) {
|
||||
|
||||
if (!$.browser.android) {
|
||||
return;
|
||||
}
|
||||
|
||||
HttpClient.send({
|
||||
type: "POST",
|
||||
url: "https://mb3admin.com/admin/service/appstore/addDeviceFeature",
|
||||
data: {
|
||||
deviceId: ConnectionManager.deviceId(),
|
||||
feature: 'com.mb.android.unlock'
|
||||
},
|
||||
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
|
||||
headers: {
|
||||
"X-EMBY-TOKEN": "EMBY_DEVICE"
|
||||
}
|
||||
|
||||
}).done(function (result) {
|
||||
|
||||
Logger.log('addDeviceFeature succeeded');
|
||||
|
||||
}).fail(function () {
|
||||
Logger.log('addDeviceFeature failed');
|
||||
});
|
||||
}
|
||||
|
||||
function cancelInAppPurchase() {
|
||||
|
||||
var elem = document.querySelector('.inAppPurchaseOverlay');
|
||||
|
@ -288,7 +254,6 @@
|
|||
getRegistrationInfo('Sync').done(function (registrationInfo) {
|
||||
|
||||
if (registrationInfo.IsRegistered) {
|
||||
validatedFeatures.push(feature);
|
||||
deferred.resolve();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
.searchInputIcon {
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
top: 12px;
|
||||
top: 18px;
|
||||
color: #ddd !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -859,6 +859,8 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
var scrollX = false;
|
||||
|
||||
if (item.Type == "MusicAlbum") {
|
||||
|
||||
html = LibraryBrowser.getListViewHtml({
|
||||
|
@ -874,9 +876,12 @@
|
|||
|
||||
}
|
||||
else if (item.Type == "Series") {
|
||||
|
||||
scrollX = enableScrollX();
|
||||
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "detailPagePortrait",
|
||||
shape: getPortraitShape(),
|
||||
showTitle: false,
|
||||
centerText: true,
|
||||
context: context,
|
||||
|
@ -911,6 +916,12 @@
|
|||
elem.innerHTML = html;
|
||||
ImageLoader.lazyChildren(elem);
|
||||
|
||||
if (scrollX) {
|
||||
elem.classList.add('hiddenScrollX');
|
||||
} else {
|
||||
elem.classList.remove('hiddenScrollX');
|
||||
}
|
||||
|
||||
if (item.Type == "BoxSet") {
|
||||
|
||||
var collectionItemTypes = [
|
||||
|
|
|
@ -88,7 +88,8 @@
|
|||
items: result.Items,
|
||||
shape: "auto",
|
||||
centerText: true,
|
||||
lazy: true
|
||||
lazy: true,
|
||||
coverImage: item.Type == 'PhotoAlbum'
|
||||
};
|
||||
|
||||
if (view == "Backdrop") {
|
||||
|
|
|
@ -599,7 +599,10 @@
|
|||
|
||||
// This should be outside of the IF
|
||||
// But for now, if you change songs but keep the same artist, the backdrop will flicker because in-between songs it clears out the image
|
||||
if (!$.browser.safari) {
|
||||
// Exclude from safari because it just doesn't perform well
|
||||
Backdrops.setBackdropUrl(page, backdropUrl);
|
||||
}
|
||||
|
||||
ApiClient.getItem(Dashboard.getCurrentUserId(), item.Id).done(function (fullItem) {
|
||||
page.querySelector('.nowPlayingPageUserDataButtons').innerHTML = LibraryBrowser.getUserDataIconsHtml(fullItem, false);
|
||||
|
|
|
@ -387,7 +387,11 @@
|
|||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
|
||||
$('.categorySyncButton', page).visible(user.Policy.EnableSync);
|
||||
var item = {
|
||||
SupportsSync: true
|
||||
};
|
||||
|
||||
$('.categorySyncButton', page).visible(isAvailable(item));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue