diff --git a/lib/screens/settings/settings_screen.dart b/lib/screens/settings/settings_screen.dart index 8be71bc3..847629ca 100644 --- a/lib/screens/settings/settings_screen.dart +++ b/lib/screens/settings/settings_screen.dart @@ -1050,6 +1050,11 @@ class _SettingsScreenState extends State with FocusableTab { selectedPath = await safService.pickDirectory(); if (selectedPath != null) { pathType = 'saf'; + } else if (PlatformDetector.isTV()) { + if (mounted) { + showErrorSnackBar(context, t.settings.downloadLocationSelectError); + } + return; } } else { // Use file_picker on desktop diff --git a/lib/services/saf_storage_service.dart b/lib/services/saf_storage_service.dart index 762b7c5c..a1f2e7c7 100644 --- a/lib/services/saf_storage_service.dart +++ b/lib/services/saf_storage_service.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:flutter/foundation.dart'; import 'package:saf_util/saf_util.dart'; +import '../utils/platform_detector.dart'; import 'package:saf_util/saf_util_platform_interface.dart'; import 'package:saf_stream/saf_stream.dart'; @@ -22,6 +23,8 @@ class SafStorageService { /// Returns the content:// URI or null if cancelled Future pickDirectory() async { if (!isAvailable) return null; + // SAF document picker is not available on Android TV + if (TvDetectionService.isTVSync()) return null; try { // Pick directory with persistent write permission final doc = await _safUtil.pickDirectory(writePermission: true, persistablePermission: true);