diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 8363494b02..d4c9e4bbb8 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -15,12 +15,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.4.84", - "_release": "1.4.84", + "version": "1.4.85", + "_release": "1.4.85", "_resolution": { "type": "version", - "tag": "1.4.84", - "commit": "15bfe5a5a9ca97a96f3f30c76dd463266f66e290" + "tag": "1.4.85", + "commit": "02ae5393a31e8266eb52f0e1a6471b9da8f964c7" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js b/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js index dbf6037645..500231a1fe 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js +++ b/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js @@ -1,12 +1,74 @@ -define(['itemShortcuts', 'registerElement'], function (itemShortcuts) { +define(['itemShortcuts', 'connectionManager', 'registerElement'], function (itemShortcuts, connectionManager) { var ItemsContainerProtoType = Object.create(HTMLDivElement.prototype); + function parentWithClass(elem, className) { + + while (!elem.classList || !elem.classList.contains(className)) { + elem = elem.parentNode; + + if (!elem) { + return null; + } + } + + return elem; + } + + function parentWithAttribute(elem, name) { + + while (!elem.getAttribute(name)) { + elem = elem.parentNode; + + if (!elem) { + return null; + } + } + + return elem; + } + + function getItem(button) { + + button = parentWithAttribute(button, 'data-id'); + var serverId = button.getAttribute('data-serverid'); + var id = button.getAttribute('data-id'); + + var apiClient = connectionManager.getApiClient(serverId); + + return apiClient.getItem(apiClient.getCurrentUserId(), id); + } + + function showContextMenu(button) { + + getItem(button).then(function (item) { + + require(['itemContextMenu'], function (itemContextMenu) { + itemContextMenu.show({ + positionTo: button, + item: item + }); + }); + }); + } + + function onClick(e) { + + var menuButton = parentWithClass(e.target, 'menuButton'); + if (menuButton) { + showContextMenu(menuButton); + e.stopPropagation(); + return false; + } + } + ItemsContainerProtoType.attachedCallback = function () { + this.addEventListener('click', onClick); itemShortcuts.on(this); }; ItemsContainerProtoType.detachedCallback = function () { + this.removeEventListener('click', onClick); itemShortcuts.off(this); }; diff --git a/dashboard-ui/bower_components/emby-webcomponents/indicators/indicators.css b/dashboard-ui/bower_components/emby-webcomponents/indicators/indicators.css index fd920d50fe..dc35703038 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/indicators/indicators.css +++ b/dashboard-ui/bower_components/emby-webcomponents/indicators/indicators.css @@ -14,3 +14,52 @@ .timerIndicator { color: #CB272A; } + +.indicator + .indicator { + margin-left: .25em; +} + +.countIndicator { + background: rgba(82,181,75,1); + border-radius: 500px; + display: -ms-flex; + display: -webkit-flex; + display: flex; + align-items: center; + justify-content: center; + font-weight: 500; + color: #fff; +} + +.playedIndicator { + background: rgba(82,181,75,1); + border-radius: 500px; + display: -ms-flex; + display: -webkit-flex; + display: flex; + align-items: center; + justify-content: center; + color: #fff; +} + +.countIndicator, .playedIndicator { + width: 28px; + height: 28px; +} + + .playedIndicator i { + width: 22px; + height: 22px; + font-size: 22px; + } + +.layout-tv .countIndicator, .layout-tv .playedIndicator { + width: 3.8vh; + height: 3.8vh; +} + + .layout-tv .playedIndicator i { + width: 2.6vh; + height: 2.6vh; + font-size: 2.6vh; + } diff --git a/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js b/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js index 67b09637a1..40f84a5375 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js +++ b/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js @@ -200,7 +200,10 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper'], function (ap require(['actionsheet'], function (actionSheet) { actionSheet.show({ - items: commands + + items: commands, + positionTo: options.positionTo + }).then(function (id) { executeCommand(options.item, id).then(resolve); }, reject); diff --git a/dashboard-ui/bower_components/emby-webcomponents/listview/listview.css b/dashboard-ui/bower_components/emby-webcomponents/listview/listview.css index 739a4f6058..ffe066ae30 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/listview/listview.css +++ b/dashboard-ui/bower_components/emby-webcomponents/listview/listview.css @@ -169,6 +169,14 @@ div.listItem { margin-top: 0; } +.listItem .indicators { + right: .5vh; + top: .5vh; + position: absolute; + display: flex; + align-items: center; +} + @supports (display: flex) { .listItem, .listItemBody, .listItemMediaInfo { diff --git a/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js b/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js index bcbe88bf9c..f9498a2796 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js +++ b/dashboard-ui/bower_components/emby-webcomponents/listview/listview.js @@ -201,8 +201,6 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan if (options.showParentTitle) { if (item.Type == 'Episode') { textlines.push(item.SeriesName || ' '); - } else if (item.Type == 'MusicAlbum') { - textlines.push(item.AlbumArtist || ' '); } } @@ -213,13 +211,28 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan } textlines.push(displayName); - if (item.Type == 'Audio') { + if (item.ArtistItems && item.Type != 'MusicAlbum') { textlines.push(item.ArtistItems.map(function (a) { return a.Name; }).join(', ') || ' '); } + if (item.AlbumArtist && item.Type == 'MusicAlbum') { + textlines.push(item.AlbumArtist || ' '); + } + + if (item.Type == 'Game') { + textlines.push(item.GameSystem || ' '); + } + + if (item.Type == 'TvChannel') { + + if (item.CurrentProgram) { + textlines.push(itemHelper.getDisplayName(item.CurrentProgram)); + } + } + var lineCount = textlines.length; if (!options.enableSideMediaInfo) { lineCount++; @@ -241,7 +254,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan html += '

'; } else if (i == 0) { - html += '

'; + html += '
'; } else { html += '
'; } @@ -249,7 +262,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan if (i == 0 && isLargeStyle) { html += '

'; } else if (i == 0) { - html += ''; + html += ''; } else { html += ''; } @@ -268,7 +281,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan html += ''; if (!clickEntireItem) { - html += ''; + html += ''; html += ''; html += userdataButtons.getIconsHtml(item, false); html += ''; diff --git a/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.css b/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.css index db526403c4..d0868c7da1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.css +++ b/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.css @@ -3,9 +3,9 @@ } i.mediaInfoItem { - width: 3vh; - height: 3vh; - font-size: 3vh; + width: auto; + height: auto; + font-size: 1.6em; margin-right: .6em; } @@ -63,9 +63,3 @@ i.mediaInfoItem { font-size: 90%; padding: .1em .5em; } - -.layout-tv i.mediaInfoItem { - width: 4vh; - height: 4vh; - font-size: 4vh; -} \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/shortcuts.js b/dashboard-ui/bower_components/emby-webcomponents/shortcuts.js index b13e5a2145..f1cc31633b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/shortcuts.js +++ b/dashboard-ui/bower_components/emby-webcomponents/shortcuts.js @@ -125,7 +125,7 @@ define(['playbackManager', 'inputManager', 'connectionManager', 'embyRouter', 'g } else if (action == 'setplaylistindex') { - + playbackManager.currentPlaylistIndex(parseInt(card.getAttribute('data-index'))); } else if (action == 'record') { diff --git a/dashboard-ui/bower_components/iron-meta/.bower.json b/dashboard-ui/bower_components/iron-meta/.bower.json index e1304d174b..f4bfef4a7c 100644 --- a/dashboard-ui/bower_components/iron-meta/.bower.json +++ b/dashboard-ui/bower_components/iron-meta/.bower.json @@ -26,14 +26,14 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "main": "iron-meta.html", - "homepage": "https://github.com/PolymerElements/iron-meta", + "homepage": "https://github.com/polymerelements/iron-meta", "_release": "1.1.1", "_resolution": { "type": "version", "tag": "v1.1.1", "commit": "e171ee234b482219c9514e6f9551df48ef48bd9f" }, - "_source": "git://github.com/PolymerElements/iron-meta.git", + "_source": "git://github.com/polymerelements/iron-meta.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-meta" + "_originalSource": "polymerelements/iron-meta" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/polymer/.bower.json b/dashboard-ui/bower_components/polymer/.bower.json index 5320b592cc..36ef2ed872 100644 --- a/dashboard-ui/bower_components/polymer/.bower.json +++ b/dashboard-ui/bower_components/polymer/.bower.json @@ -39,6 +39,6 @@ "commit": "8715c83bf04a228de00ec662ed43eb6141e61b91" }, "_source": "git://github.com/Polymer/polymer.git", - "_target": "^1.1.0", + "_target": "^1.0.0", "_originalSource": "Polymer/polymer" } \ No newline at end of file diff --git a/dashboard-ui/components/remotecontrol.js b/dashboard-ui/components/remotecontrol.js index 363f48e916..9f9fff146b 100644 --- a/dashboard-ui/components/remotecontrol.js +++ b/dashboard-ui/components/remotecontrol.js @@ -414,7 +414,7 @@ html += listView.getListViewHtml({ items: MediaController.playlist(), smallIcon: true, - action: 'none' + action: 'setplaylistindex' }); playlistNeedsRefresh = false; @@ -556,24 +556,6 @@ return elem; } - function onContextClick(e) { - - var mediaItem = parentWithClass(e.target, 'itemAction'); - if (mediaItem != null) { - - mediaItem = parentWithClass(e.target, 'listItem'); - var indexValue = mediaItem.getAttribute('data-index'); - - if (indexValue) { - MediaController.currentPlaylistIndex(parseInt(indexValue)); - } - - e.preventDefault(); - e.stopPropagation(); - return false; - } - } - function onBtnCommandClick() { if (currentPlayer) { @@ -693,8 +675,6 @@ return datetime.getDisplayRunningTime(ticks); }; - - context.addEventListener('click', onContextClick); } function onPlayerChange() { diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index b247431b5b..fb8a766be3 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -885,30 +885,10 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { top: 32px; } -.playedIndicator { - display: flex; - justify-content: center; - align-items: center; - position: absolute; - top: 5px; - right: 5px; - text-align: center; - vertical-align: middle; - width: 26px; - height: 26px; - border-radius: 50%; - color: #fff; - background: rgb(82, 181, 75); - background: rgba(82, 181, 75, .95); - line-height: 21px; - line-height: initial; - font-weight: 500; +.syncIndicator i { + font-size: 180%; } - .playedIndicator i, .syncIndicator i { - font-size: 180%; - } - .mediaSourceIndicator { display: block; position: absolute; diff --git a/dashboard-ui/scripts/episodes.js b/dashboard-ui/scripts/episodes.js index c80d84665c..1b0c32f752 100644 --- a/dashboard-ui/scripts/episodes.js +++ b/dashboard-ui/scripts/episodes.js @@ -78,7 +78,8 @@ html = listView.getListViewHtml({ items: result.Items, - sortBy: query.SortBy + sortBy: query.SortBy, + showParentTitle: true }); } else if (viewStyle == "PosterCard") { diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index c6d65c5fca..4ff9e83023 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1819,6 +1819,7 @@ var AppInfo = {}; define("recordingEditor", [embyWebComponentsBowerPath + "/recordingcreator/recordingeditor"], returnFirstDependency); define("subtitleEditor", [embyWebComponentsBowerPath + "/subtitleeditor/subtitleeditor"], returnFirstDependency); define("mediaInfo", [embyWebComponentsBowerPath + "/mediainfo/mediainfo"], returnFirstDependency); + define("itemContextMenu", [embyWebComponentsBowerPath + "/itemcontextmenu"], returnFirstDependency); define("refreshDialog", [embyWebComponentsBowerPath + "/refreshdialog/refreshdialog"], returnFirstDependency); define("backdrop", [embyWebComponentsBowerPath + "/backdrop/backdrop"], returnFirstDependency); define("fetchHelper", [embyWebComponentsBowerPath + "/fetchhelper"], returnFirstDependency); @@ -2025,6 +2026,9 @@ var AppInfo = {}; }, play: function (options) { MediaController.play(options); + }, + currentPlaylistIndex: function (options) { + return MediaController.currentPlaylistIndex(options); } }; });