A cross platform Audiobookshelf client for Android and iOS
Dart
Make the download network setting clearer and fix podcast auto-download
Barnabasbeece1106e2b
diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arbindex 75f462a6..b21f6ee3 100644--- a/lib/l10n/app_en.arb+++ b/lib/l10n/app_en.arb@@ -596,13 +596,13 @@}},"sectionDownloadsAndStorage": "Downloads & Storage",- "downloadOverWifiOnly": "Download over Wi-Fi only",- "downloadOverWifiOnSubtitle": "On - mobile data blocked for downloads",- "downloadOverWifiOffSubtitle": "Off - downloads on any connection",- "autoDownloadOnWifi": "Auto download on Wi-Fi",- "autoDownloadOnWifiInfoTitle": "Auto Download on Wi-Fi",- "autoDownloadOnWifiInfoContent": "When you start streaming a book over Wi-Fi, it will automatically begin downloading the full book in the background. This way you'll have it available offline without having to manually start the download.",- "autoDownloadOnWifiOnSubtitle": "Books download in the background when you start streaming on Wi-Fi",+ "downloadOverWifiOnly": "Download network",+ "downloadOverWifiOnSubtitle": "Wi-Fi only",+ "downloadOverWifiOffSubtitle": "Any connection",+ "autoDownloadOnWifi": "Auto-download books you start",+ "autoDownloadOnWifiInfoTitle": "Auto-Download Books You Start",+ "autoDownloadOnWifiInfoContent": "When you start streaming a book, the full book downloads in the background so you'll have it offline without starting the download yourself. These downloads follow your Download network setting above, so set it to Any connection if you want them to run on mobile data too.",+ "autoDownloadOnWifiOnSubtitle": "Streamed books download in the background automatically","autoDownloadOnWifiOffSubtitle": "Off","concurrentDownloads": "Concurrent downloads","autoDownload": "Auto-download",diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dartindex abb6fa2a..b9ebbaf9 100644--- a/lib/l10n/app_localizations.dart+++ b/lib/l10n/app_localizations.dart@@ -2227,43 +2227,43 @@ abstract class AppLocalizations {/// No description provided for @downloadOverWifiOnly.////// In en, this message translates to:- /// **'Download over Wi-Fi only'**+ /// **'Download network'**String get downloadOverWifiOnly;/// No description provided for @downloadOverWifiOnSubtitle.////// In en, this message translates to:- /// **'On - mobile data blocked for downloads'**+ /// **'Wi-Fi only'**String get downloadOverWifiOnSubtitle;/// No description provided for @downloadOverWifiOffSubtitle.////// In en, this message translates to:- /// **'Off - downloads on any connection'**+ /// **'Any connection'**String get downloadOverWifiOffSubtitle;/// No description provided for @autoDownloadOnWifi.////// In en, this message translates to:- /// **'Auto download on Wi-Fi'**+ /// **'Auto-download books you start'**String get autoDownloadOnWifi;/// No description provided for @autoDownloadOnWifiInfoTitle.////// In en, this message translates to:- /// **'Auto Download on Wi-Fi'**+ /// **'Auto-Download Books You Start'**String get autoDownloadOnWifiInfoTitle;/// No description provided for @autoDownloadOnWifiInfoContent.////// In en, this message translates to:- /// **'When you start streaming a book over Wi-Fi, it will automatically begin downloading the full book in the background. This way you\'ll have it available offline without having to manually start the download.'**+ /// **'When you start streaming a book, the full book downloads in the background so you\'ll have it offline without starting the download yourself. These downloads follow your Download network setting above, so set it to Any connection if you want them to run on mobile data too.'**String get autoDownloadOnWifiInfoContent;/// No description provided for @autoDownloadOnWifiOnSubtitle.////// In en, this message translates to:- /// **'Books download in the background when you start streaming on Wi-Fi'**+ /// **'Streamed books download in the background automatically'**String get autoDownloadOnWifiOnSubtitle;/// No description provided for @autoDownloadOnWifiOffSubtitle.diff --git a/lib/l10n/app_localizations_el.dart b/lib/l10n/app_localizations_el.dartindex 9254053d..83011f52 100644--- a/lib/l10n/app_localizations_el.dart+++ b/lib/l10n/app_localizations_el.dart@@ -1167,28 +1167,27 @@ class AppLocalizationsEl extends AppLocalizations {String get sectionDownloadsAndStorage => 'Downloads & Storage';@override- String get downloadOverWifiOnly => 'Download over Wi-Fi only';+ String get downloadOverWifiOnly => 'Download network';@override- String get downloadOverWifiOnSubtitle =>- 'On - mobile data blocked for downloads';+ String get downloadOverWifiOnSubtitle => 'Wi-Fi only';@override- String get downloadOverWifiOffSubtitle => 'Off - downloads on any connection';+ String get downloadOverWifiOffSubtitle => 'Any connection';@override- String get autoDownloadOnWifi => 'Auto download on Wi-Fi';+ String get autoDownloadOnWifi => 'Auto-download books you start';@override- String get autoDownloadOnWifiInfoTitle => 'Auto Download on Wi-Fi';+ String get autoDownloadOnWifiInfoTitle => 'Auto-Download Books You Start';@overrideString get autoDownloadOnWifiInfoContent =>- 'When you start streaming a book over Wi-Fi, it will automatically begin downloading the full book in the background. This way you\'ll have it available offline without having to manually start the download.';+ 'When you start streaming a book, the full book downloads in the background so you\'ll have it offline without starting the download yourself. These downloads follow your Download network setting above, so set it to Any connection if you want them to run on mobile data too.';@overrideString get autoDownloadOnWifiOnSubtitle =>- 'Books download in the background when you start streaming on Wi-Fi';+ 'Streamed books download in the background automatically';@overrideString get autoDownloadOnWifiOffSubtitle => 'Off';diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dartindex 5317d2ea..1f305eac 100644--- a/lib/l10n/app_localizations_en.dart+++ b/lib/l10n/app_localizations_en.dart@@ -1167,28 +1167,27 @@ class AppLocalizationsEn extends AppLocalizations {String get sectionDownloadsAndStorage => 'Downloads & Storage';@override- String get downloadOverWifiOnly => 'Download over Wi-Fi only';+ String get downloadOverWifiOnly => 'Download network';@override- String get downloadOverWifiOnSubtitle =>- 'On - mobile data blocked for downloads';+ String get downloadOverWifiOnSubtitle => 'Wi-Fi only';@override- String get downloadOverWifiOffSubtitle => 'Off - downloads on any connection';+ String get downloadOverWifiOffSubtitle => 'Any connection';@override- String get autoDownloadOnWifi => 'Auto download on Wi-Fi';+ String get autoDownloadOnWifi => 'Auto-download books you start';@override- String get autoDownloadOnWifiInfoTitle => 'Auto Download on Wi-Fi';+ String get autoDownloadOnWifiInfoTitle => 'Auto-Download Books You Start';@overrideString get autoDownloadOnWifiInfoContent =>- 'When you start streaming a book over Wi-Fi, it will automatically begin downloading the full book in the background. This way you\'ll have it available offline without having to manually start the download.';+ 'When you start streaming a book, the full book downloads in the background so you\'ll have it offline without starting the download yourself. These downloads follow your Download network setting above, so set it to Any connection if you want them to run on mobile data too.';@overrideString get autoDownloadOnWifiOnSubtitle =>- 'Books download in the background when you start streaming on Wi-Fi';+ 'Streamed books download in the background automatically';@overrideString get autoDownloadOnWifiOffSubtitle => 'Off';diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dartindex f0b9473c..4e269e1f 100644--- a/lib/l10n/app_localizations_es.dart+++ b/lib/l10n/app_localizations_es.dart@@ -1167,28 +1167,27 @@ class AppLocalizationsEs extends AppLocalizations {String get sectionDownloadsAndStorage => 'Downloads & Storage';@override- String get downloadOverWifiOnly => 'Download over Wi-Fi only';+ String get downloadOverWifiOnly => 'Download network';@override- String get downloadOverWifiOnSubtitle =>- 'On - mobile data blocked for downloads';+ String get downloadOverWifiOnSubtitle => 'Wi-Fi only';@override- String get downloadOverWifiOffSubtitle => 'Off - downloads on any connection';+ String get downloadOverWifiOffSubtitle => 'Any connection';@override- String get autoDownloadOnWifi => 'Auto download on Wi-Fi';+ String get autoDownloadOnWifi => 'Auto-download books you start';@override- String get autoDownloadOnWifiInfoTitle => 'Auto Download on Wi-Fi';+ String get autoDownloadOnWifiInfoTitle => 'Auto-Download Books You Start';@overrideString get autoDownloadOnWifiInfoContent =>- 'When you start streaming a book over Wi-Fi, it will automatically begin downloading the full book in the background. This way you\'ll have it available offline without having to manually start the download.';+ 'When you start streaming a book, the full book downloads in the background so you\'ll have it offline without starting the download yourself. These downloads follow your Download network setting above, so set it to Any connection if you want them to run on mobile data too.';@overrideString get autoDownloadOnWifiOnSubtitle =>- 'Books download in the background when you start streaming on Wi-Fi';+ 'Streamed books download in the background automatically';@overrideString get autoDownloadOnWifiOffSubtitle => 'Off';diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dartindex 70d75c84..f886ac4a 100644--- a/lib/l10n/app_localizations_fr.dart+++ b/lib/l10n/app_localizations_fr.dart@@ -1169,28 +1169,27 @@ class AppLocalizationsFr extends AppLocalizations {String get sectionDownloadsAndStorage => 'Downloads & Storage';@override- String get downloadOverWifiOnly => 'Download over Wi-Fi only';+ String get downloadOverWifiOnly => 'Download network';@override- String get downloadOverWifiOnSubtitle =>- 'On - mobile data blocked for downloads';+ String get downloadOverWifiOnSubtitle => 'Wi-Fi only';@override- String get downloadOverWifiOffSubtitle => 'Off - downloads on any connection';+ String get downloadOverWifiOffSubtitle => 'Any connection';@override- String get autoDownloadOnWifi => 'Auto download on Wi-Fi';+ String get autoDownloadOnWifi => 'Auto-download books you start';@override- String get autoDownloadOnWifiInfoTitle => 'Auto Download on Wi-Fi';+ String get autoDownloadOnWifiInfoTitle => 'Auto-Download Books You Start';@overrideString get autoDownloadOnWifiInfoContent =>- 'When you start streaming a book over Wi-Fi, it will automatically begin downloading the full book in the background. This way you\'ll have it available offline without having to manually start the download.';+ 'When you start streaming a book, the full book downloads in the background so you\'ll have it offline without starting the download yourself. These downloads follow your Download network setting above, so set it to Any connection if you want them to run on mobile data too.';@overrideString get autoDownloadOnWifiOnSubtitle =>- 'Books download in the background when you start streaming on Wi-Fi';+ 'Streamed books download in the background automatically';@overrideString get autoDownloadOnWifiOffSubtitle => 'Off';diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dartindex acd1b233..c5b0d2ee 100644--- a/lib/l10n/app_localizations_it.dart+++ b/lib/l10n/app_localizations_it.dart@@ -1167,28 +1167,27 @@ class AppLocalizationsIt extends AppLocalizations {String get sectionDownloadsAndStorage => 'Downloads & Storage';@override- String get downloadOverWifiOnly => 'Download over Wi-Fi only';+ String get downloadOverWifiOnly => 'Download network';@override- String get downloadOverWifiOnSubtitle =>- 'On - mobile data blocked for downloads';+ String get downloadOverWifiOnSubtitle => 'Wi-Fi only';@override- String get downloadOverWifiOffSubtitle => 'Off - downloads on any connection';+ String get downloadOverWifiOffSubtitle => 'Any connection';@override- String get autoDownloadOnWifi => 'Auto download on Wi-Fi';+ String get autoDownloadOnWifi => 'Auto-download books you start';@override- String get autoDownloadOnWifiInfoTitle => 'Auto Download on Wi-Fi';+ String get autoDownloadOnWifiInfoTitle => 'Auto-Download Books You Start';@overrideString get autoDownloadOnWifiInfoContent =>- 'When you start streaming a book over Wi-Fi, it will automatically begin downloading the full book in the background. This way you\'ll have it available offline without having to manually start the download.';+ 'When you start streaming a book, the full book downloads in the background so you\'ll have it offline without starting the download yourself. These downloads follow your Download network setting above, so set it to Any connection if you want them to run on mobile data too.';@overrideString get autoDownloadOnWifiOnSubtitle =>- 'Books download in the background when you start streaming on Wi-Fi';+ 'Streamed books download in the background automatically';@overrideString get autoDownloadOnWifiOffSubtitle => 'Off';diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dartindex 103ebe5f..b7de062b 100644--- a/lib/l10n/app_localizations_ja.dart+++ b/lib/l10n/app_localizations_ja.dart@@ -1167,28 +1167,27 @@ class AppLocalizationsJa extends AppLocalizations {String get sectionDownloadsAndStorage => 'Downloads & Storage';@override- String get downloadOverWifiOnly => 'Download over Wi-Fi only';+ String get downloadOverWifiOnly => 'Download network';@override- String get downloadOverWifiOnSubtitle =>- 'On - mobile data blocked for downloads';+ String get downloadOverWifiOnSubtitle => 'Wi-Fi only';@override- String get downloadOverWifiOffSubtitle => 'Off - downloads on any connection';+ String get downloadOverWifiOffSubtitle => 'Any connection';@override- String get autoDownloadOnWifi => 'Auto download on Wi-Fi';+ String get autoDownloadOnWifi => 'Auto-download books you start';@override- String get autoDownloadOnWifiInfoTitle => 'Auto Download on Wi-Fi';+ String get autoDownloadOnWifiInfoTitle => 'Auto-Download Books You Start';@overrideString get autoDownloadOnWifiInfoContent =>- 'When you start streaming a book over Wi-Fi, it will automatically begin downloading the full book in the background. This way you\'ll have it available offline without having to manually start the download.';+ 'When you start streaming a book, the full book downloads in the background so you\'ll have it offline without starting the download yourself. These downloads follow your Download network setting above, so set it to Any connection if you want them to run on mobile data too.';@overrideString get autoDownloadOnWifiOnSubtitle =>- 'Books download in the background when you start streaming on Wi-Fi';+ 'Streamed books download in the background automatically';@overrideString get autoDownloadOnWifiOffSubtitle => 'Off';diff --git a/lib/l10n/app_localizations_no.dart b/lib/l10n/app_localizations_no.dartindex 45e1a680..a38ad7f0 100644--- a/lib/l10n/app_localizations_no.dart+++ b/lib/l10n/app_localizations_no.dart@@ -1167,28 +1167,27 @@ class AppLocalizationsNo extends AppLocalizations {String get sectionDownloadsAndStorage => 'Downloads & Storage';@override- String get downloadOverWifiOnly => 'Download over Wi-Fi only';+ String get downloadOverWifiOnly => 'Download network';@override- String get downloadOverWifiOnSubtitle =>- 'On - mobile data blocked for downloads';+ String get downloadOverWifiOnSubtitle => 'Wi-Fi only';@override- String get downloadOverWifiOffSubtitle => 'Off - downloads on any connection';+ String get downloadOverWifiOffSubtitle => 'Any connection';@override- String get autoDownloadOnWifi => 'Auto download on Wi-Fi';+ String get autoDownloadOnWifi => 'Auto-download books you start';@override- String get autoDownloadOnWifiInfoTitle => 'Auto Download on Wi-Fi';+ String get autoDownloadOnWifiInfoTitle => 'Auto-Download Books You Start';@overrideString get autoDownloadOnWifiInfoContent =>- 'When you start streaming a book over Wi-Fi, it will automatically begin downloading the full book in the background. This way you\'ll have it available offline without having to manually start the download.';+ 'When you start streaming a book, the full book downloads in the background so you\'ll have it offline without starting the download yourself. These downloads follow your Download network setting above, so set it to Any connection if you want them to run on mobile data too.';@overrideString get autoDownloadOnWifiOnSubtitle =>- 'Books download in the background when you start streaming on Wi-Fi';+ 'Streamed books download in the background automatically';@overrideString get autoDownloadOnWifiOffSubtitle => 'Off';diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dartindex 4cfeb003..23397cdc 100644--- a/lib/l10n/app_localizations_pt.dart+++ b/lib/l10n/app_localizations_pt.dart@@ -1167,28 +1167,27 @@ class AppLocalizationsPt extends AppLocalizations {String get sectionDownloadsAndStorage => 'Downloads & Storage';@override- String get downloadOverWifiOnly => 'Download over Wi-Fi only';+ String get downloadOverWifiOnly => 'Download network';@override- String get downloadOverWifiOnSubtitle =>- 'On - mobile data blocked for downloads';+ String get downloadOverWifiOnSubtitle => 'Wi-Fi only';@override- String get downloadOverWifiOffSubtitle => 'Off - downloads on any connection';+ String get downloadOverWifiOffSubtitle => 'Any connection';@override- String get autoDownloadOnWifi => 'Auto download on Wi-Fi';+ String get autoDownloadOnWifi => 'Auto-download books you start';@override- String get autoDownloadOnWifiInfoTitle => 'Auto Download on Wi-Fi';+ String get autoDownloadOnWifiInfoTitle => 'Auto-Download Books You Start';@overrideString get autoDownloadOnWifiInfoContent =>- 'When you start streaming a book over Wi-Fi, it will automatically begin downloading the full book in the background. This way you\'ll have it available offline without having to manually start the download.';+ 'When you start streaming a book, the full book downloads in the background so you\'ll have it offline without starting the download yourself. These downloads follow your Download network setting above, so set it to Any connection if you want them to run on mobile data too.';@overrideString get autoDownloadOnWifiOnSubtitle =>- 'Books download in the background when you start streaming on Wi-Fi';+ 'Streamed books download in the background automatically';@overrideString get autoDownloadOnWifiOffSubtitle => 'Off';diff --git a/lib/l10n/app_localizations_ro.dart b/lib/l10n/app_localizations_ro.dartindex 1245b56d..d4923047 100644--- a/lib/l10n/app_localizations_ro.dart+++ b/lib/l10n/app_localizations_ro.dart@@ -1167,28 +1167,27 @@ class AppLocalizationsRo extends AppLocalizations {String get sectionDownloadsAndStorage => 'Downloads & Storage';@override- String get downloadOverWifiOnly => 'Download over Wi-Fi only';+ String get downloadOverWifiOnly => 'Download network';@override- String get downloadOverWifiOnSubtitle =>- 'On - mobile data blocked for downloads';+ String get downloadOverWifiOnSubtitle => 'Wi-Fi only';@override- String get downloadOverWifiOffSubtitle => 'Off - downloads on any connection';+ String get downloadOverWifiOffSubtitle => 'Any connection';@override- String get autoDownloadOnWifi => 'Auto download on Wi-Fi';+ String get autoDownloadOnWifi => 'Auto-download books you start';@override- String get autoDownloadOnWifiInfoTitle => 'Auto Download on Wi-Fi';+ String get autoDownloadOnWifiInfoTitle => 'Auto-Download Books You Start';@overrideString get autoDownloadOnWifiInfoContent =>- 'When you start streaming a book over Wi-Fi, it will automatically begin downloading the full book in the background. This way you\'ll have it available offline without having to manually start the download.';+ 'When you start streaming a book, the full book downloads in the background so you\'ll have it offline without starting the download yourself. These downloads follow your Download network setting above, so set it to Any connection if you want them to run on mobile data too.';@overrideString get autoDownloadOnWifiOnSubtitle =>- 'Books download in the background when you start streaming on Wi-Fi';+ 'Streamed books download in the background automatically';@overrideString get autoDownloadOnWifiOffSubtitle => 'Off';diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dartindex c6e27c5e..88777b72 100644--- a/lib/l10n/app_localizations_ru.dart+++ b/lib/l10n/app_localizations_ru.dart@@ -1170,28 +1170,27 @@ class AppLocalizationsRu extends AppLocalizations {String get sectionDownloadsAndStorage => 'Загрузки и хранилище';@override- String get downloadOverWifiOnly => 'Download over Wi-Fi only';+ String get downloadOverWifiOnly => 'Download network';@override- String get downloadOverWifiOnSubtitle =>- 'On - mobile data blocked for downloads';+ String get downloadOverWifiOnSubtitle => 'Wi-Fi only';@override- String get downloadOverWifiOffSubtitle => 'Off - downloads on any connection';+ String get downloadOverWifiOffSubtitle => 'Any connection';@override- String get autoDownloadOnWifi => 'Auto download on Wi-Fi';+ String get autoDownloadOnWifi => 'Auto-download books you start';@override- String get autoDownloadOnWifiInfoTitle => 'Auto Download on Wi-Fi';+ String get autoDownloadOnWifiInfoTitle => 'Auto-Download Books You Start';@overrideString get autoDownloadOnWifiInfoContent =>- 'When you start streaming a book over Wi-Fi, it will automatically begin downloading the full book in the background. This way you\'ll have it available offline without having to manually start the download.';+ 'When you start streaming a book, the full book downloads in the background so you\'ll have it offline without starting the download yourself. These downloads follow your Download network setting above, so set it to Any connection if you want them to run on mobile data too.';@overrideString get autoDownloadOnWifiOnSubtitle =>- 'Books download in the background when you start streaming on Wi-Fi';+ 'Streamed books download in the background automatically';@overrideString get autoDownloadOnWifiOffSubtitle => 'Off';diff --git a/lib/providers/_lp_core.dart b/lib/providers/_lp_core.dartindex 62958bc3..931feff2 100644--- a/lib/providers/_lp_core.dart+++ b/lib/providers/_lp_core.dart@@ -2065,19 +2065,22 @@ mixin _CoreMixin on ChangeNotifier, _StateMixin {return;}- final connectivity = await Connectivity().checkConnectivity();- if (!connectivity.contains(ConnectivityResult.wifi)) return;-+ // Network policy (Wi-Fi only vs Wi-Fi & mobile) is enforced centrally by+ // downloadItem(), so this honors the user's Download network setting rather+ // than forcing Wi-Fi.final dl = DownloadService();if (dl.isDownloaded(playingKey) || dl.isDownloading(playingKey)) return;final player = AudioPlayerService();- final itemId = player.currentItemId;- if (itemId == null) return;+ if (player.currentItemId == null) return;+ // playingKey is the composite 'itemId-episodeId' for podcast episodes (plain+ // itemId for books), which is exactly what downloadItem expects - it slices+ // the episode part back off to reach the library item. Passing the plain+ // podcast id here would corrupt that id and silently fail the download.dl.downloadItem(api: _api!,- itemId: itemId,+ itemId: playingKey,title: player.currentTitle ?? '',author: player.currentAuthor ?? '',coverUrl: player.currentCoverUrl,diff --git a/lib/providers/library_provider.dart b/lib/providers/library_provider.dartindex 4e54dd39..28d537a4 100644--- a/lib/providers/library_provider.dart+++ b/lib/providers/library_provider.dart@@ -40,12 +40,18 @@ class LibraryProvider extends ChangeNotifier});AudioPlayerService.setOnPeekNextItemCallback(peekNextQueueItemForPreBuffer);AudioPlayerService.setOnPlayStartedCallback((key) {+ // Auto-download the book/episode you're listening to kicks off quickly so+ // it doesn't feel broken; the short wait still skips it if you stop or+ // switch right away. Rolling/queue look-ahead stays deferred to keep the+ // moment playback starts light.+ Future.delayed(const Duration(seconds: 5), () {+ if (!AudioPlayerService().isPlaying) return;+ _checkAutoDownloadOnStream(key);+ });Future.delayed(const Duration(seconds: 30), () {- final stillPlaying = AudioPlayerService().isPlaying;- if (!stillPlaying) return;+ if (!AudioPlayerService().isPlaying) return;_checkRollingDownloads(key);_checkQueueAutoDownloads(key);- _checkAutoDownloadOnStream(key);});});AudioPlayerService.setOnPlaybackStateChangedCallback((playing) {diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dartindex e983db93..4713b2a8 100644--- a/lib/screens/settings_screen.dart+++ b/lib/screens/settings_screen.dart@@ -1821,16 +1821,29 @@ class _SettingsScreenState extends State<SettingsScreen> {isExpanded: _expandedSection == 'Downloads & Storage',onExpansionChanged: (v) => _onSectionExpanded('Downloads & Storage', v),children: [- SwitchListTile(- title: Text(l.downloadOverWifiOnly),- subtitle: Text(- _wifiOnlyDownloads ? l.downloadOverWifiOnSubtitle : l.downloadOverWifiOffSubtitle,- style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant)),- value: _wifiOnlyDownloads,- onChanged: _loaded ? (v) {- setState(() => _wifiOnlyDownloads = v);- PlayerSettings.setWifiOnlyDownloads(v);- } : null,+ Padding(+ padding: const EdgeInsets.symmetric(horizontal: 16),+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ const SizedBox(height: 12),+ Text(l.downloadOverWifiOnly, style: tt.bodyMedium?.copyWith(color: cs.onSurface)),+ const SizedBox(height: 8),+ SizedBox(width: double.infinity, child: SegmentedButton<bool>(+ showSelectedIcon: false,+ segments: [+ ButtonSegment(value: true, label: Text(l.downloadOverWifiOnSubtitle)),+ ButtonSegment(value: false, label: Text(l.downloadOverWifiOffSubtitle)),+ ],+ selected: {_wifiOnlyDownloads},+ onSelectionChanged: _loaded ? (v) {+ setState(() => _wifiOnlyDownloads = v.first);+ PlayerSettings.setWifiOnlyDownloads(v.first);+ } : null,+ )),+ const SizedBox(height: 8),+ ],+ ),),const Divider(height: 1, indent: 16, endIndent: 16),SwitchListTile(