restore video grouping feature

This commit is contained in:
Luke Pulverenti 2015-10-19 22:06:05 -04:00
parent c5df36b29a
commit c109753d4c
7 changed files with 25 additions and 36 deletions

View File

@ -63,7 +63,9 @@
// Add one second to avoid getting programs that are just ending
date = new Date(date.getTime() + 1000);
var nextDay = new Date(date.getTime() + msPerDay - 1);
// Subtract to avoid getting programs that are starting when the grid ends
var nextDay = new Date(date.getTime() + msPerDay - 2000);
Logger.log(nextDay);
channelsPromise.done(function (channelsResult) {
@ -213,9 +215,7 @@
var endPercent = (renderEndMs - renderStartMs) / msPerDay;
endPercent *= 100;
html += '<div class="programCell" style="left:' + startPercent + '%;width:' + endPercent + '%;">';
var cssClass = "programCellInner";
var cssClass = "programCell";
var addAccent = true;
if (program.IsKids) {
@ -232,7 +232,7 @@
addAccent = false;
}
html += '<a href="itemdetails.html?id=' + program.Id + '" class="' + cssClass + '" data-programid="' + program.Id + '">';
html += '<a href="itemdetails.html?id=' + program.Id + '" class="' + cssClass + '" data-programid="' + program.Id + '" style="left:' + startPercent + '%;width:' + endPercent + '%;">';
html += '<div class="guideProgramName">';
html += program.Name;
@ -269,8 +269,6 @@
}
html += '</a>';
html += '</div>';
}
html += '</div>';
@ -291,9 +289,9 @@
programGrid.innerHTML = html.join('');
$(programGrid).scrollTop(0).scrollLeft(0);
if (options.enableHoverMenu) {
$(programGrid).createGuideHoverMenu('.programCellInner');
$(programGrid).createGuideHoverMenu('.programCell');
}
}

View File

@ -98,7 +98,7 @@
.programAccent {
position: absolute;
bottom: 0;
left: 6px;
left: 0;
right: 0;
height: 2px;
}
@ -267,13 +267,9 @@
position: absolute;
top: 0;
bottom: 6px;
}
.programCellInner {
border-left: 6px solid #161616;
background-color: #212121;
display: block;
height: 100%;
color: #fff !important;
text-decoration: none;
font-weight: 400 !important;

View File

@ -195,8 +195,8 @@
<div class="detailSection audioVideoMediaInfo hide">
<h1>${HeaderMediaInfo}</h1>
<div>
<div class="splitVersionContainer" style="border-bottom: 1px solid #444;">
<button type="button" class="btnSplitVersions" data-mini="true" data-inline="true" data-icon="delete" title="${ButtonSplitVersionsApart}">${ButtonSplitVersionsApart}</button>
<div class="splitVersionContainer" style="border-bottom: 1px solid #444;padding:1em 0;">
<paper-button raised class="btnSplitVersions subdued">${ButtonSplitVersionsApart}</paper-button>
</div>
<div id="mediaInfoContent" class="mediaInfoContent"></div>
</div>

View File

@ -1248,6 +1248,12 @@
ironIcon: 'playlist-add'
});
items.push({
name: Globalize.translate('HeaderGroupVersions'),
id: 'groupvideos',
ironIcon: 'call-merge'
});
items.push({
name: Globalize.translate('ButtonRefresh'),
id: 'refresh',
@ -1282,6 +1288,9 @@
PlaylistManager.showPanel(items);
hideSelections();
break;
case 'groupvideos':
combineVersions($($.mobile.activePage)[0], items);
break;
case 'refresh':
items.map(function (itemId) {
@ -1318,14 +1327,7 @@
});
}
function getSelectedItems() {
return selectedItems;
}
function combineVersions(page) {
var selection = getSelectedItems();
function combineVersions(page, selection) {
if (selection.length < 2) {
@ -1337,15 +1339,7 @@
return;
}
var names = $('.chkItemSelect:checked', page).parents('.card').get().reverse().map(function (e) {
return $('.cardText', e).html();
}).join('<br/>');
var msg = Globalize.translate('MessageTheFollowingItemsWillBeGrouped') + "<br/><br/>" + names;
msg += "<br/><br/>" + Globalize.translate('MessageConfirmItemGrouping');
var msg = Globalize.translate('MessageTheSelectedItemsWillBeGrouped');
Dashboard.confirm(msg, Globalize.translate('HeaderGroupVersions'), function (confirmResult) {
@ -1361,7 +1355,7 @@
}).done(function () {
Dashboard.hideLoadingMsg();
hideSelections();
$('.itemsContainer', page).trigger('needsrefresh');
});
}

View File

@ -215,8 +215,7 @@
"MessageChromecastConnectionError": "Your Chromecast receiver is unable to connect to your Emby Server. Please check their connections and try again.",
"MessagePleaseSelectOneItem": "Please select at least one item.",
"MessagePleaseSelectTwoItems": "Please select at least two items.",
"MessageTheFollowingItemsWillBeGrouped": "The following titles will be grouped into one item:",
"MessageConfirmItemGrouping": "Emby apps will automatically choose the optimal version to play based on device and network performance. Are you sure you wish to continue?",
"MessageTheSelectedItemsWillBeGrouped": "The selected videos will be grouped into one virtual item. Emby apps will automatically choose which version to play based on device and network performance. Are you sure you wish to continue?",
"HeaderResume": "Resume",
"HeaderMyViews": "My Views",
"HeaderLibraryFolders": "Media Folders",

View File

@ -40,6 +40,7 @@ See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for
<g id="add-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z" /></g>
<g id="clear-all"><path d="M5 13h14v-2H5v2zm-2 4h14v-2H3v2zM7 7v2h14V7H7z" /></g>
<g id="airplay"><defs><path id="a" d="M0 0h24v24H0V0z" /></defs><defs><path id="c" d="M0 0h24v24H0V0z" /></defs><clipPath id="b"><use xlink:href="#a" overflow="visible" /></clipPath><clipPath id="d" clip-path="url(#b)"><use xlink:href="#c" overflow="visible" /></clipPath><path d="M6 22h12l-6-6zM21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" clip-path="url(#d)" /></g>
<g id="call-merge"><path d="M17 20.41L18.41 19 15 15.59 13.59 17 17 20.41zM7.5 8H11v5.59L5.59 19 7 20.41l6-6V8h3.5L12 3.5 7.5 8z" /></g>
<g id="album"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 14.5c-2.49 0-4.5-2.01-4.5-4.5S9.51 7.5 12 7.5s4.5 2.01 4.5 4.5-2.01 4.5-4.5 4.5zm0-5.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z" /></g>
<g id="check"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" /></g>
<g id="close"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" /></g>

View File

@ -19494,6 +19494,7 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] {
<g id="add-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"></path></g>
<g id="clear-all"><path d="M5 13h14v-2H5v2zm-2 4h14v-2H3v2zM7 7v2h14V7H7z"></path></g>
<g id="airplay"><defs><path id="a" d="M0 0h24v24H0V0z"></path></defs><defs><path id="c" d="M0 0h24v24H0V0z"></path></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"></use></clipPath><clipPath id="d" clip-path="url(#b)"><use xlink:href="#c" overflow="visible"></use></clipPath><path d="M6 22h12l-6-6zM21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" clip-path="url(#d)"></path></g>
<g id="call-merge"><path d="M17 20.41L18.41 19 15 15.59 13.59 17 17 20.41zM7.5 8H11v5.59L5.59 19 7 20.41l6-6V8h3.5L12 3.5 7.5 8z"></path></g>
<g id="album"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 14.5c-2.49 0-4.5-2.01-4.5-4.5S9.51 7.5 12 7.5s4.5 2.01 4.5 4.5-2.01 4.5-4.5 4.5zm0-5.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z"></path></g>
<g id="check"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"></path></g>
<g id="close"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path></g>