diff --git a/dashboard-ui/apiclient/apiclient.js b/dashboard-ui/apiclient/apiclient.js index 8af5498521..a4250f07c9 100644 --- a/dashboard-ui/apiclient/apiclient.js +++ b/dashboard-ui/apiclient/apiclient.js @@ -1197,53 +1197,9 @@ }, false); }; - self.getInstantMixFromSong = function (itemId, options) { + self.getInstantMixFromItem = function (itemId, options) { - var url = self.getUrl("Songs/" + itemId + "/InstantMix", options); - - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); - }; - - self.getInstantMixFromAlbum = function (itemId, options) { - - var url = self.getUrl("Albums/" + itemId + "/InstantMix", options); - - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); - }; - - self.getInstantMixFromArtist = function (options) { - - var url = self.getUrl("Artists/InstantMix", options); - - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); - }; - - self.getInstantMixFromMusicGenre = function (options) { - - var url = self.getUrl("MusicGenres/InstantMix", options); - - return self.ajax({ - type: "GET", - url: url, - dataType: "json" - }); - }; - - self.getInstantMixFromPlaylist = function (itemId, options) { - - var url = self.getUrl("Playlists/" + itemId + "/InstantMix", options); + var url = self.getUrl("Items/" + itemId + "/InstantMix", options); return self.ajax({ type: "GET", diff --git a/dashboard-ui/apiclient/connectionmanager.js b/dashboard-ui/apiclient/connectionmanager.js index ef070854e8..de9805c07b 100644 --- a/dashboard-ui/apiclient/connectionmanager.js +++ b/dashboard-ui/apiclient/connectionmanager.js @@ -376,7 +376,7 @@ throw new Error("null accessToken"); } - var url = "https://connect.mediabrowser.tv/service/user?id=" + userId; + var url = "https://connect.emby.media/service/user?id=" + userId; return HttpClient.send({ type: "GET", @@ -632,7 +632,7 @@ return deferred.promise(); } - var url = "https://connect.mediabrowser.tv/service/servers?userId=" + credentials.ConnectUserId; + var url = "https://connect.emby.media/service/servers?userId=" + credentials.ConnectUserId; HttpClient.send({ type: "GET", @@ -1085,7 +1085,7 @@ HttpClient.send({ type: "POST", - url: "https://connect.mediabrowser.tv/service/user/authenticate", + url: "https://connect.emby.media/service/user/authenticate", data: { nameOrEmail: username, password: md5 @@ -1148,7 +1148,7 @@ HttpClient.send({ type: "POST", - url: "https://connect.mediabrowser.tv/service/register", + url: "https://connect.emby.media/service/register", data: { email: email, userName: username, @@ -1216,7 +1216,7 @@ throw new Error("null connectUserId"); } - var url = "https://connect.mediabrowser.tv/service/servers?userId=" + self.connectUserId() + "&status=Waiting"; + var url = "https://connect.emby.media/service/servers?userId=" + self.connectUserId() + "&status=Waiting"; return HttpClient.send({ type: "GET", @@ -1256,7 +1256,7 @@ return deferred.promise(); } - var url = "https://connect.mediabrowser.tv/service/serverAuthorizations?serverId=" + serverId + "&userId=" + self.connectUserId(); + var url = "https://connect.emby.media/service/serverAuthorizations?serverId=" + serverId + "&userId=" + self.connectUserId(); HttpClient.send({ type: "DELETE", @@ -1285,7 +1285,7 @@ throw new Error("null connectUserId"); } - var url = "https://connect.mediabrowser.tv/service/serverAuthorizations?serverId=" + serverId + "&userId=" + self.connectUserId(); + var url = "https://connect.emby.media/service/serverAuthorizations?serverId=" + serverId + "&userId=" + self.connectUserId(); return HttpClient.send({ type: "DELETE", @@ -1312,7 +1312,7 @@ throw new Error("null connectUserId"); } - var url = "https://connect.mediabrowser.tv/service/ServerAuthorizations/accept?serverId=" + serverId + "&userId=" + self.connectUserId(); + var url = "https://connect.emby.media/service/ServerAuthorizations/accept?serverId=" + serverId + "&userId=" + self.connectUserId(); return HttpClient.send({ type: "GET", diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json index ea16ce655c..1d4238574e 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-overlay-behavior", - "version": "1.0.5", + "version": "1.0.6", "license": "http://polymer.github.io/LICENSE.txt", "description": "Provides a behavior for making an element an overlay", "private": true, @@ -35,11 +35,11 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "homepage": "https://github.com/polymerelements/iron-overlay-behavior", - "_release": "1.0.5", + "_release": "1.0.6", "_resolution": { "type": "version", - "tag": "v1.0.5", - "commit": "f03cea265587c724cf3a85aef76b2ab7ccfd2b94" + "tag": "v1.0.6", + "commit": "9c77f077f4181b6f03cc986d0f3c224094edbc2d" }, "_source": "git://github.com/polymerelements/iron-overlay-behavior.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/bower.json b/dashboard-ui/bower_components/iron-overlay-behavior/bower.json index 36b2d27d30..678273fad3 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/bower.json +++ b/dashboard-ui/bower_components/iron-overlay-behavior/bower.json @@ -1,6 +1,6 @@ { "name": "iron-overlay-behavior", - "version": "1.0.5", + "version": "1.0.6", "license": "http://polymer.github.io/LICENSE.txt", "description": "Provides a behavior for making an element an overlay", "private": true, diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html index 3539a61e6d..180b19cefa 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html +++ b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html @@ -138,17 +138,6 @@ context. You should place this element as a child of `` whenever possible. }, -/** - * Fired after the `iron-overlay` opens. - * @event iron-overlay-opened - */ - -/** - * Fired after the `iron-overlay` closes. - * @event iron-overlay-closed - * @param {{canceled: (boolean|undefined)}} set to the `closingReason` attribute - */ - listeners: { 'click': '_onClick', 'iron-resize': '_onIronResize' @@ -425,6 +414,16 @@ context. You should place this element as a child of `` whenever possible. } } +/** + * Fired after the `iron-overlay` opens. + * @event iron-overlay-opened + */ + +/** + * Fired after the `iron-overlay` closes. + * @event iron-overlay-closed + * @param {{canceled: (boolean|undefined)}} set to the `closingReason` attribute + */ }; /** @polymerBehavior */ diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-manager.html b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-manager.html index c66f9aa77c..a8709558da 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-manager.html +++ b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-manager.html @@ -45,7 +45,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN } function currentOverlay() { - return overlays[overlays.length-1]; + var i = overlays.length - 1; + while (overlays[i] && !overlays[i].opened) { + --i; + } + return overlays[i]; } function currentOverlayZ() { diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html b/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html index 4829439f0b..f821e55899 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html +++ b/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html @@ -141,6 +141,24 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }); }); + test('close an overlay in proximity to another overlay', function(done) { + var secondOverlay = fixture('basic'); + // Open and close a separate overlay. + secondOverlay.open(); + secondOverlay.close(); + + // Open the overlay we care about. + overlay.open(); + + // Wait for infinite recursion, otherwise we win: + overlay.addEventListener('iron-overlay-closed', function() { + done(); + }); + + // Immediately close the first overlay: + overlay.close(); + }); + test('clicking an overlay does not close it', function(done) { runAfterOpen(overlay, function() { overlay.addEventListener('iron-overlay-closed', function() { diff --git a/dashboard-ui/bower_components/neon-animation/.bower.json b/dashboard-ui/bower_components/neon-animation/.bower.json index ef68d27d08..16a4ffdfce 100644 --- a/dashboard-ui/bower_components/neon-animation/.bower.json +++ b/dashboard-ui/bower_components/neon-animation/.bower.json @@ -54,7 +54,7 @@ "tag": "v1.0.6", "commit": "ec51bf68f05c40373536cc726ca674e4549b7db2" }, - "_source": "git://github.com/polymerelements/neon-animation.git", + "_source": "git://github.com/PolymerElements/neon-animation.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/neon-animation" + "_originalSource": "PolymerElements/neon-animation" } \ No newline at end of file diff --git a/dashboard-ui/css/card.css b/dashboard-ui/css/card.css index e4892dafce..bbe11d75ec 100644 --- a/dashboard-ui/css/card.css +++ b/dashboard-ui/css/card.css @@ -62,6 +62,10 @@ background-color: #333; } +.homeTopViews .cardImage { + border-radius: 6px; +} + .cardOverlayPlayButton { position: absolute; bottom: 0; diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 503c60efcd..1108f5e6bd 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -930,7 +930,7 @@ paper-input + .fieldDescription { } .footerOverBottomTabs { - bottom: 49px !important; + bottom: 52px !important; } .footerNotification { diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index dcb1433ca8..5fe8e444c1 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -242,9 +242,8 @@ console.log('iron-select'); // When transition animations are used, add a content loading delay to allow the animations to finish // Otherwise with both operations happening at the same time, it can cause the animation to not run at full speed. - var enablePaperTabs = LibraryBrowser.enableFullPaperTabs(); - var delay = enablePaperTabs ? 500 : 0; var pgs = this; + var delay = pgs.entryAnimation ? 500 : 0; setTimeout(function () { $(pgs).trigger('tabchange'); @@ -274,7 +273,24 @@ } } else { - Events.trigger(page.querySelector('neon-animated-pages'), 'tabchange'); + var pages = page.querySelector('neon-animated-pages'); + if (!NavHelper.isBack()) { + if (pages.selected) { + + var entryAnimation = pages.entryAnimation; + var exitAnimation = pages.exitAnimation; + pages.entryAnimation = null; + pages.exitAnimation = null; + + tabs.selected = 0; + + pages.entryAnimation = entryAnimation; + pages.exitAnimation = exitAnimation; + + return; + } + } + Events.trigger(pages, 'tabchange'); } }, @@ -718,16 +734,16 @@ var href = LibraryBrowser.getHrefInternal(item, context); - if (context != 'livetv') { - if (topParentId == null && context != 'playlists') { - topParentId = LibraryMenu.getTopParentId(); - } + //if (context != 'livetv') { + // if (topParentId == null && context != 'playlists') { + // topParentId = LibraryMenu.getTopParentId(); + // } - if (topParentId) { - href += href.indexOf('?') == -1 ? "?topParentId=" : "&topParentId="; - href += topParentId; - } - } + // if (topParentId) { + // href += href.indexOf('?') == -1 ? "?topParentId=" : "&topParentId="; + // href += topParentId; + // } + //} return href; }, @@ -983,11 +999,6 @@ var cssClass = options.smallIcon ? 'ui-li-has-icon listItem' : 'ui-li-has-thumb listItem'; - if (item.UserData) { - cssClass += ' ' + LibraryBrowser.getUserDataCssClass(item.UserData.Key); - } - - var href = LibraryBrowser.getHref(item, options.context); html += '
  • '; @@ -1219,7 +1230,7 @@ itemCommands.push('trailer'); } - if (item.MediaType == "Audio" || item.Type == "MusicAlbum" || item.Type == "MusicArtist" || item.Type == "MusicGenre") { + if (item.MediaType == "Audio" || item.Type == "MusicAlbum" || item.Type == "MusicArtist" || item.Type == "MusicGenre" || item.CollectionType == "music") { itemCommands.push('instantmix'); } @@ -1690,10 +1701,6 @@ var href = options.linkItem === false ? '#' : LibraryBrowser.getHref(item, options.context); - if (item.UserData) { - cssClass += ' ' + LibraryBrowser.getUserDataCssClass(item.UserData.Key); - } - if (options.showChildCountIndicator && item.ChildCount && options.showLatestItemsPopup !== false) { cssClass += ' groupedCard'; } diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js index 2b2240eb43..44170e8428 100644 --- a/dashboard-ui/scripts/librarylist.js +++ b/dashboard-ui/scripts/librarylist.js @@ -1163,14 +1163,14 @@ function playAllFromHere(index, itemsContainer, method) { - var ids = $('.mediaItem', itemsContainer).get().map(function(i) { + var ids = $('.mediaItem', itemsContainer).get().map(function (i) { return i.getAttribute('data-itemid') || i.parentNode.getAttribute('data-itemid'); }); ids = ids.slice(index); ApiClient.getItems(Dashboard.getCurrentUserId(), { - + Ids: ids.join(','), Fields: 'MediaSources,Chapters', Limit: 100 @@ -1281,13 +1281,7 @@ function onUserDataChanged(userData) { - var cssClass = LibraryBrowser.getUserDataCssClass(userData.Key); - - if (!cssClass) { - return; - } - - $('.' + cssClass).each(function () { + $(document.querySelectorAll("*[data-itemid='" + userData.ItemId + "']")).each(function () { var mediaType = this.getAttribute('data-mediatype'); diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 42138b5586..82966537f2 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -1411,56 +1411,11 @@ var promise; var itemLimit = 100; - if (item.Type == "MusicArtist") { - - promise = ApiClient.getInstantMixFromArtist({ - UserId: Dashboard.getCurrentUserId(), - Fields: getItemFields, - Limit: itemLimit, - Id: id - }); - - } - else if (item.Type == "MusicGenre") { - - promise = ApiClient.getInstantMixFromMusicGenre({ - UserId: Dashboard.getCurrentUserId(), - Fields: getItemFields, - Limit: itemLimit, - Id: id - }); - - } - else if (item.Type == "MusicAlbum") { - - promise = ApiClient.getInstantMixFromAlbum(id, { - UserId: Dashboard.getCurrentUserId(), - Fields: getItemFields, - Limit: itemLimit - }); - - } - else if (item.Type == "Playlist") { - - promise = ApiClient.getInstantMixFromPlaylist(id, { - UserId: Dashboard.getCurrentUserId(), - Fields: getItemFields, - Limit: itemLimit - }); - - } - else if (item.Type == "Audio") { - - promise = ApiClient.getInstantMixFromSong(id, { - UserId: Dashboard.getCurrentUserId(), - Fields: getItemFields, - Limit: itemLimit - }); - - } - else { - return; - } + promise = ApiClient.getInstantMixFromItem(id, { + UserId: Dashboard.getCurrentUserId(), + Fields: getItemFields, + Limit: itemLimit + }); promise.done(function (result) { @@ -1760,7 +1715,12 @@ function canPlayH264() { - if (navigator.userAgent.toLowerCase().indexOf('firefox') != -1) { + var userAgent = navigator.userAgent.toLowerCase(); + + if (userAgent.indexOf('firefox') != -1) { + if (userAgent.indexOf('windows') != -1) { + return true; + } return false; } diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index dc6823fae0..fcbdf0fa44 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -2082,6 +2082,8 @@ var AppInfo = {}; capabilities.DeviceProfile = MediaPlayer.getDeviceProfile(Math.max(screen.height, screen.width)); createConnectionManager(capabilities).done(function () { onConnectionManagerCreated(deferred); }); + + //$(document.body).append('
    '); }); } diff --git a/dashboard-ui/themes/ios.css b/dashboard-ui/themes/ios.css index 94358f580b..12b3490324 100644 --- a/dashboard-ui/themes/ios.css +++ b/dashboard-ui/themes/ios.css @@ -141,6 +141,13 @@ paper-tab { padding: 0; } +.cardBox { + margin: 5px; +} + +.cardImage { + border-radius: 10px; +} .viewMenuSearch { background: #1c1c1c; diff --git a/dashboard-ui/vulcanize-out.html b/dashboard-ui/vulcanize-out.html index 08c46b7b8f..246eb0206c 100644 --- a/dashboard-ui/vulcanize-out.html +++ b/dashboard-ui/vulcanize-out.html @@ -9721,7 +9721,11 @@ CSS properties | Action } function currentOverlay() { - return overlays[overlays.length-1]; + var i = overlays.length - 1; + while (overlays[i] && !overlays[i].opened) { + --i; + } + return overlays[i]; } function currentOverlayZ() { @@ -9907,17 +9911,6 @@ context. You should place this element as a child of `` whenever possible. }, -/** - * Fired after the `iron-overlay` opens. - * @event iron-overlay-opened - */ - -/** - * Fired after the `iron-overlay` closes. - * @event iron-overlay-closed - * @param {{canceled: (boolean|undefined)}} set to the `closingReason` attribute - */ - listeners: { 'click': '_onClick', 'iron-resize': '_onIronResize' @@ -10194,6 +10187,16 @@ context. You should place this element as a child of `` whenever possible. } } +/** + * Fired after the `iron-overlay` opens. + * @event iron-overlay-opened + */ + +/** + * Fired after the `iron-overlay` closes. + * @event iron-overlay-closed + * @param {{canceled: (boolean|undefined)}} set to the `closingReason` attribute + */ }; /** @polymerBehavior */