mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update program titles
This commit is contained in:
parent
e0479fc18d
commit
60f00b55e9
6 changed files with 61 additions and 86 deletions
|
@ -13,7 +13,7 @@ define(['apphost'], function (appHost) {
|
|||
item = item.ProgramInfo || item;
|
||||
}
|
||||
|
||||
var name = ((item.Type === 'Program' || item.Type === 'Recording') && item.IsSeries ? item.EpisodeTitle : item.Name) || '';
|
||||
var name = ((item.Type === 'Program' || item.Type === 'Recording') && (item.IsSeries || item.EpisodeTitle) ? item.EpisodeTitle : item.Name) || '';
|
||||
|
||||
if (item.Type === "TvChannel") {
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', '
|
|||
});
|
||||
}
|
||||
|
||||
if (item.IsSeries && item.EpisodeTitle && options.episodeTitle !== false) {
|
||||
if ((item.IsSeries || item.EpisodeTitle) && options.episodeTitle !== false) {
|
||||
miscInfo.push(itemHelper.getDisplayName(item));
|
||||
}
|
||||
|
||||
|
|
|
@ -1780,7 +1780,7 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
|
|||
var contentType;
|
||||
var transcodingOffsetTicks = 0;
|
||||
var playerStartPositionTicks = startPosition;
|
||||
var liveStreamId;
|
||||
var liveStreamId = mediaSource.LiveStreamId;
|
||||
|
||||
var playMethod = 'Transcode';
|
||||
|
||||
|
@ -1813,7 +1813,6 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
|
|||
|
||||
if (mediaSource.LiveStreamId) {
|
||||
directOptions.LiveStreamId = mediaSource.LiveStreamId;
|
||||
liveStreamId = mediaSource.LiveStreamId;
|
||||
}
|
||||
|
||||
mediaUrl = apiClient.getUrl('Videos/' + item.Id + '/stream.' + mediaSourceContainer, directOptions);
|
||||
|
@ -1868,7 +1867,6 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
|
|||
|
||||
if (mediaSource.LiveStreamId) {
|
||||
directOptions.LiveStreamId = mediaSource.LiveStreamId;
|
||||
liveStreamId = mediaSource.LiveStreamId;
|
||||
}
|
||||
|
||||
mediaUrl = apiClient.getUrl('Audio/' + item.Id + '/stream.' + mediaSourceContainer, directOptions);
|
||||
|
|
|
@ -114,6 +114,21 @@ define(['appStorage', 'browser'], function (appStorage, browser) {
|
|||
element.msRequestFullscreen;
|
||||
}
|
||||
|
||||
function getSyncProfile() {
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
require(['browserdeviceprofile', 'qualityoptions', 'appSettings'], function (profileBuilder, qualityoptions, appSettings) {
|
||||
|
||||
var profile = profileBuilder();
|
||||
|
||||
profile.MaxStaticMusicBitrate = appSettings.maxStaticMusicBitrate();
|
||||
|
||||
resolve(profile);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
var supportedFeatures = function () {
|
||||
|
||||
var features = [
|
||||
|
@ -225,6 +240,7 @@ define(['appStorage', 'browser'], function (appStorage, browser) {
|
|||
},
|
||||
capabilities: getCapabilities,
|
||||
preferVisualCards: browser.android || browser.chrome,
|
||||
moreIcon: browser.safari || browser.edge ? 'dots-horiz' : 'dots-vert'
|
||||
moreIcon: browser.safari || browser.edge ? 'dots-horiz' : 'dots-vert',
|
||||
getSyncProfile: getSyncProfile
|
||||
};
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
define(['cardBuilder', 'apphost', 'imageLoader', 'emby-itemscontainer'], function (cardBuilder, appHost, imageLoader) {
|
||||
define(['cardBuilder', 'apphost', 'imageLoader', 'libraryBrowser', 'emby-itemscontainer'], function (cardBuilder, appHost, imageLoader, libraryBrowser) {
|
||||
'use strict';
|
||||
|
||||
return function (view, params) {
|
||||
|
@ -7,7 +7,8 @@
|
|||
var query = {
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
StartIndex: 0,
|
||||
Fields: "ChannelInfo"
|
||||
Fields: "ChannelInfo",
|
||||
Limit: libraryBrowser.getDefaultPageSize()
|
||||
};
|
||||
|
||||
if (params.type == 'Recordings') {
|
||||
|
@ -27,7 +28,7 @@
|
|||
}
|
||||
|
||||
function getSavedQueryKey() {
|
||||
return LibraryBrowser.getSavedQueryKey();
|
||||
return libraryBrowser.getSavedQueryKey();
|
||||
}
|
||||
|
||||
function reloadItems(page) {
|
||||
|
@ -48,7 +49,7 @@
|
|||
window.scrollTo(0, 0);
|
||||
|
||||
var html = '';
|
||||
var pagingHtml = LibraryBrowser.getQueryPagingHtml({
|
||||
var pagingHtml = libraryBrowser.getQueryPagingHtml({
|
||||
startIndex: query.StartIndex,
|
||||
limit: query.Limit,
|
||||
totalRecordCount: result.TotalRecordCount,
|
||||
|
@ -109,7 +110,7 @@
|
|||
elems[i].addEventListener('click', onPreviousPageClick);
|
||||
}
|
||||
|
||||
LibraryBrowser.saveQueryValues(getSavedQueryKey(), query);
|
||||
libraryBrowser.saveQueryValues(getSavedQueryKey(), query);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
|
@ -178,7 +179,7 @@
|
|||
|
||||
var viewkey = getSavedQueryKey();
|
||||
|
||||
LibraryBrowser.loadSavedQueryValues(viewkey, query);
|
||||
libraryBrowser.loadSavedQueryValues(viewkey, query);
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
|
|
@ -648,43 +648,6 @@ var Dashboard = {
|
|||
}
|
||||
options.quality = quality;
|
||||
}
|
||||
},
|
||||
|
||||
getDeviceProfile: function (maxHeight, profileOptions) {
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
require(['browserdeviceprofile', 'qualityoptions', 'appSettings'], function (profileBuilder, qualityoptions, appSettings) {
|
||||
|
||||
var profile = profileBuilder(Object.assign(profileOptions || {}, {
|
||||
}));
|
||||
|
||||
if (!(AppInfo.isNativeApp && browserInfo.android) && !browserInfo.edge && !browserInfo.msie) {
|
||||
// libjass not working here
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'ass',
|
||||
Method: 'External'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'ssa',
|
||||
Method: 'External'
|
||||
});
|
||||
}
|
||||
|
||||
var bitrateSetting = appSettings.maxStreamingBitrate();
|
||||
|
||||
if (!maxHeight) {
|
||||
maxHeight = qualityoptions.getVideoQualityOptions(bitrateSetting).filter(function (q) {
|
||||
return q.selected;
|
||||
})[0].maxHeight;
|
||||
}
|
||||
|
||||
profile.MaxStreamingBitrate = bitrateSetting;
|
||||
profile.MaxStaticMusicBitrate = appSettings.maxStaticMusicBitrate();
|
||||
|
||||
resolve(profile);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -753,11 +716,6 @@ var AppInfo = {};
|
|||
Events.on(apiClient, 'requestfail', Dashboard.onRequestFail);
|
||||
}
|
||||
|
||||
function getSyncProfile() {
|
||||
|
||||
return Dashboard.getDeviceProfile(Math.max(screen.height, screen.width));
|
||||
}
|
||||
|
||||
function onApiClientCreated(e, newApiClient) {
|
||||
initializeApiClient(newApiClient);
|
||||
|
||||
|
@ -814,8 +772,6 @@ var AppInfo = {};
|
|||
//localStorage.clear();
|
||||
function createConnectionManager() {
|
||||
|
||||
return getSyncProfile().then(function (deviceProfile) {
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
require(['connectionManagerFactory', 'apphost', 'credentialprovider', 'events', 'userSettings'], function (connectionManagerExports, apphost, credentialProvider, events, userSettings) {
|
||||
|
@ -824,7 +780,12 @@ var AppInfo = {};
|
|||
|
||||
var credentialProviderInstance = new credentialProvider();
|
||||
|
||||
apphost.appInfo().then(function (appInfo) {
|
||||
var promises = [apphost.getSyncProfile(), apphost.appInfo()];
|
||||
|
||||
Promise.all(promises).then(function (responses) {
|
||||
|
||||
var deviceProfile = responses[0];
|
||||
var appInfo = responses[1];
|
||||
|
||||
var capabilities = Dashboard.capabilities();
|
||||
capabilities.DeviceProfile = deviceProfile;
|
||||
|
@ -859,7 +820,6 @@ var AppInfo = {};
|
|||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function setDocumentClasses(browser) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue