update people queries

This commit is contained in:
Luke Pulverenti 2015-07-06 22:25:23 -04:00
parent 99768ecffe
commit 17a0f1578d
22 changed files with 215 additions and 123 deletions

View File

@ -211,15 +211,12 @@
function tryReconnectInternal(deferred, connectionMode, currentRetryCount) {
var previousConnectionMode = self.serverInfo().LastConnectionMode;
var previousServerAddress = MediaBrowser.ServerInfo.getServerAddress(self.serverInfo(), previousConnectionMode);
connectionMode = switchConnectionMode(connectionMode);
var url = MediaBrowser.ServerInfo.getServerAddress(self.serverInfo(), connectionMode);
logger.log("Attempting reconnection to " + url);
var timeout = connectionMode == MediaBrowser.ConnectionMode.Local ? 5000 : 15000;
var timeout = connectionMode == MediaBrowser.ConnectionMode.Local ? 7000 : 15000;
HttpClient.send({

View File

@ -41,7 +41,7 @@
var self = this;
var apiClients = [];
var defaultTimeout = 15000;
var defaultTimeout = 20000;
function mergeServers(list1, list2) {
@ -907,7 +907,7 @@
if (mode == MediaBrowser.ConnectionMode.Local) {
enableRetry = true;
timeout = 5000;
timeout = 7000;
}
else if (mode == MediaBrowser.ConnectionMode.Manual) {

View File

@ -57,7 +57,7 @@
// Use the embedded server for iOS8, and also if we don't know the iOS version, just to be safe
//if ($.browser.iOSVersion == 8 || !$.browser.iOSVersion)
{
return url.replace('file://', '');
//return url.replace('file://', '');
}
}
return url;

View File

@ -25,7 +25,9 @@
if (options.callback) {
if (index >= 1) {
// Results are 1-based
if (index >= 1 && options.items.length >= index) {
options.callback(options.items[index - 1].id);
}
}

View File

@ -26,7 +26,7 @@
var elapsedTime = playState.PositionTicks ? (playState.PositionTicks / 10000000) : 0;
var url = '';
var imgHeight = 100;
var imgHeight = 600;
var nowPlayingItem = state.NowPlayingItem;

View File

@ -47,12 +47,19 @@
margin: 2px;
}
@media all and (max-width: 800px) {
.cardBox {
margin: 1px;
}
}
.largeCardMargin .cardBox {
margin: 8px;
}
.mediumCardMargin .cardBox {
margin: 6px;
margin: 5px;
}
.defaultBackground .cardImage {
@ -69,7 +76,7 @@
.cardOverlayPlayButton iron-icon {
width: 20px;
height: 20px;
background-color: rgba(215,215,215,.9);
background-color: rgba(210,210,210,.9);
border-radius: 500px;
padding: 6px;
}
@ -84,18 +91,11 @@
.cardOverlayMoreButton iron-icon {
width: 20px;
height: 20px;
background-color: rgba(215,215,215,.9);
background-color: rgba(210,210,210,.9);
border-radius: 500px;
padding: 6px;
}
@media all and (max-width: 800px) {
.cardBox {
margin: 1px;
}
}
.grayscale {
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);

View File

@ -3,7 +3,7 @@
}
.libraryPage:not(.noSecondaryNavPage) {
padding-top: 96px !important;
padding-top: 95px !important;
}
.pageWithAbsoluteTabs:not(.noSecondaryNavPage) {
@ -266,7 +266,7 @@
margin: 0 0;
position: relative;
font-weight: normal;
border-bottom: 3px solid transparent;
border-bottom: 2px solid transparent;
}
.libraryViewNav .ui-btn-active {

View File

@ -57,7 +57,7 @@
text-overflow: ellipsis;
vertical-align: middle;
text-align: left;
font-size: 14px;
font-size: 15px;
max-width: 130px;
}

View File

@ -495,8 +495,8 @@ h1 a:hover {
}
.libraryViewNav:not(.paperLibraryViewNav).headroom--unpinned:not(.headroomDisabled) {
-webkit-transform: translateY(-208%);
transform: translateY(-208%);
-webkit-transform: translateY(-210%);
transform: translateY(-210%);
}
.paperLibraryViewNav.headroom--unpinned:not(.headroomDisabled) {
@ -931,7 +931,7 @@ h1 .imageLink {
}
.footerOverBottomTabs {
bottom: 51px !important;
bottom: 49px !important;
}
.footerNotification {

View File

@ -4,7 +4,7 @@
<title>Emby</title>
</head>
<body>
<div id="editCollectionTitlesPage" data-role="page" class="page libraryPage metadataEditorPage" data-contextname="${HeaderMetadataManager}" data-require="scripts/editorsidebar,scripts/editcollectionitems,jqmicons">
<div id="editCollectionTitlesPage" data-role="page" class="page libraryPage metadataEditorPage noSecondaryNavPage" data-contextname="${HeaderMetadataManager}" data-require="scripts/editorsidebar,scripts/editcollectionitems,jqmicons">
<div data-role="content editPageContent">
<div class="editPageSidebar">
<div class="libraryTree">

View File

@ -4,7 +4,7 @@
<title>Emby</title>
</head>
<body>
<div id="editItemImagesPage" data-role="page" class="page libraryPage metadataEditorPage" data-contextname="${HeaderMetadataManager}" data-require="scripts/editorsidebar,scripts/edititemimages,jqmicons">
<div id="editItemImagesPage" data-role="page" class="page libraryPage metadataEditorPage noSecondaryNavPage" data-contextname="${HeaderMetadataManager}" data-require="scripts/editorsidebar,scripts/edititemimages,jqmicons">
<div data-role="content editPageContent">
<div class="editPageSidebar smoothScrollY">
<div class="libraryTree">

View File

@ -4,7 +4,7 @@
<title>Emby</title>
</head>
<body>
<div id="editItemMetadataPage" data-role="page" class="page libraryPage metadataEditorPage" data-contextname="${HeaderMetadataManager}" data-require="scripts/editorsidebar,scripts/edititemmetadata,jqmicons">
<div id="editItemMetadataPage" data-role="page" class="page libraryPage metadataEditorPage noSecondaryNavPage" data-contextname="${HeaderMetadataManager}" data-require="scripts/editorsidebar,scripts/edititemmetadata,jqmicons">
<div data-role="content editPageContent">
<div class="editPageSidebar smoothScrollY">
<div class="libraryTree">

View File

@ -4,7 +4,7 @@
<title>Emby</title>
</head>
<body>
<div id="editItemSubtitlesPage" data-role="page" class="page libraryPage metadataEditorPage" data-contextname="${HeaderMetadataManager}" data-require="scripts/editorsidebar,scripts/edititemsubtitles,jqmicons">
<div id="editItemSubtitlesPage" data-role="page" class="page libraryPage metadataEditorPage noSecondaryNavPage" data-contextname="${HeaderMetadataManager}" data-require="scripts/editorsidebar,scripts/edititemsubtitles,jqmicons">
<div data-role="content editPageContent">
<div class="editPageSidebar smoothScrollY">
<div class="libraryTree">

View File

@ -38,7 +38,7 @@
<label for="selectView">${LabelView}</label>
<select id="selectView">
<option value="List">${OptionList}</option>
<option value="PosterCard">${OptionPosterCard}</option>
<option value="Poster">${OptionPoster}</option>
</select>
</div>
<br />

View File

@ -1440,7 +1440,6 @@
//$.mobile.urlHistory.ignoreNextHashChange = true;
window.location.hash = 'editItemMetadataPage?id=' + data.id;
alert(window.location.href);
reload(page);
}
});

View File

@ -64,7 +64,7 @@
} else {
elem.empty();
elem.innerHTML = '';
var deferred = DeferredBuilder.Deferred();
deferred.resolve();

View File

@ -494,7 +494,7 @@
var mediaType = card.getAttribute('data-mediatype');
var resumePosition = parseInt(card.getAttribute('data-resumeposition'));
if (type == 'MusicAlbum' || type == 'MusicArtist' || type == 'MusicGenre') {
if (type == 'MusicAlbum' || type == 'MusicArtist' || type == 'MusicGenre' || type == 'Playlist') {
isFolder = true;
}

View File

@ -153,6 +153,15 @@
//});
}
var directPlayVideoContainers = AppInfo.directPlayVideoContainers;
if (directPlayVideoContainers && directPlayVideoContainers.length) {
profile.DirectPlayProfiles.push({
Container: directPlayVideoContainers.join(','),
Type: 'Video'
});
}
profile.DirectPlayProfiles.push({
Container: 'mp3',
Type: 'Audio'
@ -300,23 +309,27 @@
}]
});
profile.CodecProfiles.push({
Type: 'VideoAudio',
Codec: 'aac',
Container: 'mkv,mov',
Conditions: [
{
Condition: 'NotEquals',
Property: 'AudioProfile',
Value: 'HE-AAC'
},
{
Condition: 'NotEquals',
Property: 'AudioProfile',
Value: 'LC'
}
]
});
var isVlc = AppInfo.isNativeApp && $.browser.android;
if (!isVlc) {
profile.CodecProfiles.push({
Type: 'VideoAudio',
Codec: 'aac',
Container: 'mkv,mov',
Conditions: [
{
Condition: 'NotEquals',
Property: 'AudioProfile',
Value: 'HE-AAC'
},
{
Condition: 'NotEquals',
Property: 'AudioProfile',
Value: 'LC'
}
]
});
}
profile.CodecProfiles.push({
Type: 'VideoAudio',
@ -330,49 +343,69 @@
]
});
profile.CodecProfiles.push({
Type: 'Video',
Codec: 'h264',
Conditions: [
{
Condition: 'NotEquals',
Property: 'IsAnamorphic',
Value: 'true',
IsRequired: false
},
{
Condition: 'EqualsAny',
Property: 'VideoProfile',
Value: 'high|main|baseline|constrained baseline'
},
{
Condition: 'LessThanEqual',
Property: 'VideoLevel',
Value: '41'
},
{
Condition: 'LessThanEqual',
Property: 'Height',
Value: maxHeight
}]
});
if (isVlc) {
profile.CodecProfiles.push({
Type: 'Video',
Codec: 'h264',
Conditions: [
{
Condition: 'EqualsAny',
Property: 'VideoProfile',
Value: 'high|main|baseline|constrained baseline'
},
{
Condition: 'LessThanEqual',
Property: 'VideoLevel',
Value: '41'
}]
});
} else {
profile.CodecProfiles.push({
Type: 'Video',
Codec: 'h264',
Conditions: [
{
Condition: 'NotEquals',
Property: 'IsAnamorphic',
Value: 'true',
IsRequired: false
},
{
Condition: 'EqualsAny',
Property: 'VideoProfile',
Value: 'high|main|baseline|constrained baseline'
},
{
Condition: 'LessThanEqual',
Property: 'VideoLevel',
Value: '41'
},
{
Condition: 'LessThanEqual',
Property: 'Height',
Value: maxHeight
}]
});
}
profile.CodecProfiles.push({
Type: 'Video',
Codec: 'vpx',
Conditions: [
{
Condition: 'NotEquals',
Property: 'IsAnamorphic',
Value: 'true',
IsRequired: false
},
{
Condition: 'LessThanEqual',
Property: 'Height',
Value: maxHeight
}]
});
if (!isVlc) {
profile.CodecProfiles.push({
Type: 'Video',
Codec: 'vpx',
Conditions: [
{
Condition: 'NotEquals',
Property: 'IsAnamorphic',
Value: 'true',
IsRequired: false
},
{
Condition: 'LessThanEqual',
Property: 'Height',
Value: maxHeight
}]
});
}
// Subtitle profiles
// External vtt or burn in
@ -483,6 +516,10 @@
// }
//}
if ($.browser.android && AppInfo.isNativeApp) {
return true;
}
var media = document.createElement('video');
// safari
@ -1381,7 +1418,7 @@
Events.off(mediaRenderer, 'ended', self.playNextAfterEnded);
$(mediaRenderer).one("ended", function() {
$(mediaRenderer).one("ended", function () {
$(this).off('.mediaplayerevent');
@ -1654,7 +1691,7 @@
self.canPlayWebm = function () {
if (self._canPlayWebm == null) {
self._canPlayWebm = document.createElement('video').canPlayType('video/webm').replace(/no/, '');
self._canPlayWebm = ($.browser.android && AppInfo.isNativeApp) || document.createElement('video').canPlayType('video/webm').replace(/no/, '');
}
return self._canPlayWebm;
};
@ -1705,7 +1742,7 @@
mediaRenderer.setPoster(self.getPosterUrl(item));
mediaRenderer.setCurrentSrc(audioUrl, item, mediaSource);
Events.on(mediaRenderer, "volumechange.mediaplayerevent", function() {
Events.on(mediaRenderer, "volumechange.mediaplayerevent", function () {
Logger.log('audio element event: volumechange');

View File

@ -15,15 +15,45 @@
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
};
var data = {};
function getQuery() {
var key = getSavedQueryKey();
var pageData = data[key];
if (!pageData) {
pageData = data[key] = {
query: {
SortBy: "AlbumArtist,SortName",
SortOrder: "Ascending",
IncludeItemTypes: "MusicAlbum",
Recursive: true,
Fields: "PrimaryImageAspectRatio,SortName,SyncInfo",
StartIndex: 0,
ImageTypeLimit: 1,
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
Limit: LibraryBrowser.getDefaultPageSize()
}
};
pageData.query.ParentId = LibraryMenu.getTopParentId();
LibraryBrowser.loadSavedQueryValues(key, pageData.query);
}
return pageData.query;
}
function getSavedQueryKey() {
return 'musicalbums' + (query.ParentId || '');
return getWindowUrl();
}
function reloadItems(page) {
Dashboard.showLoadingMsg();
var query = getQuery();
ApiClient.getItems(Dashboard.getCurrentUserId(), query).done(function (result) {
// Scroll back up so they can see the results from the beginning
@ -109,13 +139,15 @@
});
LibraryBrowser.saveQueryValues(getSavedQueryKey(), query);
LibraryBrowser.setLastRefreshed(page);
Dashboard.hideLoadingMsg();
});
}
function updateFilterControls(page) {
var query = getQuery();
$('#selectView', page).val(view).selectmenu('refresh');
// Reset form values using the last used query
@ -142,6 +174,8 @@
filtersLoaded = true;
var query = getQuery();
QueryFilters.loadFilters(page, Dashboard.getCurrentUserId(), query, function () {
reloadItems(page);
@ -159,6 +193,8 @@
});
$('.radioSortBy', page).on('click', function () {
var query = getQuery();
query.SortBy = this.getAttribute('data-sortby');
query.StartIndex = 0;
@ -171,6 +207,8 @@
});
$('.radioSortOrder', page).on('click', function () {
var query = getQuery();
query.SortOrder = this.getAttribute('data-sortorder');
query.StartIndex = 0;
@ -183,6 +221,7 @@
});
$('.chkStandardFilter', page).on('change', function () {
var query = getQuery();
var filterName = this.getAttribute('data-filter');
var filters = query.Filters || "";
@ -203,6 +242,8 @@
view = this.value;
var query = getQuery();
if (view == "Timeline") {
query.SortBy = "PremiereDate";
@ -218,6 +259,8 @@
$('.alphabetPicker', page).on('alphaselect', function (e, character) {
var query = getQuery();
if (query.SortBy.indexOf('AlbumArtist') == -1) {
query.NameStartsWithOrGreater = character;
query.AlbumArtistStartsWithOrGreater = '';
@ -232,6 +275,8 @@
}).on('alphaclear', function (e) {
var query = getQuery();
query.NameStartsWithOrGreater = '';
query.AlbumArtistStartsWithOrGreater = '';
@ -239,6 +284,8 @@
});
$('#selectPageSize', page).on('change', function () {
var query = getQuery();
query.Limit = parseInt(this.value);
query.StartIndex = 0;
reloadItems(page);
@ -246,29 +293,22 @@
}).on('pagebeforeshowready', "#musicAlbumsPage", function () {
query.ParentId = LibraryMenu.getTopParentId();
var page = this;
var limit = LibraryBrowser.getDefaultPageSize();
// If the default page size has changed, the start index will have to be reset
if (limit != query.Limit) {
query.Limit = limit;
query.StartIndex = 0;
}
var viewKey = getSavedQueryKey();
LibraryBrowser.loadSavedQueryValues(viewKey, query);
QueryFilters.onPageShow(page, query);
LibraryBrowser.getSavedViewSetting(viewKey).done(function (val) {
if (LibraryBrowser.needsRefresh(page)) {
LibraryBrowser.getSavedViewSetting(viewKey).done(function (val) {
if (val) {
$('#selectView', page).val(val).selectmenu('refresh').trigger('change');
} else {
reloadItems(page);
}
});
if (val) {
$('#selectView', page).val(val).selectmenu('refresh').trigger('change');
} else {
reloadItems(page);
}
});
}
updateFilterControls(this);
});

View File

@ -1,6 +1,6 @@
(function ($, document) {
var view = LibraryBrowser.getDefaultItemsView('PosterCard', 'PosterCard');
var view = LibraryBrowser.getDefaultItemsView('Poster', 'Poster');
// The base query options
var query = {
@ -78,6 +78,19 @@
cardLayout: true
});
}
else if (view == "Poster") {
html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "square",
context: 'playlists',
showTitle: true,
lazy: true,
coverImage: true,
showItemCounts: true,
centerText: true,
overlayPlayButton: true
});
}
$('.noItemsMessage', page).hide();

View File

@ -1721,8 +1721,10 @@ var AppInfo = {};
if (isCordova && isAndroid) {
AppInfo.directPlayAudioContainers = ['aac', 'mp3', 'ogg', 'flac', 'wma', 'm4a', 'oga'];
AppInfo.directPlayVideoContainers = ['mkv', 'mp4', 'mov', 'm4v', 'avi', 'flv', 'wmv', 'webm'];
} else {
AppInfo.directPlayAudioContainers = [];
AppInfo.directPlayVideoContainers = [];
}
}
@ -2061,7 +2063,9 @@ var AppInfo = {};
function initCordovaWithDeviceId(deferred, deviceId) {
require(['cordova/imagestore']);
if ($.browser.android) {
require(['cordova/imagestore']);
}
var capablities = Dashboard.capabilities();

View File

@ -85,9 +85,9 @@
// If less than 200, this happens on the home page
// Need to fix those before this can be set to 0
if (window.AppInfo && AppInfo.isNativeApp && $.browser.safari) {
return 7000;
}
//if (window.AppInfo && AppInfo.isNativeApp && $.browser.safari) {
// return 7000;
//}
var screens = $.browser.mobile ? 2.5 : 1;