Skip to content

Commit

Permalink
Merge pull request #1237 from TortugaPower/multiple-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GianniCarlo authored Jan 4, 2025
2 parents 346a373 + 942c151 commit 40e6533
Show file tree
Hide file tree
Showing 63 changed files with 129 additions and 810 deletions.
64 changes: 4 additions & 60 deletions BookPlayer.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions BookPlayer/Base.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@ We're working hard on providing a seamless experience, if possible, please conta
"jellyfin_error_unauthorized" = "Sign In failed. Check your username and password.";
"file_size_unknown" = "Unknown size";
"runtime_unknown" = "Unknown duration";
"subscription_required_title" = "Subscription required";
"Swipe rows to see download options" = "Swipe rows to see download options";
6 changes: 5 additions & 1 deletion BookPlayer/Services/VoiceOverService.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import BookPlayerKit
#if os(watchOS)
import BookPlayerWatchKit
#else
import BookPlayerKit
#endif
import Foundation

class VoiceOverService {
Expand Down
2 changes: 2 additions & 0 deletions BookPlayer/ar.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "فشل تسجيل الدخول. تحقق من اسم المستخدم وكلمة المرور.";
"file_size_unknown" = "حجم غير معروف";
"runtime_unknown" = "مدة غير معروفة";
"subscription_required_title" = "الاشتراك مطلوب";
"Swipe rows to see download options" = "مرر الصفوف لرؤية خيارات التنزيل";
2 changes: 2 additions & 0 deletions BookPlayer/cs.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Přihlášení se nezdařilo. Zkontrolujte své uživatelské jméno a heslo.";
"file_size_unknown" = "Neznámá velikost";
"runtime_unknown" = "Neznámá doba trvání";
"subscription_required_title" = "Je vyžadováno předplatné";
"Swipe rows to see download options" = "Přejetím po řádcích zobrazíte možnosti stahování";
2 changes: 2 additions & 0 deletions BookPlayer/da.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Log ind mislykkedes. Tjek dit brugernavn og adgangskode.";
"file_size_unknown" = "Ukendt størrelse";
"runtime_unknown" = "Ukendt varighed";
"subscription_required_title" = "Kræver abonnement";
"Swipe rows to see download options" = "Stryg rækkerne for at se downloadmuligheder";
2 changes: 2 additions & 0 deletions BookPlayer/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Anmeldung fehlgeschlagen. Überprüfen Sie Ihren Benutzernamen und Ihr Passwort.";
"file_size_unknown" = "Unbekannte Größe";
"runtime_unknown" = "Unbekannte Dauer";
"subscription_required_title" = "Abonnement erforderlich";
"Swipe rows to see download options" = "Wischen Sie durch die Zeilen, um die Download-Optionen anzuzeigen";
2 changes: 2 additions & 0 deletions BookPlayer/el.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Η σύνδεση απέτυχε. Ελέγξτε το όνομα χρήστη και τον κωδικό πρόσβασής σας.";
"file_size_unknown" = "Άγνωστο μέγεθος";
"runtime_unknown" = "Άγνωστη διάρκεια";
"subscription_required_title" = "Απαιτείται συνδρομή";
"Swipe rows to see download options" = "Σύρετε σειρές για να δείτε τις επιλογές λήψης";
2 changes: 2 additions & 0 deletions BookPlayer/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@ We're working hard on providing a seamless experience, if possible, please conta
"jellyfin_error_unauthorized" = "Sign In failed. Check your username and password.";
"file_size_unknown" = "Unknown size";
"runtime_unknown" = "Unknown duration";
"subscription_required_title" = "Subscription required";
"Swipe rows to see download options" = "Swipe rows to see download options";
2 changes: 2 additions & 0 deletions BookPlayer/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Error al iniciar sesión. Verifique su nombre de usuario y contraseña.";
"file_size_unknown" = "Tamaño desconocido";
"runtime_unknown" = "Duración desconocida";
"subscription_required_title" = "Se requiere suscripción";
"Swipe rows to see download options" = "Desliza las filas para ver las opciones de descarga";
2 changes: 2 additions & 0 deletions BookPlayer/fi.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Kirjautuminen epäonnistui. Tarkista käyttäjätunnuksesi ja salasanasi.";
"file_size_unknown" = "Tuntematon koko";
"runtime_unknown" = "Tuntematon kesto";
"subscription_required_title" = "Tilaus vaaditaan";
"Swipe rows to see download options" = "Pyyhkäise rivejä nähdäksesi latausvaihtoehdot";
2 changes: 2 additions & 0 deletions BookPlayer/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "La connexion a échoué. Vérifiez votre nom d'utilisateur et votre mot de passe.";
"file_size_unknown" = "Taille inconnue";
"runtime_unknown" = "Durée inconnue";
"subscription_required_title" = "Abonnement requis";
"Swipe rows to see download options" = "Faites glisser les lignes pour voir les options de téléchargement";
2 changes: 2 additions & 0 deletions BookPlayer/hu.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Sikertelen bejelentkezés. Ellenőrizze felhasználónevét és jelszavát.";
"file_size_unknown" = "Ismeretlen méret";
"runtime_unknown" = "Ismeretlen időtartam";
"subscription_required_title" = "Előfizetés szükséges";
"Swipe rows to see download options" = "Csúsztassa el a sorokat a letöltési lehetőségek megtekintéséhez";
2 changes: 2 additions & 0 deletions BookPlayer/it.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Accesso non riuscito. Controlla il tuo nome utente e la tua password.";
"file_size_unknown" = "Dimensioni sconosciute";
"runtime_unknown" = "Durata sconosciuta";
"subscription_required_title" = "Abbonamento richiesto";
"Swipe rows to see download options" = "Scorri le righe per vedere le opzioni di download";
2 changes: 2 additions & 0 deletions BookPlayer/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@ We're working hard on providing a seamless experience, if possible, please conta
"jellyfin_error_unauthorized" = "Sign In failed. Check your username and password.";
"file_size_unknown" = "Unknown size";
"runtime_unknown" = "Unknown duration";
"subscription_required_title" = "Subscription required";
"Swipe rows to see download options" = "Swipe rows to see download options";
2 changes: 2 additions & 0 deletions BookPlayer/nb.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@ Vi jobber hardt for å gi deg en sømløs opplevelse. Hvis mulig, kontakt oss p
"jellyfin_error_unauthorized" = "Pålogging mislyktes. Sjekk brukernavnet og passordet ditt.";
"file_size_unknown" = "Ukjent størrelse";
"runtime_unknown" = "Ukjent varighet";
"subscription_required_title" = "Abonnement kreves";
"Swipe rows to see download options" = "Sveip rader for å se nedlastingsalternativer";
2 changes: 2 additions & 0 deletions BookPlayer/nl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Aanmelden mislukt. Controleer uw gebruikersnaam en wachtwoord.";
"file_size_unknown" = "Onbekende grootte";
"runtime_unknown" = "Onbekende duur";
"subscription_required_title" = "Abonnement vereist";
"Swipe rows to see download options" = "Veeg over de rijen om de downloadopties te zien";
2 changes: 2 additions & 0 deletions BookPlayer/pl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Logowanie nie powiodło się. Sprawdź swoją nazwę użytkownika i hasło.";
"file_size_unknown" = "Nieznany rozmiar";
"runtime_unknown" = "Nieznany czas trwania";
"subscription_required_title" = "Wymagana subskrypcja";
"Swipe rows to see download options" = "Przesuń wiersze, aby zobaczyć opcje pobierania";
2 changes: 2 additions & 0 deletions BookPlayer/pt-BR.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Falha ao entrar. Verifique seu nome de usuário e senha.";
"file_size_unknown" = "Tamanho desconhecido";
"runtime_unknown" = "Duração desconhecida";
"subscription_required_title" = "Assinatura necessária";
"Swipe rows to see download options" = "Deslize as linhas para ver as opções de download";
2 changes: 2 additions & 0 deletions BookPlayer/pt-PT.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Falha ao entrar. Verifique seu nome de usuário e senha.";
"file_size_unknown" = "Tamanho desconhecido";
"runtime_unknown" = "Duração desconhecida";
"subscription_required_title" = "Assinatura necessária";
"Swipe rows to see download options" = "Deslize as linhas para ver as opções de download";
2 changes: 2 additions & 0 deletions BookPlayer/ro.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Conectarea a eșuat. Verificați-vă numele de utilizator și parola.";
"file_size_unknown" = "Dimensiune necunoscută";
"runtime_unknown" = "Durată necunoscută";
"subscription_required_title" = "Este necesar un abonament";
"Swipe rows to see download options" = "Glisați rândurile pentru a vedea opțiunile de descărcare";
2 changes: 2 additions & 0 deletions BookPlayer/ru.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Войти не удалось. Проверьте имя пользователя и пароль.";
"file_size_unknown" = "Неизвестный размер";
"runtime_unknown" = "Неизвестная продолжительность";
"subscription_required_title" = "Требуется подписка";
"Swipe rows to see download options" = "Проведите пальцем по строкам, чтобы увидеть варианты загрузки";
16 changes: 9 additions & 7 deletions BookPlayer/sk-SK.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ Usilovne pracujeme na poskytovaní bezproblémového zážitku, ak je to možné
"intent_sleeptimer_eoc_title" = "Nastavenie časovača spánku na koniec kapitoly";
"intent_lastbook_play_title" = "Obnovenie poslednej prehrávanej knihy";
"intent_lastbook_empty_error" = "Žiadna naposledy prehrávaná kniha";
"intent_playback_pause_title" = "Pozastavenie prehrávanie";
"intent_playback_pause_title" = "Pozastavenie prehrávania";
"storage_artwork_cache_title" = "Veľkosť vyrovnávacej pamäte obalov kníh";
"settings_share_debug_information" = "Zdieľať informácie o ladení";
"settings_autlock_section_title" = "Automatické uzamknutie";
Expand Down Expand Up @@ -329,18 +329,20 @@ Usilovne pracujeme na poskytovaní bezproblémového zážitku, ak je to možné
"jellyfin_section_server_url" = "Adresa URL servera";
"jellyfin_section_server_url_footer" = "Pripojte sa k serveru Jellyfin";
"jellyfin_section_server" = "Server";
"jellyfin_server_name_label" = "Meno";
"jellyfin_server_name_label" = "Názov";
"jellyfin_server_url_label" = "URL";
"jellyfin_section_login" = "Prihláste sa";
"jellyfin_section_login" = "Prihlásenie";
"jellyfin_username_placeholder" = "Používateľské meno";
"jellyfin_password_placeholder" = "heslo";
"jellyfin_password_remember_me_label" = "Pamätaj na mňa";
"jellyfin_password_placeholder" = "Heslo";
"jellyfin_password_remember_me_label" = "Zapamätať si mňa";
"settings_jellyfin_manage_connection_title" = "Spravovať pripojenie";
"jellyfin_internal_error_invalid_url" = "Interná chyba: Adresa URL požiadavky je neplatná: %@";
"jellyfin_internal_error_invalid_url" = "Interná chyba: URL požiadavky je neplatná: %@";
"jellyfin_internal_error_build_url" = "Interná chyba: Nepodarilo sa vytvoriť adresu URL požiadavky";
"jellyfin_internal_error_no_client" = "Nie je možné kontaktovať server Jellyfin. Skontrolujte poskytnutú adresu URL servera.";
"jellyfin_internal_error_no_client" = "Nie je možné kontaktovať server Jellyfin. Skontrolujte poskytnutú adresu URL.";
"jellyfin_error_unexpected_response" = "Neočakávaná odpoveď servera";
"jellyfin_error_unexpected_response_with_code" = "Neočakávaná odpoveď servera (kód: %d – %@ )";
"jellyfin_error_unauthorized" = "Prihlásenie zlyhalo. Skontrolujte svoje používateľské meno a heslo.";
"file_size_unknown" = "Neznáma veľkosť";
"runtime_unknown" = "Neznáme trvanie";
"subscription_required_title" = "Vyžaduje sa predplatné";
"Swipe rows to see download options" = "Potiahnutím riadkov zobrazíte možnosti sťahovania";
2 changes: 2 additions & 0 deletions BookPlayer/sv.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Inloggning misslyckades. Kontrollera ditt användarnamn och lösenord.";
"file_size_unknown" = "Okänd storlek";
"runtime_unknown" = "Okänd varaktighet";
"subscription_required_title" = "Prenumeration krävs";
"Swipe rows to see download options" = "Svep rader för att se nedladdningsalternativ";
2 changes: 2 additions & 0 deletions BookPlayer/tr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Giriş başarısız. Kullanıcı adınızı ve şifrenizi kontrol edin.";
"file_size_unknown" = "Bilinmeyen boyut";
"runtime_unknown" = "Bilinmeyen süre";
"subscription_required_title" = "Abonelik gerekli";
"Swipe rows to see download options" = "İndirme seçeneklerini görmek için satırları kaydırın";
2 changes: 2 additions & 0 deletions BookPlayer/uk.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "Помилка входу. Перевірте своє ім'я користувача та пароль.";
"file_size_unknown" = "Невідомий розмір";
"runtime_unknown" = "Невідома тривалість";
"subscription_required_title" = "Потрібна підписка";
"Swipe rows to see download options" = "Гортайте рядки, щоб переглянути параметри завантаження";
2 changes: 2 additions & 0 deletions BookPlayer/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,5 @@
"jellyfin_error_unauthorized" = "登录失败。请检查您的用户名和密码。";
"file_size_unknown" = "未知尺寸";
"runtime_unknown" = "持续时间未知";
"subscription_required_title" = "需要订阅";
"Swipe rows to see download options" = "滑动行查看下载选项";
29 changes: 0 additions & 29 deletions BookPlayerWatch/Base.lproj/Localizable.strings

This file was deleted.

5 changes: 5 additions & 0 deletions BookPlayerWatch/NowPlaying/Views/NowPlayingTitleView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,10 @@ struct NowPlayingTitleView: View {
.lineLimit(2)
.fixedSize(horizontal: false, vertical: true)
}
.accessibilityElement(children: .ignore)
.accessibilityLabel(VoiceOverService.playerMetaText(
title: item?.title ?? "",
author: item?.author ?? ""
))
}
}
20 changes: 13 additions & 7 deletions BookPlayerWatch/PlaybackFullControlsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ import SwiftUI

struct PlaybackFullControlsView: View {
@ObservedObject var model: PlaybackFullControlsViewModel
@AppStorage(Constants.UserDefaults.globalSpeedEnabled) var globalSpeedEnabled: Bool = false
@AppStorage(Constants.UserDefaults.boostVolumeEnabled) var boostVolumeEnabled: Bool = false
@AppStorage(Constants.UserDefaults.autoplayEnabled) var autoplayEnabled: Bool = true
@AppStorage(Constants.UserDefaults.rewindInterval) var rewindInterval: TimeInterval = 30
@AppStorage(Constants.UserDefaults.forwardInterval) var forwardInterval: TimeInterval = 30

var body: some View {
GeometryReader { metrics in
List {
Section("speed".localized.uppercased()) {
Section("speed_title".localized.uppercased()) {
VStack {
HStack {
Spacer()
Expand All @@ -28,6 +30,7 @@ struct PlaybackFullControlsView: View {
ResizeableImageView(name: "minus.circle")
}
.buttonStyle(PlainButtonStyle())
.accessibilityLabel("")
.frame(width: metrics.size.width * 0.15)
Spacer()
.padding([.leading], 5)
Expand All @@ -51,6 +54,7 @@ struct PlaybackFullControlsView: View {
ResizeableImageView(name: "plus.circle")
}
.buttonStyle(PlainButtonStyle())
.accessibilityLabel("")
.frame(width: metrics.size.width * 0.15)
Spacer()
}
Expand All @@ -59,14 +63,13 @@ struct PlaybackFullControlsView: View {
.listRowBackground(Color.clear)

Section {
Toggle(
"settings_globalspeed_title",
isOn: $globalSpeedEnabled
)
Toggle(
"settings_boostvolume_title",
isOn: .init(
get: { model.boostVolume },
set: { _ in
model.handleBoostVolumeToggle()
}
)
isOn: $boostVolumeEnabled
)
Toggle(
"settings_autoplay_section_title".localized.capitalized,
Expand Down Expand Up @@ -99,6 +102,9 @@ struct PlaybackFullControlsView: View {
}
}
.environment(\.defaultMinListRowHeight, 40)
.onChange(of: boostVolumeEnabled) { boostVolume in
model.handleBoostVolumeToggle(boostVolume)
}
}
.navigationTitle("settings_controls_title")
}
Expand Down
2 changes: 2 additions & 0 deletions BookPlayerWatch/PlayerControlsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ struct PlayerControlsView: View {
.padding(10)
}
.buttonStyle(PlainButtonStyle())
.accessibilityLabel(VoiceOverService.rewindText())
.frame(width: geometry.size.width * 0.28)
Spacer()
Button {
Expand All @@ -54,6 +55,7 @@ struct PlayerControlsView: View {
.padding(10)
}
.buttonStyle(PlainButtonStyle())
.accessibilityLabel(VoiceOverService.fastForwardText())
.frame(width: geometry.size.width * 0.28)
Spacer()
}
Expand Down
8 changes: 4 additions & 4 deletions BookPlayerWatch/PlayerToolbarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ final class PlaybackFullControlsViewModel: ObservableObject {
self.playerManager = playerManager
}

func handleBoostVolumeToggle() {
let flag = !boostVolume
UserDefaults.standard.set(flag, forKey: Constants.UserDefaults.boostVolumeEnabled)

func handleBoostVolumeToggle(_ flag: Bool) {
self.playerManager.setBoostVolume(flag)
}

Expand Down Expand Up @@ -67,20 +64,23 @@ struct PlayerToolbarView: View {
destination: PlaybackFullControlsView(model: PlaybackFullControlsViewModel(playerManager: playerManager))
) {
ResizeableImageView(name: "dial.max")
.accessibilityLabel("settings_controls_title".localized)
.padding(11)
}
.buttonStyle(PlainButtonStyle())

Spacer()

VolumeView(type: .local)
.accessibilityHidden(true)

Spacer()

Button {
isShowingMoreList = true
} label: {
ResizeableImageView(name: "list.bullet")
.accessibilityLabel("chapters_title".localized)
.padding(14)
}
.buttonStyle(PlainButtonStyle())
Expand Down
11 changes: 9 additions & 2 deletions BookPlayerWatch/RefreshableListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct RefreshableListView<Content: View>: View {
List {
Section {
if refreshing {
ProgressView()
ProgressView().id(UUID())
.tint(.white)
.frame(height: 10)
.listRowBackground(Color.clear)
Expand All @@ -44,6 +44,11 @@ struct RefreshableListView<Content: View>: View {
}
}
.listRowBackground(Color.clear)
.accessibilityRemoveTraits(.isImage)
.accessibilityLabel("watchapp_refresh_data_title".localized)
.accessibilityAction {
self.refreshing = true
}
}
}
content
Expand All @@ -52,7 +57,9 @@ struct RefreshableListView<Content: View>: View {
.environment(\.defaultMinListRowHeight, 1)
.background(FixedView())
.onPreferenceChange(RefreshableKeyTypes.PrefKey.self) { values in
refreshLogic(values: values)
Task { @MainActor in
refreshLogic(values: values)
}
}
}

Expand Down
Loading

0 comments on commit 40e6533

Please sign in to comment.