diff --git a/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/AudioOutputPolicy.kt b/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/AudioOutputPolicy.kt index 5f480ff6..799aed75 100644 --- a/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/AudioOutputPolicy.kt +++ b/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/AudioOutputPolicy.kt @@ -14,6 +14,4 @@ internal fun isPassthroughAudioMimeType(mimeType: String): Boolean = when (mimeT else -> false } -internal fun shouldBlockDirectOutputForPassthrough(mimeType: String, audioPassthroughEnabled: Boolean): Boolean { - return !audioPassthroughEnabled && isPassthroughAudioMimeType(mimeType) -} +internal fun shouldBlockDirectOutputForPassthrough(mimeType: String, audioPassthroughEnabled: Boolean): Boolean = !audioPassthroughEnabled && isPassthroughAudioMimeType(mimeType) diff --git a/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/ExoPlayerPlugin.kt b/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/ExoPlayerPlugin.kt index fd5b930d..c35c19c8 100644 --- a/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/ExoPlayerPlugin.kt +++ b/android/app/src/main/kotlin/com/edde746/plezy/exoplayer/ExoPlayerPlugin.kt @@ -717,9 +717,7 @@ class ExoPlayerPlugin : * Queries relevant MPV properties and returns them in a map format * compatible with the performance overlay. */ - private fun getMpvStats(): Map { - return mpvCore?.getStats() ?: mapOf("playerType" to "mpv") - } + private fun getMpvStats(): Map = mpvCore?.getStats() ?: mapOf("playerType" to "mpv") // PiP Mode handling @@ -796,9 +794,7 @@ class ExoPlayerPlugin : options.add("sub-files=%${pathList.toByteArray(Charsets.UTF_8).size}%$pathList") } - private fun escapeMpvPathListEntry(value: String): String { - return value.replace("\\", "\\\\").replace(":", "\\:") - } + private fun escapeMpvPathListEntry(value: String): String = value.replace("\\", "\\\\").replace(":", "\\:") /** * Configure a freshly initialized MPV fallback core: replay the properties diff --git a/lib/main.dart b/lib/main.dart index 4c1f007d..cadc49ce 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -960,50 +960,48 @@ class _AppShell extends StatelessWidget { child: Builder( builder: (context) { return Listener( - onPointerDown: (event) { - if ((event.buttons & kBackMouseButton) != 0) { - rootNavigatorKey.currentState?.maybePop(); - } + onPointerDown: (event) { + if ((event.buttons & kBackMouseButton) != 0) { + rootNavigatorKey.currentState?.maybePop(); + } + }, + behavior: HitTestBehavior.translucent, + child: InputModeTracker( + child: MaterialApp( + title: t.app.title, + debugShowCheckedModeBanner: false, + theme: themeProvider.lightTheme, + darkTheme: themeProvider.darkTheme, + themeMode: themeProvider.materialThemeMode, + navigatorKey: rootNavigatorKey, + navigatorObservers: [routeObserver, BackKeySuppressorObserver()], + home: const OrientationAwareSetup(), + // Siri Remote select + gamepad A report as + // LogicalKeyboardKey.{select,gameButtonA} which aren't + // in Flutter's default shortcut set — Material-level + // widgets (menu items, showModalBottomSheet actions) + // ignore them. Map both to ActivateIntent so tapping + // select on tvOS activates the focused widget. + shortcuts: { + ...WidgetsApp.defaultShortcuts, + const SingleActivator(LogicalKeyboardKey.select): const ActivateIntent(), + const SingleActivator(LogicalKeyboardKey.gameButtonA): const ActivateIntent(), + const SingleActivator(LogicalKeyboardKey.goBack): const DismissIntent(), + const SingleActivator(LogicalKeyboardKey.browserBack): const DismissIntent(), + const SingleActivator(LogicalKeyboardKey.gameButtonB): const DismissIntent(), }, - behavior: HitTestBehavior.translucent, - child: InputModeTracker( - child: MaterialApp( - title: t.app.title, - debugShowCheckedModeBanner: false, - theme: themeProvider.lightTheme, - darkTheme: themeProvider.darkTheme, - themeMode: themeProvider.materialThemeMode, - navigatorKey: rootNavigatorKey, - navigatorObservers: [routeObserver, BackKeySuppressorObserver()], - home: const OrientationAwareSetup(), - // Siri Remote select + gamepad A report as - // LogicalKeyboardKey.{select,gameButtonA} which aren't - // in Flutter's default shortcut set — Material-level - // widgets (menu items, showModalBottomSheet actions) - // ignore them. Map both to ActivateIntent so tapping - // select on tvOS activates the focused widget. - shortcuts: { - ...WidgetsApp.defaultShortcuts, - const SingleActivator(LogicalKeyboardKey.select): const ActivateIntent(), - const SingleActivator(LogicalKeyboardKey.gameButtonA): const ActivateIntent(), - const SingleActivator(LogicalKeyboardKey.goBack): const DismissIntent(), - const SingleActivator(LogicalKeyboardKey.browserBack): const DismissIntent(), - const SingleActivator(LogicalKeyboardKey.gameButtonB): const DismissIntent(), - }, - builder: (context, child) => ScaffoldMessenger( - key: rootScaffoldMessengerKey, - child: Scaffold( - backgroundColor: Colors.transparent, - body: _AppleTvScale(child: child), - ), - ), + builder: (context, child) => ScaffoldMessenger( + key: rootScaffoldMessengerKey, + child: Scaffold( + backgroundColor: Colors.transparent, + body: _AppleTvScale(child: child), ), ), - ); - }, - ), - ); - }, + ), + ), + ); + }, + ), ); }, ); diff --git a/lib/screens/profile/profile_detail_screen.dart b/lib/screens/profile/profile_detail_screen.dart index 34db2be8..d8647c23 100644 --- a/lib/screens/profile/profile_detail_screen.dart +++ b/lib/screens/profile/profile_detail_screen.dart @@ -140,7 +140,7 @@ class _ProfileDetailScreenState extends State with Controll serverManager: context.read().serverManager, ); if (!mounted) return; - await Provider.maybeOf(context, listen: false)?.refresh(); + await context.read()?.refresh(); if (!mounted) return; unawaited(context.read().rebindIfActive(_profile.id)); } diff --git a/lib/services/jellyfin_client/parts/browse.dart b/lib/services/jellyfin_client/parts/browse.dart index 9ad2b99b..ff677f61 100644 --- a/lib/services/jellyfin_client/parts/browse.dart +++ b/lib/services/jellyfin_client/parts/browse.dart @@ -658,7 +658,6 @@ mixin _JellyfinBrowseMethods on MediaServerCacheMixin { return _pagedMediaItems(response.data, offset: offset, requestedSize: pageSize); } - @override Future> fetchSeasonEpisodesPage( String seriesId, String seasonId, {