diff --git a/lib/connection/connection_registry.dart b/lib/connection/connection_registry.dart index 9fcf2cf9..59749acc 100644 --- a/lib/connection/connection_registry.dart +++ b/lib/connection/connection_registry.dart @@ -118,13 +118,6 @@ class ConnectionRegistry { return all.whereType().toList(); } - /// All Jellyfin connections in insertion order. Symmetric helper to - /// [listPlexAccounts]. - Future> listJellyfin() async { - final all = await list(); - return all.whereType().toList(); - } - /// Lookup a [PlexAccountConnection] by id. Returns `null` if no row /// matches OR the row exists but isn't a Plex account. Future getPlexAccount(String id) async { @@ -132,13 +125,6 @@ class ConnectionRegistry { return c is PlexAccountConnection ? c : null; } - /// Lookup a [JellyfinConnection] by id. Returns `null` if no row matches - /// OR the row exists but isn't a Jellyfin connection. - Future getJellyfin(String id) async { - final c = await get(id); - return c is JellyfinConnection ? c : null; - } - Future _rowToConnection(ConnectionRow row) async { try { final json = jsonDecode(row.configJson) as Map; diff --git a/lib/media/media_library.dart b/lib/media/media_library.dart index 683b58a3..9bfe3c84 100644 --- a/lib/media/media_library.dart +++ b/lib/media/media_library.dart @@ -47,32 +47,4 @@ class MediaLibrary { }); String get globalKey => serverId != null ? buildGlobalKey(ServerId(serverId!), id) : id; - - MediaLibrary copyWith({ - String? id, - MediaBackend? backend, - String? title, - MediaKind? kind, - String? language, - int? updatedAt, - int? createdAt, - bool? hidden, - bool? isShared, - String? serverId, - String? serverName, - }) { - return MediaLibrary( - id: id ?? this.id, - backend: backend ?? this.backend, - title: title ?? this.title, - kind: kind ?? this.kind, - language: language ?? this.language, - updatedAt: updatedAt ?? this.updatedAt, - createdAt: createdAt ?? this.createdAt, - hidden: hidden ?? this.hidden, - isShared: isShared ?? this.isShared, - serverId: serverId ?? this.serverId, - serverName: serverName ?? this.serverName, - ); - } } diff --git a/lib/mixins/controller_disposer_mixin.dart b/lib/mixins/controller_disposer_mixin.dart index a0784c68..53ee8d2b 100644 --- a/lib/mixins/controller_disposer_mixin.dart +++ b/lib/mixins/controller_disposer_mixin.dart @@ -12,11 +12,6 @@ mixin ControllerDisposerMixin on State { return controller; } - TextEditingController registerTextEditingController(TextEditingController controller) { - _textEditingControllers.add(controller); - return controller; - } - @override void dispose() { for (final controller in _textEditingControllers.reversed) { diff --git a/lib/models/audio_quality_preset.dart b/lib/models/audio_quality_preset.dart index b9f76c54..c95e569b 100644 --- a/lib/models/audio_quality_preset.dart +++ b/lib/models/audio_quality_preset.dart @@ -28,8 +28,4 @@ enum AudioQualityPreset { } return AudioQualityPreset.original; } - - /// Order shared by every picker surface: [original] first, then capped - /// presets highest-bitrate first. - static final List displayOrder = List.unmodifiable(values); } diff --git a/lib/models/external_player_models.dart b/lib/models/external_player_models.dart index e439ab34..5d87667b 100644 --- a/lib/models/external_player_models.dart +++ b/lib/models/external_player_models.dart @@ -1,4 +1,3 @@ -import 'dart:convert'; import 'dart:io'; import 'package:url_launcher/url_launcher.dart'; @@ -66,11 +65,6 @@ class ExternalPlayer { if (customType != null) 'customType': customType == CustomPlayerType.urlScheme ? 'urlScheme' : 'command', }; - String toJsonString() => json.encode(toJson()); - - static ExternalPlayer fromJsonString(String jsonString) => - ExternalPlayer.fromJson(json.decode(jsonString) as Map); - @override bool operator ==(Object other) => identical(this, other) || other is ExternalPlayer && runtimeType == other.runtimeType && id == other.id; diff --git a/lib/mpv/font_loader.dart b/lib/mpv/font_loader.dart index 11f9948f..333cd2b7 100644 --- a/lib/mpv/font_loader.dart +++ b/lib/mpv/font_loader.dart @@ -45,6 +45,4 @@ class SubtitleFontLoader { } static String get fontName => _fontName; - - static String get fontAssetPath => _fontAssetPath; } diff --git a/lib/mpv/models.dart b/lib/mpv/models.dart index 5e940e80..219072b6 100644 --- a/lib/mpv/models.dart +++ b/lib/mpv/models.dart @@ -47,12 +47,6 @@ sealed class AudioTrack with _$AudioTrack { static const off = AudioTrack(id: 'no', title: 'Off'); int? get channelsCount => channels; - - String get displayName { - if (title != null && title!.isNotEmpty) return title!; - if (language != null && language!.isNotEmpty) return language!; - return 'Track $id'; - } } @freezed @@ -91,13 +85,6 @@ sealed class SubtitleTrack with _$SubtitleTrack { static const auto = SubtitleTrack(id: 'auto', title: 'Auto'); static const off = SubtitleTrack(id: 'no', title: 'Off'); - - String get displayName { - if (title != null && title!.isNotEmpty) return title!; - if (language != null && language!.isNotEmpty) return language!; - if (isExternal) return 'External'; - return 'Track $id'; - } } @Freezed(toStringOverride: false) diff --git a/lib/services/jellyfin_api_cache.dart b/lib/services/jellyfin_api_cache.dart index 06483e57..999bd611 100644 --- a/lib/services/jellyfin_api_cache.dart +++ b/lib/services/jellyfin_api_cache.dart @@ -73,8 +73,6 @@ class JellyfinApiCache extends ApiCache { /// [ApiCache.isPinned]'s identical Dart signature. Future isPinnedItemId(ServerId serverId, String itemId) => hasPinnedMatching(_itemPattern(serverId, itemId)); - Future> getPinnedItemIds(ServerId serverId) => extractPinnedIds(serverId, _itemKeyPattern); - /// Fetch and parse a [MediaItem] from cache. /// /// Returns `null` when no matching row is cached, the row's JSON is diff --git a/lib/services/plex_mappers.dart b/lib/services/plex_mappers.dart index c882ea85..8d59ba6c 100644 --- a/lib/services/plex_mappers.dart +++ b/lib/services/plex_mappers.dart @@ -777,8 +777,6 @@ class PlexMetadataDto { String get globalKey => serverId != null ? buildGlobalKey(ServerId(serverId!), ratingKey) : ratingKey; - bool get isLibrarySection => key != null && key!.startsWith('/library/sections/'); - bool get isUnmatched => guid == null || guid!.isEmpty || guid!.contains(_unmatchedAgentMarker); /// Top-level scalar fields surface as a plain Plex JSON map. Used by the diff --git a/lib/services/shader_asset_loader.dart b/lib/services/shader_asset_loader.dart index b81e26c9..b4747dbb 100644 --- a/lib/services/shader_asset_loader.dart +++ b/lib/services/shader_asset_loader.dart @@ -257,24 +257,6 @@ class ShaderAssetLoader { } } - /// Pre-extract all shader files to the cache. - /// Call this at startup to avoid extraction delay during playback. - static Future preloadShaders() async { - try { - await _extractShader(_nvscalerShader); - - for (final shaderPath in _artcnnShaders.values) { - await _extractShader(shaderPath); - } - - for (final shaderPath in _anime4kShaders.values) { - await _extractShader(shaderPath); - } - } catch (e, st) { - appLogger.w('Failed to preload shaders', error: e, stackTrace: st); - } - } - /// Clear cached shader directory reference. /// Call when clearing app cache. static void clearCache() { diff --git a/lib/services/update_service.dart b/lib/services/update_service.dart index c797d771..de429237 100644 --- a/lib/services/update_service.dart +++ b/lib/services/update_service.dart @@ -109,11 +109,6 @@ class UpdateService { return prefs.getString(_keySkippedVersion); } - static Future clearSkippedVersion() async { - final prefs = await BaseSharedPreferencesService.sharedCache(); - await prefs.remove(_keySkippedVersion); - } - /// Check if cooldown period has passed since last check static Future shouldCheckForUpdates() async { final prefs = await BaseSharedPreferencesService.sharedCache(); diff --git a/lib/utils/media_image_helper.dart b/lib/utils/media_image_helper.dart index fdc68134..28644354 100644 --- a/lib/utils/media_image_helper.dart +++ b/lib/utils/media_image_helper.dart @@ -275,15 +275,6 @@ class MediaImageHelper { return true; } - /// Optimized URL for hero/background art ([ImageType.art]). - static String heroArtUrl({ - required MediaServerClient? client, - required String? thumbPath, - required BuildContext context, - required double containerWidth, - required double containerHeight, - }) => _typedUrl(client, thumbPath, context, containerWidth, containerHeight, ImageType.art); - /// Optimized URL for clear-logo overlays ([ImageType.logo]). static String logoUrl({ required MediaServerClient? client, diff --git a/lib/utils/media_server_http_client.dart b/lib/utils/media_server_http_client.dart index 7a9c6d84..bb160d8d 100644 --- a/lib/utils/media_server_http_client.dart +++ b/lib/utils/media_server_http_client.dart @@ -249,9 +249,6 @@ class MediaServerHttpClient { } } - /// Send a streamed request (for image cache etc). - Future sendStreamed(http.BaseRequest request) => _client.send(request); - void close() { _closing = true; _abortActiveRequests(); diff --git a/lib/widgets/settings_builder.dart b/lib/widgets/settings_builder.dart index 8a66aea8..fa7353e9 100644 --- a/lib/widgets/settings_builder.dart +++ b/lib/widgets/settings_builder.dart @@ -9,7 +9,6 @@ import '../services/settings_service.dart'; /// [SettingValueBuilder] / [SettingsBuilder] so only the dependent subtree rebuilds. extension SettingsContextRead on BuildContext { T settingsRead(Pref pref) => SettingsService.instance.read(pref); - Future settingsWrite(Pref pref, T value) => SettingsService.instance.write(pref, value); } /// Rebuild [builder] when any of [prefs] changes. Use when a widget's output diff --git a/lib/widgets/video_controls/desktop_video_controls.dart b/lib/widgets/video_controls/desktop_video_controls.dart index 273fef4f..96166eb4 100644 --- a/lib/widgets/video_controls/desktop_video_controls.dart +++ b/lib/widgets/video_controls/desktop_video_controls.dart @@ -295,12 +295,6 @@ class DesktopVideoControlsState extends State { _timelineFocusNode.requestFocus(); } - /// Get focus node for volume control - FocusNode get volumeFocusNode => _volumeFocusNode; - - /// Get focus nodes for track controls - List get trackControlFocusNodes => _trackControlFocusNodes; - /// Hide content strip (called by parent when controls hide) void hideContentStrip() { if (_contentStripVisible) {