diff --git a/lib/screens/settings.dart b/lib/screens/settings.dart index 381c415..c925b49 100644 --- a/lib/screens/settings.dart +++ b/lib/screens/settings.dart @@ -223,15 +223,40 @@ class _SettingsScreenState extends State { Obx( () => CheckboxListTile( contentPadding: const EdgeInsets.symmetric(horizontal: 24), - secondary: const Icon(Icons.all_inclusive), + secondary: const Icon(Icons.update), title: const Text('Override Cache Provider'), subtitle: const Text( 'Decide whether use original cached source or query a new one from current audio provider'), - value: _preferences.state.value.endlessPlayback, + value: _preferences.state.value.overrideCacheProvider, onChanged: (value) => _preferences.setOverrideCacheProvider(value ?? false), ), ), + Obx( + () => Column( + children: [ + const ListTile( + contentPadding: EdgeInsets.symmetric(horizontal: 24), + leading: Icon(Icons.cloud), + title: Text('Netease Cloud Music API'), + subtitle: Text( + 'Use your own endpoint to prevent IP throttling and more'), + ), + TextFormField( + initialValue: _preferences.state.value.neteaseApiInstance, + decoration: const InputDecoration( + hintText: 'Endpoint URL', + isDense: true, + ), + onChanged: (value) { + _preferences.setNeteaseApiInstance(value); + }, + onTapOutside: (_) => + FocusManager.instance.primaryFocus?.unfocus(), + ).paddingOnly(left: 24, right: 24, bottom: 12), + ], + ), + ), const Divider(thickness: 0.3, height: 1), Obx( () => SwitchListTile( diff --git a/pubspec.yaml b/pubspec.yaml index dbda6bd..579fedb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.0+13 +version: 1.0.0+14 environment: sdk: ^3.5.0