close ffmpeg more gracefully
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 6.6 KiB |
|
@ -30,7 +30,6 @@
|
||||||
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
||||||
<option value="librarytiles">${OptionMyLibrary}</option>
|
<option value="librarytiles">${OptionMyLibrary}</option>
|
||||||
<option value="smalllibrarytiles">${OptionMyLibrarySmall}</option>
|
<option value="smalllibrarytiles">${OptionMyLibrarySmall}</option>
|
||||||
<option value="librarybuttons">${OptionMyLibraryButtons}</option>
|
|
||||||
<option value="folders">${OptionLibraryFolders}</option>
|
<option value="folders">${OptionLibraryFolders}</option>
|
||||||
<option value="resume">${OptionResumablemedia}</option>
|
<option value="resume">${OptionResumablemedia}</option>
|
||||||
</select>
|
</select>
|
||||||
|
@ -43,7 +42,6 @@
|
||||||
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
||||||
<option value="librarytiles">${OptionMyLibrary}</option>
|
<option value="librarytiles">${OptionMyLibrary}</option>
|
||||||
<option value="smalllibrarytiles">${OptionMyLibrarySmall}</option>
|
<option value="smalllibrarytiles">${OptionMyLibrarySmall}</option>
|
||||||
<option value="librarybuttons">${OptionMyLibraryButtons}</option>
|
|
||||||
<option value="folders">${OptionLibraryFolders}</option>
|
<option value="folders">${OptionLibraryFolders}</option>
|
||||||
<option value="resume">${OptionResumablemedia}</option>
|
<option value="resume">${OptionResumablemedia}</option>
|
||||||
<option value="none">${OptionNone}</option>
|
<option value="none">${OptionNone}</option>
|
||||||
|
@ -57,7 +55,6 @@
|
||||||
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
||||||
<option value="librarytiles">${OptionMyLibrary}</option>
|
<option value="librarytiles">${OptionMyLibrary}</option>
|
||||||
<option value="smalllibrarytiles">${OptionMyLibrarySmall}</option>
|
<option value="smalllibrarytiles">${OptionMyLibrarySmall}</option>
|
||||||
<option value="librarybuttons">${OptionMyLibraryButtons}</option>
|
|
||||||
<option value="folders">${OptionLibraryFolders}</option>
|
<option value="folders">${OptionLibraryFolders}</option>
|
||||||
<option value="resume">${OptionResumablemedia}</option>
|
<option value="resume">${OptionResumablemedia}</option>
|
||||||
<option value="none">${OptionNone}</option>
|
<option value="none">${OptionNone}</option>
|
||||||
|
@ -71,7 +68,6 @@
|
||||||
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
||||||
<option value="librarytiles">${OptionMyLibrary}</option>
|
<option value="librarytiles">${OptionMyLibrary}</option>
|
||||||
<option value="smalllibrarytiles">${OptionMyLibrarySmall}</option>
|
<option value="smalllibrarytiles">${OptionMyLibrarySmall}</option>
|
||||||
<option value="librarybuttons">${OptionMyLibraryButtons}</option>
|
|
||||||
<option value="folders">${OptionLibraryFolders}</option>
|
<option value="folders">${OptionLibraryFolders}</option>
|
||||||
<option value="resume">${OptionResumablemedia}</option>
|
<option value="resume">${OptionResumablemedia}</option>
|
||||||
<option value="none">${OptionNone}</option>
|
<option value="none">${OptionNone}</option>
|
||||||
|
|
|
@ -137,6 +137,7 @@
|
||||||
html = LibraryBrowser.getPosterViewHtml({
|
html = LibraryBrowser.getPosterViewHtml({
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
shape: "auto",
|
shape: "auto",
|
||||||
|
defaultShape: 'square',
|
||||||
context: 'channels',
|
context: 'channels',
|
||||||
showTitle: true,
|
showTitle: true,
|
||||||
centerText: true,
|
centerText: true,
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
html += LibraryBrowser.getPosterViewHtml({
|
html += LibraryBrowser.getPosterViewHtml({
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
shape: 'auto',
|
shape: 'auto',
|
||||||
|
defaultShape: 'square',
|
||||||
showTitle: true,
|
showTitle: true,
|
||||||
centerText: true,
|
centerText: true,
|
||||||
context: 'channels',
|
context: 'channels',
|
||||||
|
|
|
@ -14,90 +14,6 @@
|
||||||
return deferred.promise();
|
return deferred.promise();
|
||||||
}
|
}
|
||||||
|
|
||||||
function createMediaLinks(options) {
|
|
||||||
|
|
||||||
var html = "";
|
|
||||||
|
|
||||||
var items = options.items;
|
|
||||||
|
|
||||||
// "My Library" backgrounds
|
|
||||||
for (var i = 0, length = items.length; i < length; i++) {
|
|
||||||
|
|
||||||
var item = items[i];
|
|
||||||
|
|
||||||
var imgUrl;
|
|
||||||
|
|
||||||
switch (item.CollectionType) {
|
|
||||||
case "movies":
|
|
||||||
imgUrl = "css/images/items/folders/movies.png";
|
|
||||||
break;
|
|
||||||
case "music":
|
|
||||||
imgUrl = "css/images/items/folders/music.png";
|
|
||||||
break;
|
|
||||||
case "photos":
|
|
||||||
imgUrl = "css/images/items/folders/photos.png";
|
|
||||||
break;
|
|
||||||
case "livetv":
|
|
||||||
case "tvshows":
|
|
||||||
imgUrl = "css/images/items/folders/tv.png";
|
|
||||||
break;
|
|
||||||
case "games":
|
|
||||||
imgUrl = "css/images/items/folders/games.png";
|
|
||||||
break;
|
|
||||||
case "trailers":
|
|
||||||
imgUrl = "css/images/items/folders/movies.png";
|
|
||||||
break;
|
|
||||||
case "adultvideos":
|
|
||||||
case "homevideos":
|
|
||||||
imgUrl = "css/images/items/folders/homevideos.png";
|
|
||||||
break;
|
|
||||||
case "musicvideos":
|
|
||||||
imgUrl = "css/images/items/folders/musicvideos.png";
|
|
||||||
break;
|
|
||||||
case "books":
|
|
||||||
imgUrl = "css/images/items/folders/books.png";
|
|
||||||
break;
|
|
||||||
case "channels":
|
|
||||||
imgUrl = "css/images/items/folders/channels.png";
|
|
||||||
break;
|
|
||||||
case "boxsets":
|
|
||||||
default:
|
|
||||||
imgUrl = "css/images/items/folders/folder.png";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
var cssClass = "posterItem";
|
|
||||||
cssClass += ' ' + options.shape + 'PosterItem';
|
|
||||||
|
|
||||||
if (item.CollectionType) {
|
|
||||||
cssClass += ' ' + item.CollectionType + 'PosterItem';
|
|
||||||
}
|
|
||||||
|
|
||||||
var href = item.url || LibraryBrowser.getHref(item, options.context);
|
|
||||||
|
|
||||||
html += '<a data-itemid="' + item.Id + '" class="' + cssClass + '" href="' + href + '">';
|
|
||||||
|
|
||||||
var style = "";
|
|
||||||
|
|
||||||
if (imgUrl) {
|
|
||||||
style += 'background-image:url(\'' + imgUrl + '\');';
|
|
||||||
}
|
|
||||||
|
|
||||||
var imageCssClass = 'posterItemImage';
|
|
||||||
|
|
||||||
html += '<div class="' + imageCssClass + '" style="' + style + '">';
|
|
||||||
html += '</div>';
|
|
||||||
|
|
||||||
html += "<div class='posterItemDefaultText posterItemText'>";
|
|
||||||
html += item.Name;
|
|
||||||
html += "</div>";
|
|
||||||
|
|
||||||
html += "</a>";
|
|
||||||
}
|
|
||||||
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getDefaultSection(index) {
|
function getDefaultSection(index) {
|
||||||
|
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
@ -109,38 +25,13 @@
|
||||||
case 2:
|
case 2:
|
||||||
return 'latestmedia';
|
return 'latestmedia';
|
||||||
case 3:
|
case 3:
|
||||||
return 'latestchannelmedia';
|
return '';
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadlibraryButtons(elem, userId, index) {
|
|
||||||
|
|
||||||
getUserViews(userId).done(function (items) {
|
|
||||||
|
|
||||||
var html = '<br/>';
|
|
||||||
|
|
||||||
if (index) {
|
|
||||||
html += '<h1 class="listHeader">' + Globalize.translate('HeaderMyLibrary') + '</h1>';
|
|
||||||
}
|
|
||||||
html += '<div>';
|
|
||||||
html += createMediaLinks({
|
|
||||||
items: items,
|
|
||||||
shape: 'myLibrary',
|
|
||||||
showTitle: true,
|
|
||||||
centerText: true
|
|
||||||
|
|
||||||
});
|
|
||||||
html += '</div>';
|
|
||||||
|
|
||||||
$(elem).html(html);
|
|
||||||
|
|
||||||
handleLibraryLinkNavigations(elem);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function loadRecentlyAdded(elem, userId) {
|
function loadRecentlyAdded(elem, userId) {
|
||||||
|
|
||||||
var screenWidth = $(window).width();
|
var screenWidth = $(window).width();
|
||||||
|
@ -224,7 +115,9 @@
|
||||||
|
|
||||||
if (items.length) {
|
if (items.length) {
|
||||||
|
|
||||||
html += '<h1 class="listHeader">' + Globalize.translate('HeaderMyLibrary') + '</h1>';
|
var cssClass = index ? 'listHeader' : 'listHeader firstListHeader';
|
||||||
|
|
||||||
|
html += '<h1 class="' + cssClass + '">' + Globalize.translate('HeaderMyLibrary') + '</h1>';
|
||||||
|
|
||||||
html += '<div>';
|
html += '<div>';
|
||||||
html += LibraryBrowser.getPosterViewHtml({
|
html += LibraryBrowser.getPosterViewHtml({
|
||||||
|
@ -326,23 +219,21 @@
|
||||||
var section = displayPreferences.CustomPrefs['home' + index] || getDefaultSection(index);
|
var section = displayPreferences.CustomPrefs['home' + index] || getDefaultSection(index);
|
||||||
|
|
||||||
var elem = $('.section' + index, page);
|
var elem = $('.section' + index, page);
|
||||||
|
|
||||||
if (section == 'latestmedia') {
|
if (section == 'latestmedia') {
|
||||||
loadRecentlyAdded(elem, userId);
|
loadRecentlyAdded(elem, userId);
|
||||||
}
|
}
|
||||||
else if (section == 'librarytiles') {
|
else if (section == 'librarytiles') {
|
||||||
loadLibraryTiles(elem, userId, 'backdrop', index);
|
loadLibraryTiles(elem, userId, 'backdrop', index);
|
||||||
}
|
}
|
||||||
else if (section == 'smalllibrarytiles') {
|
else if (section == 'smalllibrarytiles' || section == 'librarybuttons') {
|
||||||
loadLibraryTiles(elem, userId, 'miniBackdrop', index);
|
loadLibraryTiles(elem, userId, 'miniBackdrop', index);
|
||||||
}
|
}
|
||||||
else if (section == 'resume') {
|
else if (section == 'resume') {
|
||||||
loadResume(elem, userId);
|
loadResume(elem, userId);
|
||||||
}
|
}
|
||||||
else if (section == 'librarybuttons') {
|
|
||||||
loadlibraryButtons(elem, userId, index);
|
|
||||||
|
|
||||||
} else if (section == 'folders') {
|
else if (section == 'folders') {
|
||||||
loadLibraryFolders(elem, userId, 'backdrop', index);
|
loadLibraryFolders(elem, userId, 'backdrop', index);
|
||||||
|
|
||||||
} else if (section == 'latestchannelmedia') {
|
} else if (section == 'latestchannelmedia') {
|
||||||
|
|
|
@ -515,9 +515,12 @@
|
||||||
options.shape = 'banner';
|
options.shape = 'banner';
|
||||||
options.coverImage = true;
|
options.coverImage = true;
|
||||||
}
|
}
|
||||||
else {
|
else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 0.6666667) < .2) {
|
||||||
options.shape = 'portrait';
|
options.shape = 'portrait';
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
options.shape = options.defaultShape || 'portrait';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0, length = items.length; i < length; i++) {
|
for (var i = 0, length = items.length; i < length; i++) {
|
||||||
|
|