add more play buttons

This commit is contained in:
Luke Pulverenti 2016-02-12 15:26:03 -05:00
parent 9eb9226941
commit 073fd66f81
14 changed files with 47 additions and 25 deletions

View File

@ -15,8 +15,8 @@
<p class="itemEpisodeName"></p> <p class="itemEpisodeName"></p>
<p class="itemMiscInfo"></p> <p class="itemMiscInfo"></p>
<br />
<div style="display: none;" id="eligibleForSeriesFields"> <div style="display: none;" id="eligibleForSeriesFields">
<br />
<div> <div>
<paper-checkbox id="chkRecordSeries">${OptionRecordSeries}</paper-checkbox> <paper-checkbox id="chkRecordSeries">${OptionRecordSeries}</paper-checkbox>
</div> </div>

View File

@ -87,7 +87,8 @@
showParentTitle: true, showParentTitle: true,
overlayText: true, overlayText: true,
lazy: true, lazy: true,
showDetailsMenu: true showDetailsMenu: true,
overlayPlayButton: true
}); });
} }
else if (view == "PosterCard") { else if (view == "PosterCard") {

View File

@ -19,9 +19,9 @@
function getSections() { function getSections() {
return [ return [
{ name: 'HeaderFavoriteMovies', types: "Movie", id: "favoriteMovies", shape: getPosterShape(), showTitle: false }, { name: 'HeaderFavoriteMovies', types: "Movie", id: "favoriteMovies", shape: getPosterShape(), showTitle: false, overlayPlayButton: true },
{ name: 'HeaderFavoriteShows', types: "Series", id: "favoriteShows", shape: getPosterShape(), showTitle: false }, { name: 'HeaderFavoriteShows', types: "Series", id: "favoriteShows", shape: getPosterShape(), showTitle: false, overlayPlayButton: true },
{ name: 'HeaderFavoriteEpisodes', types: "Episode", id: "favoriteEpisode", shape: getThumbShape(), preferThumb: false, showTitle: true, showParentTitle: true }, { name: 'HeaderFavoriteEpisodes', types: "Episode", id: "favoriteEpisode", shape: getThumbShape(), preferThumb: false, showTitle: true, showParentTitle: true, overlayPlayButton: true },
{ name: 'HeaderFavoriteGames', types: "Game", id: "favoriteGames", shape: getSquareShape(), preferThumb: false, showTitle: true }, { name: 'HeaderFavoriteGames', types: "Game", id: "favoriteGames", shape: getSquareShape(), preferThumb: false, showTitle: true },
{ name: 'HeaderFavoriteArtists', types: "MusicArtist", id: "favoriteArtists", shape: getSquareShape(), preferThumb: false, showTitle: true, overlayText: false, showParentTitle: true, centerText: true, overlayPlayButton: true }, { name: 'HeaderFavoriteArtists', types: "MusicArtist", id: "favoriteArtists", shape: getSquareShape(), preferThumb: false, showTitle: true, overlayText: false, showParentTitle: true, centerText: true, overlayPlayButton: true },
{ name: 'HeaderFavoriteAlbums', types: "MusicAlbum", id: "favoriteAlbums", shape: getSquareShape(), preferThumb: false, showTitle: true, overlayText: false, showParentTitle: true, centerText: true, overlayPlayButton: true }, { name: 'HeaderFavoriteAlbums', types: "MusicAlbum", id: "favoriteAlbums", shape: getSquareShape(), preferThumb: false, showTitle: true, overlayText: false, showParentTitle: true, centerText: true, overlayPlayButton: true },

View File

@ -903,7 +903,8 @@
shape: getPortraitShape(), shape: getPortraitShape(),
showTitle: true, showTitle: true,
centerText: true, centerText: true,
lazy: true lazy: true,
overlayPlayButton: true
}); });
} }
else if (item.Type == "Season") { else if (item.Type == "Season") {
@ -916,7 +917,7 @@
overlayText: true, overlayText: true,
lazy: true, lazy: true,
showDetailsMenu: true, showDetailsMenu: true,
overlayMoreButton: AppInfo.enableAppLayouts overlayPlayButton: AppInfo.enableAppLayouts
}); });
} }
else if (item.Type == "GameSystem") { else if (item.Type == "GameSystem") {

View File

@ -669,6 +669,7 @@
if (!resumePositionTicks && mediaType != "Audio" && !isFolder) { if (!resumePositionTicks && mediaType != "Audio" && !isFolder) {
if (!externalPlayers || mediaType != "Video") { if (!externalPlayers || mediaType != "Video") {
MediaController.play(itemId); MediaController.play(itemId);
return; return;
} }
@ -1529,6 +1530,10 @@
atts.push('data-context="' + (options.context || '') + '"'); atts.push('data-context="' + (options.context || '') + '"');
} }
if (item.IsFolder) {
atts.push('data-isfolder="' + item.IsFolder + '"');
}
atts.push('data-itemtype="' + item.Type + '"'); atts.push('data-itemtype="' + item.Type + '"');
if (item.MediaType) { if (item.MediaType) {

View File

@ -181,11 +181,13 @@
function onPlayItemButtonClick() { function onPlayItemButtonClick() {
var id = this.getAttribute('data-itemid'); var target = this;
var type = this.getAttribute('data-itemtype');
var isFolder = this.getAttribute('data-isfolder') == 'true'; var id = target.getAttribute('data-itemid');
var mediaType = this.getAttribute('data-mediatype'); var type = target.getAttribute('data-itemtype');
var resumePosition = parseInt(this.getAttribute('data-resumeposition')); var isFolder = target.getAttribute('data-isfolder') == 'true';
var mediaType = target.getAttribute('data-mediatype');
var resumePosition = parseInt(target.getAttribute('data-resumeposition'));
LibraryBrowser.showPlayMenu(this, id, type, isFolder, mediaType, resumePosition); LibraryBrowser.showPlayMenu(this, id, type, isFolder, mediaType, resumePosition);

View File

@ -88,7 +88,8 @@
context: context, context: context,
showTitle: true, showTitle: true,
centerText: true, centerText: true,
lazy: true lazy: true,
overlayPlayButton: true
}); });
} }
else if (view == "PosterCard") { else if (view == "PosterCard") {
@ -110,7 +111,8 @@
showTitle: true, showTitle: true,
centerText: true, centerText: true,
lazy: true, lazy: true,
preferThumb: true preferThumb: true,
overlayPlayButton: true
}); });
} }
else if (view == "ThumbCard") { else if (view == "ThumbCard") {

View File

@ -75,7 +75,8 @@
context: 'movies', context: 'movies',
showItemCounts: true, showItemCounts: true,
centerText: true, centerText: true,
lazy: true lazy: true,
overlayPlayButton: true
}); });
} }
else if (view == "ThumbCard") { else if (view == "ThumbCard") {
@ -109,7 +110,8 @@
context: 'movies', context: 'movies',
centerText: true, centerText: true,
showItemCounts: true, showItemCounts: true,
lazy: true lazy: true,
overlayPlayButton: true
}); });
} }

View File

@ -79,7 +79,8 @@
shape: "backdrop", shape: "backdrop",
preferThumb: true, preferThumb: true,
lazy: true, lazy: true,
showDetailsMenu: true showDetailsMenu: true,
overlayPlayButton: true
}); });
} }
else if (view == "ThumbCard") { else if (view == "ThumbCard") {
@ -118,7 +119,8 @@
shape: "portrait", shape: "portrait",
centerText: true, centerText: true,
lazy: true, lazy: true,
showDetailsMenu: true showDetailsMenu: true,
overlayPlayButton: true
}); });
} }
else if (view == "PosterCard") { else if (view == "PosterCard") {

View File

@ -63,7 +63,8 @@
centerText: true, centerText: true,
lazy: true, lazy: true,
overlayText: false, overlayText: false,
showDetailsMenu: true showDetailsMenu: true,
overlayPlayButton: true
}); });
} }

View File

@ -72,7 +72,8 @@
items: result.Items, items: result.Items,
shape: "portrait", shape: "portrait",
lazy: true, lazy: true,
showDetailsMenu: true showDetailsMenu: true,
overlayPlayButton: true
}); });
var elem = page.querySelector('.itemsContainer'); var elem = page.querySelector('.itemsContainer');

View File

@ -637,7 +637,8 @@
coverImage: true, coverImage: true,
lazy: true, lazy: true,
showDetailsMenu: true, showDetailsMenu: true,
centerText: true centerText: true,
overlayPlayButton: true
}); });
html += '</div>'; html += '</div>';

View File

@ -68,7 +68,8 @@
context: 'tv', context: 'tv',
showItemCounts: true, showItemCounts: true,
centerText: true, centerText: true,
lazy: true lazy: true,
overlayPlayButton: true
}); });
} }
else if (view == "ThumbCard") { else if (view == "ThumbCard") {
@ -102,7 +103,8 @@
context: 'tv', context: 'tv',
centerText: true, centerText: true,
showItemCounts: true, showItemCounts: true,
lazy: true lazy: true,
overlayPlayButton: true
}); });
} }

View File

@ -78,7 +78,8 @@
shape: "backdrop", shape: "backdrop",
preferThumb: true, preferThumb: true,
context: 'tv', context: 'tv',
lazy: true lazy: true,
overlayPlayButton: true
}); });
} }
@ -132,7 +133,8 @@
shape: "portrait", shape: "portrait",
context: 'tv', context: 'tv',
centerText: true, centerText: true,
lazy: true lazy: true,
overlayPlayButton: true
}); });
} }