update version

This commit is contained in:
Luke Pulverenti 2016-04-17 16:57:57 -04:00
parent 84ca47e442
commit 353cc8c8b8
2 changed files with 48 additions and 18 deletions

View File

@ -145,7 +145,7 @@
apiClient.getPublicSystemInfo().then(function (info) {
if (compareVersions(info.Version, '3.0.5913') == 1) {
if (compareVersions(info.Version, '3.0.5930') == 1) {
showInternal();
}
});

View File

@ -172,6 +172,14 @@
});
}
/**
* Returns a random integer between min (inclusive) and max (inclusive)
* Using Math.round() will give you a non-uniform distribution!
*/
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function getAppInfo() {
if (AppInfo.nativeApp) {
@ -183,11 +191,6 @@
return Promise.resolve('');
}
function getCard(img) {
return '<div class="card backdropCard"><div class="cardBox"><div class="cardScalable"><div class="cardPadder"></div><a class="cardContent" href="https://emby.media/download" target="_blank"><div class="cardImage lazy" data-src="' + img + '"></div></a></div></div></div>';
}
return Dashboard.getPluginSecurityInfo().then(function (pluginSecurityInfo) {
appSettings.set(cacheKey, new Date().getTime());
@ -196,22 +199,49 @@
return '';
}
var infos = [getTheaterInfo, getPremiereInfo];
appSettings.set(cacheKey, new Date().getTime());
return infos[getRandomInt(0, 1)]();
});
}
function getCard(img, target) {
return '<div class="card backdropCard"><div class="cardBox"><div class="cardScalable"><div class="cardPadder"></div><a class="cardContent" href="' + target + '" target="_blank"><div class="cardImage lazy" data-src="' + img + '"></div></a></div></div></div>';
}
function getTheaterInfo() {
var html = '';
html += '<div>';
html += '<h1>Try Emby Theater<paper-icon-button icon="close" onclick="jQuery(this.parentNode.parentNode).remove();" style="margin-left:1em;"></paper-icon-button></h1>';
html += '<p>A beautiful app for your TV and large screen tablet. <a href="https://emby.media/download" target="_blank">Emby Theater</a> runs on Windows, Xbox One, Google Chrome, FireFox, Microsoft Edge and Opera.</p>';
html += '<div class="itemsContainer">';
html += getCard('https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater1.png');
html += getCard('https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater2.png');
html += getCard('https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater3.png');
html += getCard('https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater1.png', 'https://emby.media/download');
html += getCard('https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater2.png', 'https://emby.media/download');
html += getCard('https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater3.png', 'https://emby.media/download');
html += '</div>';
html += '<br/>';
html += '</div>';
return html;
}
function getPremiereInfo() {
var html = '';
html += '<div>';
html += '<h1>Try Emby Premiere<paper-icon-button icon="close" onclick="jQuery(this.parentNode.parentNode).remove();" style="margin-left:1em;"></paper-icon-button></h1>';
html += '<p>Design beautiful Cover Art, enjoy free access to Emby apps, and more. <a href="https://emby.media/premiere" target="_blank">Learn more</a></p>';
html += '<div class="itemsContainer">';
html += getCard('https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater1.png', 'https://emby.media/premiere');
html += getCard('https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater2.png', 'https://emby.media/premiere');
html += getCard('https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater3.png', 'https://emby.media/premiere');
html += '</div>';
html += '<br/>';
html += '</div>';
appSettings.set(cacheKey, new Date().getTime());
return html;
});
}
function loadRecentlyAdded(elem, user) {