add missing string and reorder playback menu

This commit is contained in:
dkanada 2019-05-16 14:33:57 -07:00
parent 0f075fe6c4
commit 3c8361d87c
2 changed files with 9 additions and 17 deletions

View File

@ -136,8 +136,7 @@ define(['connectionManager', 'actionsheet', 'datetime', 'playbackManager', 'glob
} }
function showAspectRatioMenu(player, btn) { function showAspectRatioMenu(player, btn) {
// each has a name and id
// Each has name/id
var currentId = playbackManager.getAspectRatio(player); var currentId = playbackManager.getAspectRatio(player);
var menuItems = playbackManager.getSupportedAspectRatios(player).map(function (i) { var menuItems = playbackManager.getSupportedAspectRatios(player).map(function (i) {
return { return {
@ -148,12 +147,9 @@ define(['connectionManager', 'actionsheet', 'datetime', 'playbackManager', 'glob
}); });
return actionsheet.show({ return actionsheet.show({
items: menuItems, items: menuItems,
positionTo: btn positionTo: btn
}).then(function (id) { }).then(function (id) {
if (id) { if (id) {
playbackManager.setAspectRatio(id, player); playbackManager.setAspectRatio(id, player);
return Promise.resolve(); return Promise.resolve();
@ -164,15 +160,11 @@ define(['connectionManager', 'actionsheet', 'datetime', 'playbackManager', 'glob
} }
function showWithUser(options, player, user) { function showWithUser(options, player, user) {
var supportedCommands = playbackManager.getSupportedCommands(player); var supportedCommands = playbackManager.getSupportedCommands(player);
var mediaType = options.mediaType; var mediaType = options.mediaType;
var menuItems = []; var menuItems = [];
if (supportedCommands.indexOf('SetAspectRatio') !== -1) { if (supportedCommands.indexOf('SetAspectRatio') !== -1) {
var currentAspectRatioId = playbackManager.getAspectRatio(player); var currentAspectRatioId = playbackManager.getAspectRatio(player);
var currentAspectRatio = playbackManager.getSupportedAspectRatios(player).filter(function (i) { var currentAspectRatio = playbackManager.getSupportedAspectRatios(player).filter(function (i) {
return i.id === currentAspectRatioId; return i.id === currentAspectRatioId;
@ -205,19 +197,18 @@ define(['connectionManager', 'actionsheet', 'datetime', 'playbackManager', 'glob
}); });
} }
if (options.stats) { if (options.suboffset) {
menuItems.push({ menuItems.push({
name: globalize.translate('PlaybackData'), name: globalize.translate('SubtitleOffset'),
id: 'stats', id: 'suboffset',
asideText: null asideText: null
}); });
} }
if (options.suboffset) { if (options.stats) {
menuItems.push({ menuItems.push({
name: globalize.translate('SubtitleOffset'), name: globalize.translate('PlaybackData'),
id: 'suboffset', id: 'stats',
asideText: null asideText: null
}); });
} }

View File

@ -1310,6 +1310,7 @@
"SubtitleAppearanceSettingsAlsoPassedToCastDevices": "These settings also apply to any Chromecast playback started by this device.", "SubtitleAppearanceSettingsAlsoPassedToCastDevices": "These settings also apply to any Chromecast playback started by this device.",
"SubtitleAppearanceSettingsDisclaimer": "These settings will not apply to graphical subtitles (PGS, DVD, etc), or subtitles that have their own styles embedded (ASS/SSA).", "SubtitleAppearanceSettingsDisclaimer": "These settings will not apply to graphical subtitles (PGS, DVD, etc), or subtitles that have their own styles embedded (ASS/SSA).",
"SubtitleDownloadersHelp": "Enable and rank your preferred subtitle downloaders in order of priority.", "SubtitleDownloadersHelp": "Enable and rank your preferred subtitle downloaders in order of priority.",
"SubtitleOffset": "Subtitle Offset",
"Subtitles": "Subtitles", "Subtitles": "Subtitles",
"Suggestions": "Suggestions", "Suggestions": "Suggestions",
"Sunday": "Sunday", "Sunday": "Sunday",