diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index daed02ab66..a4f2254877 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.2.73", - "_release": "1.2.73", + "version": "1.2.75", + "_release": "1.2.75", "_resolution": { "type": "version", - "tag": "1.2.73", - "commit": "f6722bdc762cd5cc372010f6c812dcd7bf8d89c5" + "tag": "1.2.75", + "commit": "122d3aaefc1fe36b22916f03dac5eea73fbb2ba7" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js b/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js index 2eda46f1c1..093bb2e768 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js +++ b/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js @@ -1,4 +1,4 @@ -define(['dialogHelper', 'layoutManager', 'dialogText', 'paper-button', 'css!./actionsheet'], function (dialogHelper, layoutManager, dialogText) { +define(['dialogHelper', 'layoutManager', 'dialogText', 'paper-button', 'css!./actionsheet', 'html!./../icons/nav.html'], function (dialogHelper, layoutManager, dialogText) { function parentWithClass(elem, className) { @@ -132,7 +132,7 @@ html += '
'; options.items.forEach(function (o) { - o.ironIcon = o.selected ? 'check' : null; + o.ironIcon = o.selected ? 'nav:check' : null; }); var itemsWithIcons = options.items.filter(function (o) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/alert/alert.js b/dashboard-ui/bower_components/emby-webcomponents/alert/alert.js index 5bb807da85..1495722b46 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/alert/alert.js +++ b/dashboard-ui/bower_components/emby-webcomponents/alert/alert.js @@ -1,4 +1,4 @@ -define(['dialogHelper', 'layoutManager', 'dialogText', 'html!./../prompt/icons.html', 'css!./../prompt/style.css', 'paper-button', 'paper-icon-button-light', 'paper-input'], function (dialogHelper, layoutManager, dialogText) { +define(['dialogHelper', 'layoutManager', 'dialogText', 'html!./../icons/nav.html', 'css!./../prompt/style.css', 'paper-button', 'paper-icon-button-light', 'paper-input'], function (dialogHelper, layoutManager, dialogText) { function getIcon(icon, cssClass, canFocus, autoFocus) { @@ -72,7 +72,7 @@ define(['dialogHelper', 'layoutManager', 'dialogText', 'html!./../prompt/icons.h var buttonText = options.type == 'error' ? 'Ok' : 'GotIt'; if (raisedButtons) { - html += '' + dialogText.get(buttonText) + ''; + html += '' + dialogText.get(buttonText) + ''; } else { html += '
'; html += '' + dialogText.get(buttonText) + ''; diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js b/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js index 17ae30de98..6a3a2611cc 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js +++ b/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js @@ -1,4 +1,4 @@ -define(['globalize', 'connectionManager', 'loading', 'scrollHelper', 'datetime', 'focusManager', 'imageLoader', 'events', 'layoutManager', 'itemShortcuts', 'registrationservices', 'clearButtonStyle', 'css!./guide.css', 'html!./icons.html', 'scrollStyles'], function (globalize, connectionManager, loading, scrollHelper, datetime, focusManager, imageLoader, events, layoutManager, itemShortcuts, registrationServices) { +define(['globalize', 'connectionManager', 'loading', 'scrollHelper', 'datetime', 'focusManager', 'imageLoader', 'events', 'layoutManager', 'itemShortcuts', 'registrationservices', 'clearButtonStyle', 'css!./guide.css', 'html!./../icons/mediainfo.html', 'html!./../icons/nav.html', 'scrollStyles'], function (globalize, connectionManager, loading, scrollHelper, datetime, focusManager, imageLoader, events, layoutManager, itemShortcuts, registrationServices) { var baseUrl; @@ -271,14 +271,14 @@ html += '
'; if (program.IsHD) { - html += ''; + html += ''; } if (program.SeriesTimerId) { - html += ''; + html += ''; } else if (program.TimerId) { - html += ''; + html += ''; } if (addAccent) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/tvguide.template.html b/dashboard-ui/bower_components/emby-webcomponents/guide/tvguide.template.html index 523e8dd410..33b8a7406f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/guide/tvguide.template.html +++ b/dashboard-ui/bower_components/emby-webcomponents/guide/tvguide.template.html @@ -18,5 +18,5 @@

- ${ButtonUnlockGuide} + ${ButtonUnlockGuide}
\ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/icons.html b/dashboard-ui/bower_components/emby-webcomponents/icons/mediainfo.html similarity index 73% rename from dashboard-ui/bower_components/emby-webcomponents/guide/icons.html rename to dashboard-ui/bower_components/emby-webcomponents/icons/mediainfo.html index 242d27d4eb..b0805324c8 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/guide/icons.html +++ b/dashboard-ui/bower_components/emby-webcomponents/icons/mediainfo.html @@ -31,12 +31,15 @@ See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for @demo demo/index.html --> - + + + + diff --git a/dashboard-ui/bower_components/emby-webcomponents/prompt/icons.html b/dashboard-ui/bower_components/emby-webcomponents/icons/nav.html similarity index 97% rename from dashboard-ui/bower_components/emby-webcomponents/prompt/icons.html rename to dashboard-ui/bower_components/emby-webcomponents/icons/nav.html index 5b719d3869..85ea900784 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/prompt/icons.html +++ b/dashboard-ui/bower_components/emby-webcomponents/icons/nav.html @@ -31,7 +31,7 @@ See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for @demo demo/index.html --> - + diff --git a/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.js b/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.js new file mode 100644 index 0000000000..17bcf4b60c --- /dev/null +++ b/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.js @@ -0,0 +1,451 @@ +define(['datetime', 'globalize', 'embyRouter', 'html!./../icons/mediainfo.html'], function (datetime, globalize, embyRouter) { + + function getProgramInfoHtml(item, options) { + var html = ''; + + var miscInfo = []; + var text, date; + + if (item.ChannelName) { + + if (options.interactive && item.ChannelId) { + miscInfo.push('' + item.ChannelName + ''); + } else { + miscInfo.push(item.ChannelName); + } + } + + if (item.StartDate) { + + try { + date = datetime.parseISO8601Date(item.StartDate); + + text = date.toLocaleDateString(); + + text += ', ' + datetime.getDisplayTime(date); + + if (item.EndDate) { + date = datetime.parseISO8601Date(item.EndDate); + text += ' - ' + datetime.getDisplayTime(date); + } + + miscInfo.push(text); + } + catch (e) { + console.log("Error parsing date: " + item.PremiereDate); + } + } + + if (item.ChannelNumber) { + miscInfo.push('CH ' + item.ChannelNumber); + } + + html += miscInfo.map(function (m) { + return getMediaInfoItem(m); + }).join(''); + + return html; + } + + function getMediaInfoHtml(item, options) { + var html = ''; + + var miscInfo = []; + options = options || {}; + var text, date, minutes; + + if (item.Type == "MusicAlbum" || item.MediaType == 'MusicArtist' || item.MediaType == 'Playlist' || item.MediaType == 'MusicGenre') { + + var count = item.SongCount || item.ChildCount; + + if (count) { + + miscInfo.push(globalize.translate('core#TrackCount', count)); + } + + if (item.CumulativeRunTimeTicks) { + + miscInfo.push(datetime.getDisplayRunningTime(item.CumulativeRunTimeTicks)); + } + } + + else if (item.Type == "PhotoAlbum" || item.Type == "BoxSet") { + + var count = item.ChildCount; + + if (count) { + + miscInfo.push(globalize.translate('core#ItemCount', count)); + } + } + + if (item.Type == "Episode" || item.MediaType == 'Photo') { + + if (item.PremiereDate) { + + try { + date = datetime.parseISO8601Date(item.PremiereDate); + + text = date.toLocaleDateString(); + miscInfo.push(text); + } + catch (e) { + console.log("Error parsing date: " + item.PremiereDate); + } + } + } + + if (item.StartDate && item.Type != 'Program') { + + try { + date = datetime.parseISO8601Date(item.StartDate); + + text = date.toLocaleDateString(); + miscInfo.push(text); + + if (item.Type != "Recording") { + text = datetime.getDisplayTime(date); + miscInfo.push(text); + } + } + catch (e) { + console.log("Error parsing date: " + item.PremiereDate); + } + } + + if (item.ProductionYear && item.Type == "Series") { + + if (item.Status == "Continuing") { + miscInfo.push(globalize.translate('core#ValueSeriesYearToPresent', item.ProductionYear)); + + } + else if (item.ProductionYear) { + + text = item.ProductionYear; + + if (item.EndDate) { + + try { + + var endYear = datetime.parseISO8601Date(item.EndDate).getFullYear(); + + if (endYear != item.ProductionYear) { + text += "-" + datetime.parseISO8601Date(item.EndDate).getFullYear(); + } + + } + catch (e) { + console.log("Error parsing date: " + item.EndDate); + } + } + + miscInfo.push(text); + } + } + + if (item.Type == 'Program') { + + if (item.PremiereDate) { + + try { + date = datetime.parseISO8601Date(item.PremiereDate); + text = globalize.translate('core#OriginalAirDateValue', date.toLocaleDateString()); + miscInfo.push(text); + } + catch (e) { + console.log("Error parsing date: " + item.PremiereDate); + } + } else if (item.ProductionYear) { + text = globalize.translate('core#ReleaseYearValue', item.ProductionYear); + miscInfo.push(text); + } + } + + if (item.Type != "Series" && item.Type != "Episode" && item.Type != "Person" && item.MediaType != 'Photo' && item.Type != 'Program') { + + if (item.ProductionYear) { + + miscInfo.push(item.ProductionYear); + } + else if (item.PremiereDate) { + + try { + text = datetime.parseISO8601Date(item.PremiereDate).getFullYear(); + miscInfo.push(text); + } + catch (e) { + console.log("Error parsing date: " + item.PremiereDate); + } + } + } + + if (item.RunTimeTicks && item.Type != "Series" && item.Type != 'Program' && options.runtime !== false) { + + if (item.Type == "Audio") { + + miscInfo.push(datetime.getDisplayRunningTime(item.RunTimeTicks)); + + } else { + minutes = item.RunTimeTicks / 600000000; + + minutes = minutes || 1; + + miscInfo.push(Math.round(minutes) + " mins"); + } + } + + if (item.OfficialRating && item.Type !== "Season" && item.Type !== "Episode") { + miscInfo.push({ + text: item.OfficialRating, + cssClass: 'mediaInfoOfficialRating' + }); + } + + if (item.HasSubtitles && options.subtitles !== false) { + miscInfo.push({ + html: '' + }); + } + + if (item.Video3DFormat) { + miscInfo.push("3D"); + } + + if (item.MediaType == 'Photo' && item.Width && item.Height) { + miscInfo.push(item.Width + "x" + item.Height); + } + + html += miscInfo.map(function (m) { + return getMediaInfoItem(m); + }).join(''); + + html += getStarIconsHtml(item); + + if (item.CriticRating && options.criticRating !== false) { + + if (item.CriticRating >= 60) { + html += '
' + item.CriticRating + '
'; + } else { + html += '
' + item.CriticRating + '
'; + } + } + + if (options.endsAt !== false) { + + var endsAt = getEndsAt(item); + if (endsAt) { + html += getMediaInfoItem(endsAt, 'endsAt'); + } + } + + return html; + } + + function getEndsAt(item) { + + if (item.MediaType == 'Video' && item.RunTimeTicks) { + + if (!item.StartDate) { + var endDate = new Date().getTime() + (item.RunTimeTicks / 10000); + endDate = new Date(endDate); + + var displayTime = datetime.getDisplayTime(endDate); + return globalize.translate('core#EndsAtValue', displayTime); + } + } + + return null; + } + + function getEndsAtFromPosition(runtimeTicks, positionTicks, includeText) { + + var endDate = new Date().getTime() + ((runtimeTicks - (positionTicks || 0)) / 10000); + endDate = new Date(endDate); + + var displayTime = datetime.getDisplayTime(endDate); + + if (includeText === false) { + return displayTime; + } + return globalize.translate('core#EndsAtValue', displayTime); + } + + function getMediaInfoItem(m, cssClass) { + + cssClass = cssClass ? (cssClass + ' mediaInfoItem') : 'mediaInfoItem'; + var mediaInfoText = m; + + if (typeof (m) !== 'string' && typeof (m) !== 'number') { + + if (m.html) { + return m.html; + } + mediaInfoText = m.text; + cssClass += ' ' + m.cssClass; + } + return '
' + mediaInfoText + '
'; + } + + function getStarIconsHtml(item) { + + var html = ''; + + var rating = item.CommunityRating; + + if (rating) { + html += '
'; + + for (var i = 0; i < 5; i++) { + var starValue = (i + 1) * 2; + + if (rating < starValue - 2) { + html += ''; + } + else if (rating < starValue) { + html += ''; + } + else { + html += ''; + } + } + + html += '
'; + } + + return html; + } + + function dynamicEndTime(elem, item) { + + var interval = setInterval(function () { + + if (!document.body.contains(elem)) { + + clearInterval(interval); + return; + } + + elem.innerHTML = getEndsAt(item); + + }, 60000); + } + + function fillPrimaryMediaInfo(elem, item, options) { + var html = getPrimaryMediaInfoHtml(item, options); + + elem.innerHTML = html; + afterFill(elem, item, options); + } + + function fillSecondaryMediaInfo(elem, item, options) { + var html = getSecondaryMediaInfoHtml(item, options); + + elem.innerHTML = html; + afterFill(elem, item, options); + } + + function afterFill(elem, item, options) { + + var endsAtElem = elem.querySelector('.endsAt'); + if (endsAtElem) { + dynamicEndTime(endsAtElem, item); + } + + var lnkChannel = elem.querySelector('.lnkChannel'); + if (lnkChannel) { + lnkChannel.addEventListener('click', onChannelLinkClick); + } + } + + function onChannelLinkClick(e) { + + var channelId = this.getAttribute('data-id'); + var serverId = this.getAttribute('data-serverid'); + + embyRouter.showItem(channelId, serverId); + + e.preventDefault(); + return false; + } + + function getDisplayName(item, options) { + + if (!item) { + throw new Error("null item passed into getDisplayName"); + } + + options = options || {}; + + var name = item.EpisodeTitle || item.Name || ''; + + if (item.Type == "TvChannel") { + + if (item.Number) { + return item.Number + ' ' + name; + } + return name; + } + if (options.isInlineSpecial && item.Type == "Episode" && item.ParentIndexNumber == 0) { + + name = globalize.translate('core#ValueSpecialEpisodeName', name); + + } else if (item.Type == "Episode" && item.IndexNumber != null && item.ParentIndexNumber != null) { + + var displayIndexNumber = item.IndexNumber; + + var number = "E" + displayIndexNumber; + + if (options.includeParentInfo !== false) { + number = "S" + item.ParentIndexNumber + ", " + number; + } + + if (item.IndexNumberEnd) { + + displayIndexNumber = item.IndexNumberEnd; + number += "-" + displayIndexNumber; + } + + name = number + " - " + name; + + } + + return name; + } + + function getPrimaryMediaInfoHtml(item, options) { + + options = options || {}; + if (options.interactive == null) { + options.interactive = false; + } + if (item.Type == 'Program') { + return getProgramInfoHtml(item, options); + } + + return getMediaInfoHtml(item, options); + } + + function getSecondaryMediaInfoHtml(item, options) { + + options = options || {}; + if (options.interactive == null) { + options.interactive = false; + } + if (item.Type == 'Program') { + return getMediaInfoHtml(item, options); + } + + return ''; + } + + return { + getMediaInfoHtml: getPrimaryMediaInfoHtml, + fill: fillPrimaryMediaInfo, + getEndsAt: getEndsAt, + getEndsAtFromPosition: getEndsAtFromPosition, + getPrimaryMediaInfoHtml: getPrimaryMediaInfoHtml, + getSecondaryMediaInfoHtml: getSecondaryMediaInfoHtml, + fillPrimaryMediaInfo: fillPrimaryMediaInfo, + fillSecondaryMediaInfo: fillSecondaryMediaInfo + }; +}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/prompt/prompt.js b/dashboard-ui/bower_components/emby-webcomponents/prompt/prompt.js index ef629db1c7..d23b840a0d 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/prompt/prompt.js +++ b/dashboard-ui/bower_components/emby-webcomponents/prompt/prompt.js @@ -1,4 +1,4 @@ -define(['dialogHelper', 'layoutManager', 'dialogText', 'html!./icons.html', 'css!./style.css', 'paper-button', 'paper-icon-button-light', 'paper-input'], function (dialogHelper, layoutManager, dialogText) { +define(['dialogHelper', 'layoutManager', 'dialogText', 'html!./../icons/nav.html', 'css!./style.css', 'paper-button', 'paper-icon-button-light', 'paper-input'], function (dialogHelper, layoutManager, dialogText) { function getIcon(icon, cssClass, canFocus, autoFocus) { @@ -64,7 +64,7 @@ define(['dialogHelper', 'layoutManager', 'dialogText', 'html!./icons.html', 'css html += '
'; if (raisedButtons) { - html += '' + dialogText.get('Ok') + ''; + html += '' + dialogText.get('Ok') + ''; } else { html += '
'; html += '' + dialogText.get('Ok') + ''; diff --git a/dashboard-ui/bower_components/emby-webcomponents/router.js b/dashboard-ui/bower_components/emby-webcomponents/router.js index 7736bba83d..1d1e3370b6 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/router.js +++ b/dashboard-ui/bower_components/emby-webcomponents/router.js @@ -485,11 +485,11 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b return show(pluginManager.mapRoute(skin, homeRoute)); } - function showItem(item) { + function showItem(item, serverId) { if (typeof (item) === 'string') { require(['connectionManager'], function (connectionManager) { - var apiClient = connectionManager.currentApiClient(); + var apiClient = serverId ? connectionManager.getApiClient(serverId) : connectionManager.currentApiClient(); apiClient.getItem(apiClient.getCurrentUserId(), item).then(showItem); }); } else { diff --git a/dashboard-ui/bower_components/iron-selector/.bower.json b/dashboard-ui/bower_components/iron-selector/.bower.json index e5306ccfc9..1da99816d3 100644 --- a/dashboard-ui/bower_components/iron-selector/.bower.json +++ b/dashboard-ui/bower_components/iron-selector/.bower.json @@ -36,7 +36,7 @@ "tag": "v1.5.1", "commit": "e3e34408fad8f7cde59c4255cf3fe90f7dcf91d8" }, - "_source": "git://github.com/PolymerElements/iron-selector.git", + "_source": "git://github.com/polymerelements/iron-selector.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-selector" + "_originalSource": "polymerelements/iron-selector" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-behaviors/.bower.json b/dashboard-ui/bower_components/paper-behaviors/.bower.json index a6b333d335..2b04bf9f8a 100644 --- a/dashboard-ui/bower_components/paper-behaviors/.bower.json +++ b/dashboard-ui/bower_components/paper-behaviors/.bower.json @@ -45,7 +45,7 @@ "tag": "v1.0.11", "commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5" }, - "_source": "git://github.com/polymerelements/paper-behaviors.git", + "_source": "git://github.com/PolymerElements/paper-behaviors.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/paper-behaviors" + "_originalSource": "PolymerElements/paper-behaviors" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-ripple/.bower.json b/dashboard-ui/bower_components/paper-ripple/.bower.json index 2f654d71c6..157225ee71 100644 --- a/dashboard-ui/bower_components/paper-ripple/.bower.json +++ b/dashboard-ui/bower_components/paper-ripple/.bower.json @@ -32,14 +32,14 @@ "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0" }, "ignore": [], - "homepage": "https://github.com/polymerelements/paper-ripple", + "homepage": "https://github.com/PolymerElements/paper-ripple", "_release": "1.0.5", "_resolution": { "type": "version", "tag": "v1.0.5", "commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5" }, - "_source": "git://github.com/polymerelements/paper-ripple.git", + "_source": "git://github.com/PolymerElements/paper-ripple.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/paper-ripple" + "_originalSource": "PolymerElements/paper-ripple" } \ No newline at end of file diff --git a/dashboard-ui/components/metadataeditor/metadataeditor.js b/dashboard-ui/components/metadataeditor/metadataeditor.js index acb1f402bd..836b5ca5ab 100644 --- a/dashboard-ui/components/metadataeditor/metadataeditor.js +++ b/dashboard-ui/components/metadataeditor/metadataeditor.js @@ -669,14 +669,12 @@ $('#tagsCollapsible', context).hide(); $('#metadataSettingsCollapsible', context).hide(); $('#fldPremiereDate', context).hide(); - $('#fldSortName', context).hide(); $('#fldDateAdded', context).hide(); $('#fldYear', context).hide(); } else { $('#tagsCollapsible', context).show(); $('#metadataSettingsCollapsible', context).show(); $('#fldPremiereDate', context).show(); - $('#fldSortName', context).show(); $('#fldDateAdded', context).show(); $('#fldYear', context).show(); } diff --git a/dashboard-ui/components/metadataeditor/metadataeditor.template.html b/dashboard-ui/components/metadataeditor/metadataeditor.template.html index dc87f3bb8c..3489e3d8c8 100644 --- a/dashboard-ui/components/metadataeditor/metadataeditor.template.html +++ b/dashboard-ui/components/metadataeditor/metadataeditor.template.html @@ -29,7 +29,7 @@
-