1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

subtitle profile fixes

This commit is contained in:
Luke Pulverenti 2015-02-02 13:14:02 -05:00
parent 51d5633ccf
commit 0eb55addaa
2 changed files with 41 additions and 8 deletions

View file

@ -2,7 +2,7 @@
var currentItem; var currentItem;
var shape; var shape;
var currentItemsQuery; var _childrenItemsFunction;
function getPromise() { function getPromise() {
@ -385,9 +385,7 @@
} }
} }
function loadItems(page, options) { function getItemsFunction(options) {
Dashboard.showLoadingMsg();
var query = { var query = {
@ -409,7 +407,42 @@
addCurrentItemToQuery(query); addCurrentItemToQuery(query);
currentItemsQuery = query; return function (index, limit, fields) {
query.StartIndex = index;
query.Limit = limit;
query.Fields = fields;
return ApiClient.getItems(Dashboard.getCurrentUserId(), query);
};
}
function loadItems(page, options) {
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
};
query = $.extend(query, options || {});
if (query.IncludeItemTypes == "Audio") {
query.SortBy = "AlbumArtist,Album,SortName";
}
addCurrentItemToQuery(query);
ApiClient.getItems(Dashboard.getCurrentUserId(), query).done(function (result) { ApiClient.getItems(Dashboard.getCurrentUserId(), query).done(function (result) {
@ -523,11 +556,11 @@
$('.itemsContainer', page).on('playallfromhere', function (e, index) { $('.itemsContainer', page).on('playallfromhere', function (e, index) {
LibraryBrowser.playAllFromHere(currentItemsQuery, index); LibraryBrowser.playAllFromHere(_childrenItemsFunction, index);
}).on('queueallfromhere', function (e, index) { }).on('queueallfromhere', function (e, index) {
LibraryBrowser.queueAllFromHere(currentItemsQuery, index); LibraryBrowser.queueAllFromHere(_childrenItemsFunction, index);
}); });

View file

@ -367,7 +367,7 @@
var canPlayDirect = self.canPlayVideoDirect(mediaSource, videoStream, audioStream, subtitleStream, maxWidth, bitrate); var canPlayDirect = self.canPlayVideoDirect(mediaSource, videoStream, audioStream, subtitleStream, maxWidth, bitrate);
var audioBitrate = bitrate >= 700000 ? 128000 : 64000; var audioBitrate = bitrate >= 700000 ? 192000 : 64000;
var videoBitrate = bitrate - audioBitrate; var videoBitrate = bitrate - audioBitrate;