update audio transcoding bitrate
This commit is contained in:
parent
2032762b30
commit
6902732194
9 changed files with 116 additions and 64 deletions
|
@ -155,49 +155,49 @@
|
|||
if (item.MovieCount) {
|
||||
|
||||
html += '<input type="radio" name="ibnItems" id="radioMovies" class="context-movies" value="on">';
|
||||
html += '<label for="radioMovies">'+Globalize.translate('TabMovies')+'</label>';
|
||||
html += '<label for="radioMovies">' + Globalize.translate('TabMovies') + '</label>';
|
||||
}
|
||||
|
||||
if (item.SeriesCount) {
|
||||
|
||||
html += '<input type="radio" name="ibnItems" id="radioShows" class="context-tv" value="on">';
|
||||
html += '<label for="radioShows">'+Globalize.translate('TabSeries')+'</label>';
|
||||
html += '<label for="radioShows">' + Globalize.translate('TabSeries') + '</label>';
|
||||
}
|
||||
|
||||
if (item.EpisodeCount) {
|
||||
|
||||
html += '<input type="radio" name="ibnItems" id="radioEpisodes" class="context-tv" value="on">';
|
||||
html += '<label for="radioEpisodes">'+Globalize.translate('TabEpisodes')+'</label>';
|
||||
html += '<label for="radioEpisodes">' + Globalize.translate('TabEpisodes') + '</label>';
|
||||
}
|
||||
|
||||
if (item.TrailerCount) {
|
||||
|
||||
html += '<input type="radio" name="ibnItems" id="radioTrailers" class="context-movies" value="on">';
|
||||
html += '<label for="radioTrailers">'+Globalize.translate('TabTrailers')+'</label>';
|
||||
html += '<label for="radioTrailers">' + Globalize.translate('TabTrailers') + '</label>';
|
||||
}
|
||||
|
||||
if (item.GameCount) {
|
||||
|
||||
html += '<input type="radio" name="ibnItems" id="radioGames" class="context-games" value="on">';
|
||||
html += '<label for="radioGames">'+Globalize.translate('TabGames')+'</label>';
|
||||
html += '<label for="radioGames">' + Globalize.translate('TabGames') + '</label>';
|
||||
}
|
||||
|
||||
if (item.AlbumCount) {
|
||||
|
||||
html += '<input type="radio" name="ibnItems" id="radioAlbums" class="context-music" value="on">';
|
||||
html += '<label for="radioAlbums">'+Globalize.translate('TabAlbums')+'</label>';
|
||||
html += '<label for="radioAlbums">' + Globalize.translate('TabAlbums') + '</label>';
|
||||
}
|
||||
|
||||
if (item.SongCount) {
|
||||
|
||||
html += '<input type="radio" name="ibnItems" id="radioSongs" class="context-music" value="on">';
|
||||
html += '<label for="radioSongs">'+Globalize.translate('TabSongs')+'</label>';
|
||||
html += '<label for="radioSongs">' + Globalize.translate('TabSongs') + '</label>';
|
||||
}
|
||||
|
||||
if (item.MusicVideoCount) {
|
||||
|
||||
html += '<input type="radio" name="ibnItems" id="radioMusicVideos" class="context-music" value="on">';
|
||||
html += '<label for="radioMusicVideos">'+Globalize.translate('TabMusicVideos')+'</label>';
|
||||
html += '<label for="radioMusicVideos">' + Globalize.translate('TabMusicVideos') + '</label>';
|
||||
}
|
||||
|
||||
html += '</fieldset>';
|
||||
|
@ -385,7 +385,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
function getItemsFunction(options) {
|
||||
function getQuery(options) {
|
||||
|
||||
var query = {
|
||||
|
||||
|
@ -407,6 +407,13 @@
|
|||
|
||||
addCurrentItemToQuery(query);
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
function getItemsFunction(options) {
|
||||
|
||||
var query = getQuery(options);
|
||||
|
||||
return function (index, limit, fields) {
|
||||
|
||||
query.StartIndex = index;
|
||||
|
@ -424,27 +431,10 @@
|
|||
Dashboard.showLoadingMsg();
|
||||
|
||||
_childrenItemsFunction = getItemsFunction(options);
|
||||
var query = {
|
||||
|
||||
SortBy: "SortName",
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "",
|
||||
Recursive: true,
|
||||
Fields: "AudioInfo,SeriesInfo,ParentId,PrimaryImageAspectRatio,SyncInfo",
|
||||
Limit: LibraryBrowser.getDefaultPageSize(),
|
||||
StartIndex: 0,
|
||||
CollapseBoxSetItems: false
|
||||
};
|
||||
var query = getQuery(options);
|
||||
|
||||
query = $.extend(query, options || {});
|
||||
|
||||
if (query.IncludeItemTypes == "Audio") {
|
||||
query.SortBy = "AlbumArtist,Album,SortName";
|
||||
}
|
||||
|
||||
addCurrentItemToQuery(query);
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), query).done(function (result) {
|
||||
getItemsFunction(options)(options.StartIndex, options.Limit, options.Fields).done(function (result) {
|
||||
|
||||
var html = '';
|
||||
|
||||
|
|
|
@ -630,6 +630,7 @@
|
|||
promise = ApiClient.getSimilarTrailers(item.Id, options);
|
||||
}
|
||||
else if (item.Type == "MusicAlbum") {
|
||||
options.limit = 4;
|
||||
promise = ApiClient.getSimilarAlbums(item.Id, options);
|
||||
}
|
||||
else if (item.Type == "Series") {
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
var html = '<div class="viewMenuBar ui-bar-b">';
|
||||
|
||||
if ($.browser.safari && $.browser.mobile && window.navigator.standalone) {
|
||||
html += '<a data-rel="back" data-role="none" href="#" class="headerButton headerButtonLeft headerBackButton"><div class="fa fa-arrow-circle-o-left"></div></a>';
|
||||
}
|
||||
|
||||
html += '<button type="button" data-role="none" title="Menu" class="headerButton dashboardMenuButton barsMenuButton headerButtonLeft">';
|
||||
html += '<div class="barMenuInner fa fa-bars">';
|
||||
html += '</div>';
|
||||
|
@ -68,9 +72,24 @@
|
|||
$('.viewMenuBar').trigger('create');
|
||||
|
||||
$(document).trigger('headercreated');
|
||||
bindMenuEvents();
|
||||
}
|
||||
|
||||
$('.libraryMenuButton').createHoverTouch().on('hovertouch', showLibraryMenu);
|
||||
$('.dashboardMenuButton').createHoverTouch().on('hovertouch', showDashboardMenu);
|
||||
function bindMenuEvents() {
|
||||
|
||||
if ($.browser.mobile) {
|
||||
|
||||
$('.libraryMenuButton').on('mousedown', function() {
|
||||
showLibraryMenu(false);
|
||||
});
|
||||
$('.dashboardMenuButton').on('mousedown', function () {
|
||||
showDashboardMenu(false);
|
||||
});
|
||||
|
||||
} else {
|
||||
$('.libraryMenuButton').createHoverTouch().on('hovertouch', showLibraryMenu);
|
||||
$('.dashboardMenuButton').createHoverTouch().on('hovertouch', showDashboardMenu);
|
||||
}
|
||||
}
|
||||
|
||||
function getItemHref(item, context) {
|
||||
|
|
|
@ -211,17 +211,19 @@
|
|||
var videoAudioAacConditions = [];
|
||||
var videoAudioMp3Conditions = [];
|
||||
|
||||
if ($.browser.msie) {
|
||||
var channelCondition = {
|
||||
Condition: 'LessThanEqual',
|
||||
Property: 'AudioChannels',
|
||||
Value: '2'
|
||||
};
|
||||
var maxAudioChannels = $.browser.msie || $.browser.safari ?
|
||||
'2' :
|
||||
'6';
|
||||
|
||||
audioConditions.push(channelCondition);
|
||||
videoAudioAacConditions.push(channelCondition);
|
||||
videoAudioMp3Conditions.push(channelCondition);
|
||||
}
|
||||
var channelCondition = {
|
||||
Condition: 'LessThanEqual',
|
||||
Property: 'AudioChannels',
|
||||
Value: maxAudioChannels
|
||||
};
|
||||
|
||||
audioConditions.push(channelCondition);
|
||||
videoAudioAacConditions.push(channelCondition);
|
||||
videoAudioMp3Conditions.push(channelCondition);
|
||||
|
||||
profile.CodecProfiles = [];
|
||||
profile.CodecProfiles.push({
|
||||
|
|
|
@ -1385,6 +1385,27 @@ var Dashboard = {
|
|||
|
||||
if (window.ApiClient) {
|
||||
Dashboard.importCss(ApiClient.getUrl('Branding/Css'));
|
||||
|
||||
ApiClient.getDefaultImageQuality = function (imageType) {
|
||||
|
||||
var quality = 90;
|
||||
var isBackdrop = imageType.toLowerCase() == 'backdrop';
|
||||
|
||||
if (isBackdrop) {
|
||||
quality -= 10;
|
||||
}
|
||||
|
||||
if ($.browser.safari && $.browser.mobile) {
|
||||
|
||||
quality -= 10;
|
||||
|
||||
if (isBackdrop) {
|
||||
quality -= 10;
|
||||
}
|
||||
}
|
||||
|
||||
return quality;
|
||||
};
|
||||
}
|
||||
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue