From 3c8361d87cb0f64f4046280b1bec430fe7f50e52 Mon Sep 17 00:00:00 2001 From: dkanada Date: Thu, 16 May 2019 14:33:57 -0700 Subject: [PATCH] add missing string and reorder playback menu --- src/components/playback/playersettingsmenu.js | 25 ++++++------------- src/strings/en-us.json | 1 + 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/components/playback/playersettingsmenu.js b/src/components/playback/playersettingsmenu.js index 9d5b1f08ba..086f98c2d4 100644 --- a/src/components/playback/playersettingsmenu.js +++ b/src/components/playback/playersettingsmenu.js @@ -136,8 +136,7 @@ define(['connectionManager', 'actionsheet', 'datetime', 'playbackManager', 'glob } function showAspectRatioMenu(player, btn) { - - // Each has name/id + // each has a name and id var currentId = playbackManager.getAspectRatio(player); var menuItems = playbackManager.getSupportedAspectRatios(player).map(function (i) { return { @@ -148,12 +147,9 @@ define(['connectionManager', 'actionsheet', 'datetime', 'playbackManager', 'glob }); return actionsheet.show({ - items: menuItems, positionTo: btn - }).then(function (id) { - if (id) { playbackManager.setAspectRatio(id, player); return Promise.resolve(); @@ -164,15 +160,11 @@ define(['connectionManager', 'actionsheet', 'datetime', 'playbackManager', 'glob } function showWithUser(options, player, user) { - var supportedCommands = playbackManager.getSupportedCommands(player); - var mediaType = options.mediaType; var menuItems = []; - if (supportedCommands.indexOf('SetAspectRatio') !== -1) { - var currentAspectRatioId = playbackManager.getAspectRatio(player); var currentAspectRatio = playbackManager.getSupportedAspectRatios(player).filter(function (i) { return i.id === currentAspectRatioId; @@ -205,19 +197,18 @@ define(['connectionManager', 'actionsheet', 'datetime', 'playbackManager', 'glob }); } - if (options.stats) { + if (options.suboffset) { menuItems.push({ - name: globalize.translate('PlaybackData'), - id: 'stats', + name: globalize.translate('SubtitleOffset'), + id: 'suboffset', asideText: null }); } - if (options.suboffset) { - + if (options.stats) { menuItems.push({ - name: globalize.translate('SubtitleOffset'), - id: 'suboffset', + name: globalize.translate('PlaybackData'), + id: 'stats', asideText: null }); } @@ -272,4 +263,4 @@ define(['connectionManager', 'actionsheet', 'datetime', 'playbackManager', 'glob return { show: show }; -}); \ No newline at end of file +}); diff --git a/src/strings/en-us.json b/src/strings/en-us.json index cb8b735624..a3b5d427ff 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -1310,6 +1310,7 @@ "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).", "SubtitleDownloadersHelp": "Enable and rank your preferred subtitle downloaders in order of priority.", + "SubtitleOffset": "Subtitle Offset", "Subtitles": "Subtitles", "Suggestions": "Suggestions", "Sunday": "Sunday",