Update wording for enable seeking on media controls settings, remove restart required help text, map translations

This commit is contained in:
advplyr 2024-02-25 14:44:40 -06:00
parent 430d200151
commit f4f7252537
24 changed files with 36 additions and 27 deletions

View file

@ -107,7 +107,7 @@ data class PlayItemRequestPayload(
data class DeviceSettings(
var disableAutoRewind:Boolean,
var enableAltView:Boolean,
var allowSeekingOnWidget:Boolean,
var allowSeekingOnMediaControls:Boolean,
var jumpBackwardsTime:Int,
var jumpForwardTime:Int,
var enableMp3IndexSeeking:Boolean,
@ -131,7 +131,7 @@ data class DeviceSettings(
return DeviceSettings(
disableAutoRewind = false,
enableAltView = true,
allowSeekingOnWidget = false,
allowSeekingOnMediaControls = false,
jumpBackwardsTime = 10,
jumpForwardTime = 10,
enableMp3IndexSeeking = false,

View file

@ -512,7 +512,7 @@ class PlayerNotificationService : MediaBrowserServiceCompat() {
PlaybackStateCompat.ACTION_REWIND or
PlaybackStateCompat.ACTION_STOP
if (deviceSettings.allowSeekingOnWidget) {
if (deviceSettings.allowSeekingOnMediaControls) {
playbackActions = playbackActions or PlaybackStateCompat.ACTION_SEEK_TO
}
mediaSessionConnector.setEnabledPlaybackActions(playbackActions)

View file

@ -238,7 +238,7 @@ public class AbsDatabase: CAPPlugin {
@objc func updateDeviceSettings(_ call: CAPPluginCall) {
let disableAutoRewind = call.getBool("disableAutoRewind") ?? false
let enableAltView = call.getBool("enableAltView") ?? false
let allowSeekingOnWidget = call.getBool("allowSeekingOnWidget") ?? false
let allowSeekingOnMediaControls = call.getBool("allowSeekingOnMediaControls") ?? false
let jumpBackwardsTime = call.getInt("jumpBackwardsTime") ?? 10
let jumpForwardTime = call.getInt("jumpForwardTime") ?? 10
let lockOrientation = call.getString("lockOrientation") ?? "NONE"
@ -247,7 +247,7 @@ public class AbsDatabase: CAPPlugin {
let settings = DeviceSettings()
settings.disableAutoRewind = disableAutoRewind
settings.enableAltView = enableAltView
settings.allowSeekingOnWidget = allowSeekingOnWidget
settings.allowSeekingOnMediaControls = allowSeekingOnMediaControls
settings.jumpBackwardsTime = jumpBackwardsTime
settings.jumpForwardTime = jumpForwardTime
settings.lockOrientation = lockOrientation

View file

@ -11,7 +11,7 @@ import RealmSwift
class DeviceSettings: Object {
@Persisted var disableAutoRewind: Bool = false
@Persisted var enableAltView: Bool = true
@Persisted var allowSeekingOnWidget: Bool = false
@Persisted var allowSeekingOnMediaControls: Bool = false
@Persisted var jumpBackwardsTime: Int = 10
@Persisted var jumpForwardTime: Int = 10
@Persisted var lockOrientation: String = "NONE"
@ -27,7 +27,7 @@ func deviceSettingsToJSON(settings: DeviceSettings) -> Dictionary<String, Any> {
return [
"disableAutoRewind": settings.disableAutoRewind,
"enableAltView": settings.enableAltView,
"allowSeekingOnWidget": settings.allowSeekingOnWidget,
"allowSeekingOnMediaControls": settings.allowSeekingOnMediaControls,
"jumpBackwardsTime": settings.jumpBackwardsTime,
"jumpForwardTime": settings.jumpForwardTime,
"lockOrientation": settings.lockOrientation,

View file

@ -672,7 +672,7 @@ class AudioPlayer: NSObject {
return .success
}
commandCenter.changePlaybackPositionCommand.isEnabled = deviceSettings.allowSeekingOnWidget
commandCenter.changePlaybackPositionCommand.isEnabled = deviceSettings.allowSeekingOnMediaControls
commandCenter.changePlaybackPositionCommand.addTarget { [weak self] event in
guard let event = event as? MPChangePlaybackPositionCommandEvent else {
return .noSuchContent

View file

@ -62,11 +62,10 @@
<span class="material-icons-outlined ml-2" @click.stop="showConfirmMp3IndexSeeking">info</span>
</div>
<div class="flex items-center py-3">
<div class="w-10 flex justify-center" @click="toggleAllowSeekingOnWidget">
<ui-toggle-switch v-model="settings.allowSeekingOnWidget" @input="saveSettings" />
<div class="w-10 flex justify-center" @click="toggleAllowSeekingOnMediaControls">
<ui-toggle-switch v-model="settings.allowSeekingOnMediaControls" @input="saveSettings" />
</div>
<p class="pl-4">{{ $strings.LabelAllowSeekingOnWidget }}</p>
<span class="material-icons-outlined ml-2" @click.stop="showInfo('allowSeekingOnWidget')">info</span>
<p class="pl-4">{{ $strings.LabelAllowSeekingOnMediaControls }}</p>
</div>
<!-- Sleep timer settings -->
@ -161,7 +160,7 @@ export default {
settings: {
disableAutoRewind: false,
enableAltView: true,
allowSeekingOnWidget: false,
allowSeekingOnMediaControls: false,
jumpForwardTime: 10,
jumpBackwardsTime: 10,
enableMp3IndexSeeking: false,
@ -186,10 +185,6 @@ export default {
name: this.$strings.LabelDisableShakeToReset,
message: this.$strings.LabelDisableShakeToResetHelp
},
allowSeekingOnWidget: {
name: this.$strings.LabelAllowSeekingOnWidget,
message: this.$strings.LabelAllowSeekingOnWidgetHelp
},
autoSleepTimer: {
name: this.$strings.LabelAutoSleepTimer,
message: this.$strings.LabelAutoSleepTimerHelp
@ -441,8 +436,8 @@ export default {
this.settings.enableAltView = !this.settings.enableAltView
this.saveSettings()
},
toggleAllowSeekingOnWidget() {
this.settings.allowSeekingOnWidget = !this.settings.allowSeekingOnWidget
toggleAllowSeekingOnMediaControls() {
this.settings.allowSeekingOnMediaControls = !this.settings.allowSeekingOnMediaControls
this.saveSettings()
},
getCurrentOrientation() {
@ -487,7 +482,7 @@ export default {
const deviceSettings = this.deviceData.deviceSettings || {}
this.settings.disableAutoRewind = !!deviceSettings.disableAutoRewind
this.settings.enableAltView = !!deviceSettings.enableAltView
this.settings.allowSeekingOnWidget = !!deviceSettings.allowSeekingOnWidget
this.settings.allowSeekingOnMediaControls = !!deviceSettings.allowSeekingOnMediaControls
this.settings.jumpForwardTime = deviceSettings.jumpForwardTime || 10
this.settings.jumpBackwardsTime = deviceSettings.jumpBackwardsTime || 10
this.settings.enableMp3IndexSeeking = !!deviceSettings.enableMp3IndexSeeking

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Přidáno v",
"LabelAddToPlaylist": "Přidat do seznamu skladeb",
"LabelAll": "Vše",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Autor",
"LabelAuthorFirstLast": "Autor (jméno a příjmení)",
"LabelAuthorLastFirst": "Autor (příjmení a jméno)",
@ -289,4 +290,4 @@
"ToastPodcastCreateSuccess": "Podcast byl úspěšně vytvořen",
"ToastRSSFeedCloseFailed": "Nepodařilo se zavřít RSS kanál",
"ToastRSSFeedCloseSuccess": "RSS kanál uzavřen"
}
}

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Tilføjet Kl.",
"LabelAddToPlaylist": "Tilføj til Afspilningsliste",
"LabelAll": "Alle",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Forfatter",
"LabelAuthorFirstLast": "Forfatter (Fornavn Efternavn)",
"LabelAuthorLastFirst": "Forfatter (Efternavn, Fornavn)",

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Hinzugefügt am",
"LabelAddToPlaylist": "Zur Wiedergabeliste hinzufügen",
"LabelAll": "Alle",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Autor",
"LabelAuthorFirstLast": "Autor (Vorname Nachname)",
"LabelAuthorLastFirst": "Autor (Nachname, Vorname)",
@ -228,8 +229,6 @@
"LabelType": "Typ",
"LabelUnlockPlayer": "Mediaplayer entsperren",
"LabelUseBookshelfView": "Benutze Bücherregalansicht",
"LabelAllowSeekingOnWidget": "Erlaube Vor- oder Zurückspulen auf dem 'Jetzt Läuft' Widget",
"LabelAllowSeekingOnWidgetHelp": "Erst nach einem Neustart der App wird diese Einstellung wirksam.",
"LabelUser": "Benutzer",
"LabelUsername": "Benutzername",
"LabelVeryHigh": "Sehr hoch",

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Added At",
"LabelAddToPlaylist": "Add to Playlist",
"LabelAll": "All",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Author",
"LabelAuthorFirstLast": "Author (First Last)",
"LabelAuthorLastFirst": "Author (Last, First)",
@ -228,8 +229,6 @@
"LabelType": "Type",
"LabelUnlockPlayer": "Unlock Player",
"LabelUseBookshelfView": "Use bookshelf view",
"LabelAllowSeekingOnWidget": "Allow position seeking on the 'Now Playing' widget",
"LabelAllowSeekingOnWidgetHelp": "This setting will take effect ater a full app restart.",
"LabelUser": "User",
"LabelUsername": "Username",
"LabelVeryHigh": "Very High",

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Añadido",
"LabelAddToPlaylist": "Añadido a la Lista de Reproducción",
"LabelAll": "Todos",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Autor",
"LabelAuthorFirstLast": "Autor (Nombre Apellido)",
"LabelAuthorLastFirst": "Autor (Apellido, Nombre)",

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Date dajout",
"LabelAddToPlaylist": "Ajouter à la liste de lecture",
"LabelAll": "Tout",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Auteur",
"LabelAuthorFirstLast": "Auteur (Prénom Nom)",
"LabelAuthorLastFirst": "Auteur (Nom, Prénom)",

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Added At",
"LabelAddToPlaylist": "Add to Playlist",
"LabelAll": "All",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Author",
"LabelAuthorFirstLast": "Author (First Last)",
"LabelAuthorLastFirst": "Author (Last, First)",

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Added At",
"LabelAddToPlaylist": "Add to Playlist",
"LabelAll": "All",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Author",
"LabelAuthorFirstLast": "Author (First Last)",
"LabelAuthorLastFirst": "Author (Last, First)",

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Added At",
"LabelAddToPlaylist": "Add to Playlist",
"LabelAll": "All",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Autor",
"LabelAuthorFirstLast": "Author (First Last)",
"LabelAuthorLastFirst": "Author (Last, First)",

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Aggiunto il",
"LabelAddToPlaylist": "aggiungi alla Playlist",
"LabelAll": "Tutti",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Autore",
"LabelAuthorFirstLast": "Autore (Per Nome)",
"LabelAuthorLastFirst": "Autori (Per Cognome)",
@ -289,4 +290,4 @@
"ToastPodcastCreateSuccess": "Podcast creato Correttamente",
"ToastRSSFeedCloseFailed": "Errore chiusura RSS feed",
"ToastRSSFeedCloseSuccess": "RSS feed chiuso"
}
}

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Pridėta {0}",
"LabelAddToPlaylist": "Pridėti į grojaraštį",
"LabelAll": "Visi",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Autorius",
"LabelAuthorFirstLast": "Autorius (Vardas Pavardė)",
"LabelAuthorLastFirst": "Autorius (Pavardė, Vardas)",

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Toegevoegd op",
"LabelAddToPlaylist": "Toevoegen aan afspeellijst",
"LabelAll": "Alle",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Auteur",
"LabelAuthorFirstLast": "Auteur (Voornaam Achternaam)",
"LabelAuthorLastFirst": "Auteur (Achternaam, Voornaam)",

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Dato lagt til ",
"LabelAddToPlaylist": "Legg til i spilleliste",
"LabelAll": "Alle",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Forfatter",
"LabelAuthorFirstLast": "Forfatter (Fornavn Etternavn)",
"LabelAuthorLastFirst": "Forfatter (Etternavn Fornavn)",

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Dodano w",
"LabelAddToPlaylist": "Dodaj do playlisty",
"LabelAll": "Wszystkie",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Autor",
"LabelAuthorFirstLast": "Autor (Rosnąco)",
"LabelAuthorLastFirst": "Author (Malejąco)",

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Acrescentado Em",
"LabelAddToPlaylist": "Adicionar à Lista de Reprodução",
"LabelAll": "Todos",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Autor",
"LabelAuthorFirstLast": "Autor (Nome Sobrenome)",
"LabelAuthorLastFirst": "Autor (Sobrenome, Nome)",
@ -289,4 +290,4 @@
"ToastPodcastCreateSuccess": "Podcast criado",
"ToastRSSFeedCloseFailed": "Falha ao fechar feed RSS",
"ToastRSSFeedCloseSuccess": "Feed RSS fechado"
}
}

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Дата добавления",
"LabelAddToPlaylist": "Добавить в плейлист",
"LabelAll": "Все",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Автор",
"LabelAuthorFirstLast": "Автор (Имя Фамилия)",
"LabelAuthorLastFirst": "Автор (Фамилия, Имя)",

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "Tillagd vid",
"LabelAddToPlaylist": "Lägg till i Spellista",
"LabelAll": "Alla",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "Författare",
"LabelAuthorFirstLast": "Författare (Förnamn Efternamn)",
"LabelAuthorLastFirst": "Författare (Efternamn, Förnamn)",

View file

@ -85,6 +85,7 @@
"LabelAddedAt": "添加于",
"LabelAddToPlaylist": "添加到播放列表",
"LabelAll": "全部",
"LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls",
"LabelAuthor": "作者",
"LabelAuthorFirstLast": "作者 (姓 名)",
"LabelAuthorLastFirst": "作者 (名, 姓)",