mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge remote-tracking branch 'upstream/master' into media-session
This commit is contained in:
commit
a31455f2af
314 changed files with 10147 additions and 9191 deletions
|
@ -11,7 +11,7 @@ define(['events', 'playbackManager', 'dom', 'browser', 'css!./iconosd', 'materia
|
|||
function getOsdElementHtml() {
|
||||
var html = '';
|
||||
|
||||
html += '<i class="material-icons iconOsdIcon brightness_high"></i>';
|
||||
html += '<span class="material-icons iconOsdIcon brightness_high"></span>';
|
||||
|
||||
html += '<div class="iconOsdProgressOuter"><div class="iconOsdProgressInner brightnessOsdProgressInner"></div></div>';
|
||||
|
||||
|
@ -32,7 +32,7 @@ define(['events', 'playbackManager', 'dom', 'browser', 'css!./iconosd', 'materia
|
|||
elem.classList.add('brightnessOsd');
|
||||
elem.innerHTML = getOsdElementHtml();
|
||||
|
||||
iconElement = elem.querySelector('i');
|
||||
iconElement = elem.querySelector('.material-icons');
|
||||
progressElement = elem.querySelector('.iconOsdProgressInner');
|
||||
|
||||
document.body.appendChild(elem);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(['connectionManager', 'globalize', 'userSettings', 'apphost'], function (connectionManager, globalize, userSettings, appHost) {
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
function getRequirePromise(deps) {
|
||||
|
||||
|
@ -44,15 +44,15 @@ define(['connectionManager', 'globalize', 'userSettings', 'apphost'], function (
|
|||
}
|
||||
|
||||
function showBlurayMessage() {
|
||||
return showMessage(globalize.translate("UnsupportedPlayback"), 'blurayexpirementalinfo', 'nativeblurayplayback');
|
||||
return showMessage(globalize.translate('UnsupportedPlayback'), 'blurayexpirementalinfo', 'nativeblurayplayback');
|
||||
}
|
||||
|
||||
function showDvdMessage() {
|
||||
return showMessage(globalize.translate("UnsupportedPlayback"), 'dvdexpirementalinfo', 'nativedvdplayback');
|
||||
return showMessage(globalize.translate('UnsupportedPlayback'), 'dvdexpirementalinfo', 'nativedvdplayback');
|
||||
}
|
||||
|
||||
function showIsoMessage() {
|
||||
return showMessage(globalize.translate("UnsupportedPlayback"), 'isoexpirementalinfo', 'nativeisoplayback');
|
||||
return showMessage(globalize.translate('UnsupportedPlayback'), 'isoexpirementalinfo', 'nativeisoplayback');
|
||||
}
|
||||
|
||||
function ExpirementalPlaybackWarnings() {
|
||||
|
|
|
@ -18,10 +18,10 @@ define([], function () {
|
|||
|
||||
if (nowPlayingItem.MediaType === 'Video') {
|
||||
if (nowPlayingItem.IndexNumber != null) {
|
||||
topText = nowPlayingItem.IndexNumber + " - " + topText;
|
||||
topText = nowPlayingItem.IndexNumber + ' - ' + topText;
|
||||
}
|
||||
if (nowPlayingItem.ParentIndexNumber != null) {
|
||||
topText = nowPlayingItem.ParentIndexNumber + "." + topText;
|
||||
topText = nowPlayingItem.ParentIndexNumber + '.' + topText;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(['connectionManager', 'globalize'], function (connectionManager, globalize) {
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
function getRequirePromise(deps) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
|
|
@ -128,8 +128,8 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
} else {
|
||||
|
||||
query.Limit = query.Limit || 300;
|
||||
query.Fields = "Chapters";
|
||||
query.ExcludeLocationTypes = "Virtual";
|
||||
query.Fields = 'Chapters';
|
||||
query.ExcludeLocationTypes = 'Virtual';
|
||||
query.EnableTotalRecordCount = false;
|
||||
query.CollapseBoxSetItems = false;
|
||||
|
||||
|
@ -164,7 +164,7 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
function backdropImageUrl(apiClient, item, options) {
|
||||
|
||||
options = options || {};
|
||||
options.type = options.type || "Backdrop";
|
||||
options.type = options.type || 'Backdrop';
|
||||
|
||||
// If not resizing, get the original image
|
||||
if (!options.maxWidth && !options.width && !options.maxHeight && !options.height) {
|
||||
|
@ -221,15 +221,15 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
}
|
||||
|
||||
function getParam(name, url) {
|
||||
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
|
||||
var regexS = "[\\?&]" + name + "=([^&#]*)";
|
||||
var regex = new RegExp(regexS, "i");
|
||||
name = name.replace(/[\[]/, '\\\[').replace(/[\]]/, '\\\]');
|
||||
var regexS = '[\\?&]' + name + '=([^&#]*)';
|
||||
var regex = new RegExp(regexS, 'i');
|
||||
|
||||
var results = regex.exec(url);
|
||||
if (results == null) {
|
||||
return "";
|
||||
return '';
|
||||
} else {
|
||||
return decodeURIComponent(results[1].replace(/\+/g, " "));
|
||||
return decodeURIComponent(results[1].replace(/\+/g, ' '));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -616,8 +616,8 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
url: apiClient.getUrl('LiveStreams/Open', query),
|
||||
type: 'POST',
|
||||
data: JSON.stringify(postData),
|
||||
contentType: "application/json",
|
||||
dataType: "json"
|
||||
contentType: 'application/json',
|
||||
dataType: 'json'
|
||||
|
||||
});
|
||||
}
|
||||
|
@ -1129,17 +1129,17 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
|
||||
var itemType = item.Type;
|
||||
|
||||
if (itemType === "PhotoAlbum" || itemType === "MusicGenre" || itemType === "Season" || itemType === "Series" || itemType === "BoxSet" || itemType === "MusicAlbum" || itemType === "MusicArtist" || itemType === "Playlist") {
|
||||
if (itemType === 'PhotoAlbum' || itemType === 'MusicGenre' || itemType === 'Season' || itemType === 'Series' || itemType === 'BoxSet' || itemType === 'MusicAlbum' || itemType === 'MusicArtist' || itemType === 'Playlist') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (item.LocationType === "Virtual") {
|
||||
if (itemType !== "Program") {
|
||||
if (item.LocationType === 'Virtual') {
|
||||
if (itemType !== 'Program') {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (itemType === "Program") {
|
||||
if (itemType === 'Program') {
|
||||
|
||||
if (!item.EndDate || !item.StartDate) {
|
||||
return false;
|
||||
|
@ -1877,36 +1877,36 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
|
||||
var queryOptions = options.queryOptions || {};
|
||||
|
||||
if (firstItem.Type === "Program") {
|
||||
if (firstItem.Type === 'Program') {
|
||||
|
||||
promise = getItemsForPlayback(serverId, {
|
||||
Ids: firstItem.ChannelId
|
||||
});
|
||||
} else if (firstItem.Type === "Playlist") {
|
||||
} else if (firstItem.Type === 'Playlist') {
|
||||
|
||||
promise = getItemsForPlayback(serverId, {
|
||||
ParentId: firstItem.Id,
|
||||
SortBy: options.shuffle ? 'Random' : null
|
||||
});
|
||||
} else if (firstItem.Type === "MusicArtist") {
|
||||
} else if (firstItem.Type === 'MusicArtist') {
|
||||
|
||||
promise = getItemsForPlayback(serverId, {
|
||||
ArtistIds: firstItem.Id,
|
||||
Filters: "IsNotFolder",
|
||||
Filters: 'IsNotFolder',
|
||||
Recursive: true,
|
||||
SortBy: options.shuffle ? 'Random' : 'SortName',
|
||||
MediaTypes: "Audio"
|
||||
MediaTypes: 'Audio'
|
||||
});
|
||||
|
||||
} else if (firstItem.MediaType === "Photo") {
|
||||
} else if (firstItem.MediaType === 'Photo') {
|
||||
|
||||
promise = getItemsForPlayback(serverId, {
|
||||
ParentId: firstItem.ParentId,
|
||||
Filters: "IsNotFolder",
|
||||
Filters: 'IsNotFolder',
|
||||
// Setting this to true may cause some incorrect sorting
|
||||
Recursive: false,
|
||||
SortBy: options.shuffle ? 'Random' : 'SortName',
|
||||
MediaTypes: "Photo,Video",
|
||||
MediaTypes: 'Photo,Video',
|
||||
Limit: 500
|
||||
|
||||
}).then(function (result) {
|
||||
|
@ -1927,40 +1927,40 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
return Promise.resolve(result);
|
||||
|
||||
});
|
||||
} else if (firstItem.Type === "PhotoAlbum") {
|
||||
} else if (firstItem.Type === 'PhotoAlbum') {
|
||||
|
||||
promise = getItemsForPlayback(serverId, {
|
||||
ParentId: firstItem.Id,
|
||||
Filters: "IsNotFolder",
|
||||
Filters: 'IsNotFolder',
|
||||
// Setting this to true may cause some incorrect sorting
|
||||
Recursive: false,
|
||||
SortBy: options.shuffle ? 'Random' : 'SortName',
|
||||
MediaTypes: "Photo,Video",
|
||||
MediaTypes: 'Photo,Video',
|
||||
Limit: 1000
|
||||
|
||||
});
|
||||
} else if (firstItem.Type === "MusicGenre") {
|
||||
} else if (firstItem.Type === 'MusicGenre') {
|
||||
|
||||
promise = getItemsForPlayback(serverId, {
|
||||
GenreIds: firstItem.Id,
|
||||
Filters: "IsNotFolder",
|
||||
Filters: 'IsNotFolder',
|
||||
Recursive: true,
|
||||
SortBy: options.shuffle ? 'Random' : 'SortName',
|
||||
MediaTypes: "Audio"
|
||||
MediaTypes: 'Audio'
|
||||
});
|
||||
} else if (firstItem.IsFolder) {
|
||||
|
||||
promise = getItemsForPlayback(serverId, mergePlaybackQueries({
|
||||
|
||||
ParentId: firstItem.Id,
|
||||
Filters: "IsNotFolder",
|
||||
Filters: 'IsNotFolder',
|
||||
Recursive: true,
|
||||
// These are pre-sorted
|
||||
SortBy: options.shuffle ? 'Random' : (['BoxSet'].indexOf(firstItem.Type) === -1 ? 'SortName' : null),
|
||||
MediaTypes: "Audio,Video"
|
||||
MediaTypes: 'Audio,Video'
|
||||
|
||||
}, queryOptions));
|
||||
} else if (firstItem.Type === "Episode" && items.length === 1 && getPlayer(firstItem, options).supportsProgress !== false) {
|
||||
} else if (firstItem.Type === 'Episode' && items.length === 1 && getPlayer(firstItem, options).supportsProgress !== false) {
|
||||
|
||||
promise = new Promise(function (resolve, reject) {
|
||||
var apiClient = connectionManager.getApiClient(firstItem.ServerId);
|
||||
|
@ -1976,7 +1976,7 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
IsVirtualUnaired: false,
|
||||
IsMissing: false,
|
||||
UserId: apiClient.getCurrentUserId(),
|
||||
Fields: "Chapters"
|
||||
Fields: 'Chapters'
|
||||
|
||||
}).then(function (episodesResult) {
|
||||
|
||||
|
@ -2213,7 +2213,7 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
return Promise.reject();
|
||||
}
|
||||
|
||||
if (firstItem.MediaType === "Photo") {
|
||||
if (firstItem.MediaType === 'Photo') {
|
||||
|
||||
return playPhotos(items, options, user);
|
||||
}
|
||||
|
@ -3851,23 +3851,23 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
|
||||
if (player.isLocalPlayer) {
|
||||
var list = [
|
||||
"GoHome",
|
||||
"GoToSettings",
|
||||
"VolumeUp",
|
||||
"VolumeDown",
|
||||
"Mute",
|
||||
"Unmute",
|
||||
"ToggleMute",
|
||||
"SetVolume",
|
||||
"SetAudioStreamIndex",
|
||||
"SetSubtitleStreamIndex",
|
||||
"SetMaxStreamingBitrate",
|
||||
"DisplayContent",
|
||||
"GoToSearch",
|
||||
"DisplayMessage",
|
||||
"SetRepeatMode",
|
||||
"PlayMediaSource",
|
||||
"PlayTrailers"
|
||||
'GoHome',
|
||||
'GoToSettings',
|
||||
'VolumeUp',
|
||||
'VolumeDown',
|
||||
'Mute',
|
||||
'Unmute',
|
||||
'ToggleMute',
|
||||
'SetVolume',
|
||||
'SetAudioStreamIndex',
|
||||
'SetSubtitleStreamIndex',
|
||||
'SetMaxStreamingBitrate',
|
||||
'DisplayContent',
|
||||
'GoToSearch',
|
||||
'DisplayMessage',
|
||||
'SetRepeatMode',
|
||||
'PlayMediaSource',
|
||||
'PlayTrailers'
|
||||
];
|
||||
|
||||
if (apphost.supports('fullscreenchange')) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(['playbackManager', 'layoutManager', 'events'], function (playbackManager, layoutManager, events) {
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
var orientationLocked;
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ define(['appSettings', 'events', 'browser', 'loading', 'playbackManager', 'appRo
|
|||
var name = t.name;
|
||||
|
||||
if (t.appName && t.appName !== t.name) {
|
||||
name += " - " + t.appName;
|
||||
name += ' - ' + t.appName;
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
@ -4,7 +4,7 @@ define(['connectionManager', 'actionsheet', 'datetime', 'playbackManager', 'glob
|
|||
function showQualityMenu(player, btn) {
|
||||
|
||||
var videoStream = playbackManager.currentMediaSource(player).MediaStreams.filter(function (stream) {
|
||||
return stream.Type === "Video";
|
||||
return stream.Type === 'Video';
|
||||
})[0];
|
||||
var videoWidth = videoStream ? videoStream.Width : null;
|
||||
|
||||
|
@ -87,7 +87,7 @@ define(['connectionManager', 'actionsheet', 'datetime', 'playbackManager', 'glob
|
|||
var currentMaxBitrate = playbackManager.getMaxStreamingBitrate(player);
|
||||
|
||||
var videoStream = playbackManager.currentMediaSource(player).MediaStreams.filter(function (stream) {
|
||||
return stream.Type === "Video";
|
||||
return stream.Type === 'Video';
|
||||
})[0];
|
||||
|
||||
var videoWidth = videoStream ? videoStream.Width : null;
|
||||
|
|
|
@ -6,7 +6,7 @@ define([], function () {
|
|||
|
||||
if (!item.PlaylistItemId) {
|
||||
|
||||
item.PlaylistItemId = "playlistItem" + currentId;
|
||||
item.PlaylistItemId = 'playlistItem' + currentId;
|
||||
currentId++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ define(['events', 'playbackManager', 'dom', 'browser', 'css!./iconosd', 'materia
|
|||
function getOsdElementHtml() {
|
||||
var html = '';
|
||||
|
||||
html += '<i class="material-icons iconOsdIcon"></i>';
|
||||
html += '<span class="material-icons iconOsdIcon volume_up"></span>';
|
||||
|
||||
html += '<div class="iconOsdProgressOuter"><div class="iconOsdProgressInner"></div></div>';
|
||||
|
||||
|
@ -32,7 +32,7 @@ define(['events', 'playbackManager', 'dom', 'browser', 'css!./iconosd', 'materia
|
|||
elem.classList.add('volumeOsd');
|
||||
elem.innerHTML = getOsdElementHtml();
|
||||
|
||||
iconElement = elem.querySelector('i');
|
||||
iconElement = elem.querySelector('.material-icons');
|
||||
progressElement = elem.querySelector('.iconOsdProgressInner');
|
||||
|
||||
document.body.appendChild(elem);
|
||||
|
@ -101,7 +101,8 @@ define(['events', 'playbackManager', 'dom', 'browser', 'css!./iconosd', 'materia
|
|||
function updatePlayerVolumeState(isMuted, volume) {
|
||||
|
||||
if (iconElement) {
|
||||
iconElement.innerHTML = isMuted ? '' : '';
|
||||
iconElement.classList.remove('volume_off', 'volume_up');
|
||||
iconElement.classList.add(isMuted ? 'volume_off' : 'volume_up');
|
||||
}
|
||||
if (progressElement) {
|
||||
progressElement.style.width = (volume || 0) + '%';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue