diff --git a/src/components/indicators/indicators.js b/src/components/indicators/indicators.js index 3b6e6baf7..d9c7af1ab 100644 --- a/src/components/indicators/indicators.js +++ b/src/components/indicators/indicators.js @@ -2,7 +2,6 @@ define(['datetime', 'itemHelper', 'css!./indicators.css', 'material-icons'], fun 'use strict'; function enableProgressIndicator(item) { - if (item.MediaType === 'Video') { if (item.Type !== 'TvChannel') { return true; @@ -17,9 +16,7 @@ define(['datetime', 'itemHelper', 'css!./indicators.css', 'material-icons'], fun } function getProgressHtml(pct, options) { - var containerClass = 'itemProgressBar'; - if (options) { if (options.containerClass) { containerClass += ' ' + options.containerClass; @@ -30,9 +27,7 @@ define(['datetime', 'itemHelper', 'css!./indicators.css', 'material-icons'], fun } function getAutoTimeProgressHtml(pct, options, isRecording, start, end) { - var containerClass = 'itemProgressBar'; - if (options) { if (options.containerClass) { containerClass += ' ' + options.containerClass; @@ -40,7 +35,6 @@ define(['datetime', 'itemHelper', 'css!./indicators.css', 'material-icons'], fun } var foregroundClass = 'itemProgressBarForeground'; - if (isRecording) { foregroundClass += ' itemProgressBarForeground-recording'; } @@ -49,39 +43,26 @@ define(['datetime', 'itemHelper', 'css!./indicators.css', 'material-icons'], fun } function getProgressBarHtml(item, options) { - var pct; - if (enableProgressIndicator(item) && item.Type !== "Recording") { - var userData = options ? (options.userData || item.UserData) : item.UserData; if (userData) { pct = userData.PlayedPercentage; - if (pct && pct < 100) { - return getProgressHtml(pct, options); } } } if ((item.Type === 'Program' || item.Type === 'Timer' || item.Type === 'Recording') && item.StartDate && item.EndDate) { - var startDate = 0; var endDate = 1; try { - startDate = datetime.parseISO8601Date(item.StartDate).getTime(); - - } catch (err) { - } - - try { - endDate = datetime.parseISO8601Date(item.EndDate).getTime(); - } catch (err) { + console.log(err); } var now = new Date().getTime(); @@ -89,9 +70,7 @@ define(['datetime', 'itemHelper', 'css!./indicators.css', 'material-icons'], fun pct = 100 * ((now - startDate) / total); if (pct > 0 && pct < 100) { - var isRecording = item.Type === 'Timer' || item.Type === 'Recording' || item.TimerId; - return getAutoTimeProgressHtml(pct, options, isRecording, startDate, endDate); } } @@ -100,16 +79,12 @@ define(['datetime', 'itemHelper', 'css!./indicators.css', 'material-icons'], fun } function enablePlayedIndicator(item) { - return itemHelper.canMarkPlayed(item); } function getPlayedIndicator(item) { - if (enablePlayedIndicator(item)) { - var userData = item.UserData || {}; - if (userData.UnplayedItemCount) { return '