Force the use of single quotes
This commit is contained in:
parent
8b6dc05d64
commit
9e3ca706c4
217 changed files with 8541 additions and 8540 deletions
|
@ -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')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue