define(['appStorage', 'shell'], function (appStorage, shell) { var supporterPlaybackKey = 'lastSupporterPlaybackMessage4'; function validatePlayback(resolve, reject) { Dashboard.getPluginSecurityInfo().then(function (pluginSecurityInfo) { if (pluginSecurityInfo.IsMBSupporter) { resolve(); } else { var lastMessage = parseInt(appStorage.getItem(supporterPlaybackKey) || '0'); if (!lastMessage) { // Don't show on the very first playback attempt appStorage.setItem(supporterPlaybackKey, new Date().getTime()); resolve(); } else if ((new Date().getTime() - lastMessage) > 259200000) { showPlaybackOverlay(resolve, reject); } else { resolve(); } } }); } function getSubscriptionBenefits() { var list = []; list.push({ name: Globalize.translate('CoverArt'), icon: 'photo', text: Globalize.translate('CoverArtFeatureDescription') }); list.push({ name: Globalize.translate('HeaderFreeApps'), icon: 'check', text: Globalize.translate('FreeAppsFeatureDescription') }); if (Dashboard.capabilities().SupportsSync) { list.push({ name: Globalize.translate('HeaderMobileSync'), icon: 'sync', text: Globalize.translate('MobileSyncFeatureDescription') }); } else { list.push({ name: Globalize.translate('HeaderCinemaMode'), icon: 'movie', text: Globalize.translate('CinemaModeFeatureDescription') }); } return list; } function getSubscriptionBenefitHtml(item) { var html = ''; html += '
' + Globalize.translate('MessageDidYouKnowCinemaMode') + '
'; html += '' + Globalize.translate('MessageDidYouKnowCinemaMode2') + '
'; html += '