diff --git a/lib/src/services/api/mediafiles/download.service.dart b/lib/src/services/api/mediafiles/download.service.dart index 00f5789..f5108a1 100644 --- a/lib/src/services/api/mediafiles/download.service.dart +++ b/lib/src/services/api/mediafiles/download.service.dart @@ -45,6 +45,9 @@ Map> defaultAutoDownloadOptions = { }; Future isAllowedToDownload(MediaType type) async { + if (type == MediaType.audio) { + return true; // always download audio files + } final connectivityResult = await Connectivity().checkConnectivity(); final options = gUser.autoDownloadOptions ?? defaultAutoDownloadOptions; diff --git a/lib/src/views/settings/data_and_storage.view.dart b/lib/src/views/settings/data_and_storage.view.dart index 21b0848..52cd299 100644 --- a/lib/src/views/settings/data_and_storage.view.dart +++ b/lib/src/views/settings/data_and_storage.view.dart @@ -107,7 +107,9 @@ class _DataAndStorageViewState extends State { ListTile( title: Text(context.lang.settingsStorageDataAutoDownMobile), subtitle: Text( - autoDownloadOptions[ConnectivityResult.mobile.name]!.join(', '), + autoDownloadOptions[ConnectivityResult.mobile.name]! + .where((e) => e != 'audio') + .join(', '), style: const TextStyle(color: Colors.grey), ), onTap: () async { @@ -117,7 +119,9 @@ class _DataAndStorageViewState extends State { ListTile( title: Text(context.lang.settingsStorageDataAutoDownWifi), subtitle: Text( - autoDownloadOptions[ConnectivityResult.wifi.name]!.join(', '), + autoDownloadOptions[ConnectivityResult.wifi.name]! + .where((e) => e != 'audio') + .join(', '), style: const TextStyle(color: Colors.grey), ), onTap: () async { @@ -178,14 +182,6 @@ class _AutoDownloadOptionsDialogState extends State { await _updateAutoDownloadSetting(DownloadMediaTypes.video, value); }, ), - CheckboxListTile( - title: const Text('Audio'), - value: autoDownloadOptions[widget.connectionMode.name]! - .contains(DownloadMediaTypes.audio.name), - onChanged: (bool? value) async { - await _updateAutoDownloadSetting(DownloadMediaTypes.audio, value); - }, - ), ], ), actions: [