mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update live tv database
This commit is contained in:
parent
8e0dc6d8e4
commit
d4abbd5560
9 changed files with 116 additions and 25 deletions
|
@ -36,7 +36,7 @@
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-width: 740px) {
|
@media all and (max-width: 600px) {
|
||||||
.headerSelectedPlayer {
|
.headerSelectedPlayer {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.flyoutNotification {
|
.flyoutNotification {
|
||||||
border-top: 1px solid #444;
|
border-top: 1px solid #404040;
|
||||||
padding: 0 0 .5em;
|
padding: 0 0 .5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.flyoutNotification:last-child {
|
.flyoutNotification:last-child {
|
||||||
border-bottom: 1px solid #444;
|
border-bottom: 1px solid #404040;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flyoutNotification a {
|
.flyoutNotification a {
|
||||||
|
|
|
@ -124,7 +124,8 @@ var WebNotifications = {
|
||||||
|
|
||||||
show: function (data) {
|
show: function (data) {
|
||||||
|
|
||||||
if (window.cordova && window.cordova.plugins && window.cordova.plugins.notification) {
|
// Seeing crashes in android
|
||||||
|
if (window.cordova && window.cordova.plugins && window.cordova.plugins.notification && !$.browser.android) {
|
||||||
|
|
||||||
if (!WebNotifications.lastId) {
|
if (!WebNotifications.lastId) {
|
||||||
// Cordova plugin will crash on android with long. need an int
|
// Cordova plugin will crash on android with long. need an int
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
elem.popup("open").parents(".ui-popup-container").css("margin-top", 30);
|
elem.popup("open").parents(".ui-popup-container").css("margin-top", 30);
|
||||||
|
|
||||||
if ($.browser.safari) {
|
if ($.browser.safari) {
|
||||||
$('.itemVideo').css('visibility', 'hidden');
|
//$('.itemVideo').css('visibility', 'hidden');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
31
dashboard-ui/thirdparty/apiclient/apiclient.js
vendored
31
dashboard-ui/thirdparty/apiclient/apiclient.js
vendored
|
@ -185,23 +185,30 @@
|
||||||
|
|
||||||
function switchConnectionMode(connectionMode) {
|
function switchConnectionMode(connectionMode) {
|
||||||
|
|
||||||
var newConnectionMode;
|
|
||||||
|
|
||||||
var currentServerInfo = self.serverInfo();
|
var currentServerInfo = self.serverInfo();
|
||||||
|
var newConnectionMode = connectionMode;
|
||||||
|
|
||||||
if (connectionMode == MediaBrowser.ConnectionMode.Local && currentServerInfo.RemoteAddress) {
|
newConnectionMode--;
|
||||||
newConnectionMode = MediaBrowser.ConnectionMode.Remote;
|
if (newConnectionMode < 0) {
|
||||||
}
|
newConnectionMode = MediaBrowser.ConnectionMode.Manual;
|
||||||
else if (connectionMode != MediaBrowser.ConnectionMode.Local && currentServerInfo.LocalAddress) {
|
|
||||||
newConnectionMode = MediaBrowser.ConnectionMode.Local;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
newConnectionMode = connectionMode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (MediaBrowser.ServerInfo.getServerAddress(currentServerInfo, newConnectionMode)) {
|
||||||
return newConnectionMode;
|
return newConnectionMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newConnectionMode--;
|
||||||
|
if (newConnectionMode < 0) {
|
||||||
|
newConnectionMode = MediaBrowser.ConnectionMode.Manual;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (MediaBrowser.ServerInfo.getServerAddress(currentServerInfo, newConnectionMode)) {
|
||||||
|
return newConnectionMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
return connectionMode;
|
||||||
|
}
|
||||||
|
|
||||||
function tryReconnectInternal(deferred, connectionMode, currentRetryCount) {
|
function tryReconnectInternal(deferred, connectionMode, currentRetryCount) {
|
||||||
|
|
||||||
connectionMode = switchConnectionMode(connectionMode);
|
connectionMode = switchConnectionMode(connectionMode);
|
||||||
|
@ -209,13 +216,15 @@
|
||||||
|
|
||||||
logger.log("Attempting reconnection to " + url);
|
logger.log("Attempting reconnection to " + url);
|
||||||
|
|
||||||
|
var timeout = connectionMode == MediaBrowser.ConnectionMode.Local ? 5000 : 15000;
|
||||||
|
|
||||||
AjaxApi.ajax({
|
AjaxApi.ajax({
|
||||||
|
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: url + "/system/info/public",
|
url: url + "/system/info/public",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
|
|
||||||
timeout: 15000
|
timeout: timeout
|
||||||
|
|
||||||
}).done(function () {
|
}).done(function () {
|
||||||
|
|
||||||
|
|
19
dashboard-ui/thirdparty/cordova/android/iap.js
vendored
19
dashboard-ui/thirdparty/cordova/android/iap.js
vendored
|
@ -9,10 +9,14 @@
|
||||||
return r.id != id;
|
return r.id != id;
|
||||||
});
|
});
|
||||||
|
|
||||||
updatedProducts.push({
|
var product = {
|
||||||
id: id,
|
id: id,
|
||||||
owned: owned
|
owned: owned
|
||||||
});
|
};
|
||||||
|
|
||||||
|
updatedProducts.push(product);
|
||||||
|
|
||||||
|
Events.trigger(IapManager, 'productupdated', [product]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hasPurchased(id) {
|
function hasPurchased(id) {
|
||||||
|
@ -39,7 +43,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPurchaseComplete(result) {
|
function onPurchaseComplete(result) {
|
||||||
alert(result);
|
|
||||||
|
if (result) {
|
||||||
|
refreshPurchases();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function refreshPurchases() {
|
||||||
|
NativeIapManager.isPurchased(unlockId, "window.IapManager.updateProduct");
|
||||||
}
|
}
|
||||||
|
|
||||||
window.IapManager = {
|
window.IapManager = {
|
||||||
|
@ -50,6 +61,6 @@
|
||||||
onPurchaseComplete: onPurchaseComplete
|
onPurchaseComplete: onPurchaseComplete
|
||||||
};
|
};
|
||||||
|
|
||||||
NativeIapManager.isPurchased(unlockId, "window.IapManager.updateProduct");
|
refreshPurchases();
|
||||||
|
|
||||||
})();
|
})();
|
|
@ -139,11 +139,30 @@
|
||||||
return deferred.promise();
|
return deferred.promise();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function getCacheKey(url) {
|
||||||
|
|
||||||
|
// Try to strip off the domain to share the cache between local and remote connections
|
||||||
|
var index = url.indexOf('://');
|
||||||
|
|
||||||
|
if (index != -1) {
|
||||||
|
url = url.substring(index + 3);
|
||||||
|
|
||||||
|
index = url.indexOf('/');
|
||||||
|
|
||||||
|
if (index != -1) {
|
||||||
|
url = url.substring(index + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return CryptoJS.MD5(url).toString();
|
||||||
|
}
|
||||||
|
|
||||||
self.getImageUrl = function (originalUrl) {
|
self.getImageUrl = function (originalUrl) {
|
||||||
|
|
||||||
console.log('getImageUrl:' + originalUrl);
|
console.log('getImageUrl:' + originalUrl);
|
||||||
|
|
||||||
var key = CryptoJS.MD5(originalUrl + "1").toString();
|
var key = getCacheKey(originalUrl);
|
||||||
|
|
||||||
var deferred = DeferredBuilder.Deferred();
|
var deferred = DeferredBuilder.Deferred();
|
||||||
|
|
||||||
|
|
19
dashboard-ui/thirdparty/cordova/imagestore.js
vendored
19
dashboard-ui/thirdparty/cordova/imagestore.js
vendored
|
@ -76,12 +76,29 @@
|
||||||
|
|
||||||
return deferred.promise();
|
return deferred.promise();
|
||||||
};
|
};
|
||||||
|
function getCacheKey(url) {
|
||||||
|
|
||||||
|
// Try to strip off the domain to share the cache between local and remote connections
|
||||||
|
var index = url.indexOf('://');
|
||||||
|
|
||||||
|
if (index != -1) {
|
||||||
|
url = url.substring(index + 3);
|
||||||
|
|
||||||
|
index = url.indexOf('/');
|
||||||
|
|
||||||
|
if (index != -1) {
|
||||||
|
url = url.substring(index + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return CryptoJS.MD5(url).toString();
|
||||||
|
}
|
||||||
|
|
||||||
self.getImageUrl = function (originalUrl) {
|
self.getImageUrl = function (originalUrl) {
|
||||||
|
|
||||||
console.log('getImageUrl:' + originalUrl);
|
console.log('getImageUrl:' + originalUrl);
|
||||||
|
|
||||||
var key = CryptoJS.SHA1(originalUrl).toString();
|
var key = getCacheKey(originalUrl);
|
||||||
|
|
||||||
var deferred = DeferredBuilder.Deferred();
|
var deferred = DeferredBuilder.Deferred();
|
||||||
|
|
||||||
|
|
|
@ -140,10 +140,21 @@
|
||||||
$('.inAppPurchaseOverlay').remove();
|
$('.inAppPurchaseOverlay').remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var currentDisplayingProductInfo = null;
|
||||||
|
var currentDisplayingDeferred = null;
|
||||||
|
|
||||||
|
function clearCurrentDisplayingInfo() {
|
||||||
|
currentDisplayingProductInfo = null;
|
||||||
|
currentDisplayingDeferred = null;
|
||||||
|
}
|
||||||
|
|
||||||
function showInAppPurchaseInfo(info, serverRegistrationInfo, deferred) {
|
function showInAppPurchaseInfo(info, serverRegistrationInfo, deferred) {
|
||||||
|
|
||||||
var elem = getInAppPurchaseElement(info);
|
var elem = getInAppPurchaseElement(info);
|
||||||
|
|
||||||
|
currentDisplayingProductInfo = info;
|
||||||
|
currentDisplayingDeferred = deferred;
|
||||||
|
|
||||||
$('.inAppPurchaseForm', elem).on('submit', function () {
|
$('.inAppPurchaseForm', elem).on('submit', function () {
|
||||||
|
|
||||||
IapManager.beginPurchase(info.id);
|
IapManager.beginPurchase(info.id);
|
||||||
|
@ -151,6 +162,8 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btnCancel', elem).on('click', function () {
|
$('.btnCancel', elem).on('click', function () {
|
||||||
|
|
||||||
|
clearCurrentDisplayingInfo();
|
||||||
cancelInAppPurchase();
|
cancelInAppPurchase();
|
||||||
|
|
||||||
// For testing purposes
|
// For testing purposes
|
||||||
|
@ -162,6 +175,8 @@
|
||||||
});
|
});
|
||||||
$('.btnSignInSupporter', elem).on('click', function () {
|
$('.btnSignInSupporter', elem).on('click', function () {
|
||||||
|
|
||||||
|
clearCurrentDisplayingInfo();
|
||||||
|
|
||||||
Dashboard.alert({
|
Dashboard.alert({
|
||||||
message: Globalize.translate('MessagePleaseSignInLocalNetwork'),
|
message: Globalize.translate('MessagePleaseSignInLocalNetwork'),
|
||||||
callback: function () {
|
callback: function () {
|
||||||
|
@ -172,6 +187,21 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onProductUpdated(e, product) {
|
||||||
|
|
||||||
|
var currentInfo = currentDisplayingProductInfo;
|
||||||
|
var deferred = currentDisplayingDeferred;
|
||||||
|
|
||||||
|
if (currentInfo && deferred) {
|
||||||
|
if (product.owned && product.id == currentInfo.id) {
|
||||||
|
|
||||||
|
clearCurrentDisplayingInfo();
|
||||||
|
cancelInAppPurchase();
|
||||||
|
deferred.resolve();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
window.RegistrationServices = {
|
window.RegistrationServices = {
|
||||||
|
|
||||||
renderPluginInfo: function (page, pkg, pluginSecurityInfo) {
|
renderPluginInfo: function (page, pkg, pluginSecurityInfo) {
|
||||||
|
@ -203,10 +233,14 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function onIapManagerLoaded() {
|
||||||
|
Events.on(IapManager, 'productupdated', onProductUpdated);
|
||||||
|
}
|
||||||
|
|
||||||
if (isAndroid()) {
|
if (isAndroid()) {
|
||||||
requirejs(['thirdparty/cordova/android/iap']);
|
requirejs(['thirdparty/cordova/android/iap', onIapManagerLoaded]);
|
||||||
} else {
|
} else {
|
||||||
requirejs(['thirdparty/cordova/iap']);
|
requirejs(['thirdparty/cordova/iap', onIapManagerLoaded]);
|
||||||
}
|
}
|
||||||
|
|
||||||
})();
|
})();
|
Loading…
Add table
Add a link
Reference in a new issue