remote mount provider support

This commit is contained in:
Scott E. Graves 2025-03-15 22:01:29 -05:00
parent 30a91e1cb2
commit 28cfcc0344

View File

@ -84,9 +84,9 @@ class _AddMountScreenState extends State<AddMountScreen> {
), ),
), ),
), ),
if (_mountType.isNotEmpty && _mountType != "Remote") if (_mountType.isNotEmpty && _mountType != 'Remote')
const SizedBox(height: constants.padding), const SizedBox(height: constants.padding),
if (_mountType.isNotEmpty && _mountType != "Remote") if (_mountType.isNotEmpty && _mountType != 'Remote')
Card( Card(
margin: EdgeInsets.all(0.0), margin: EdgeInsets.all(0.0),
child: Padding( child: Padding(
@ -179,10 +179,11 @@ class _AddMountScreenState extends State<AddMountScreen> {
} }
} }
debugPrint('remote: ${_mountNameController.text}');
await mountList.add( await mountList.add(
_mountType, _mountType,
_mountNameController.text, _mountType == 'Remote'
? '${_settings[_mountType]!['RemoteConfig']['HostNameOrIp']}_${_settings[_mountType]!['RemoteConfig']['ApiPort']}'
: _mountNameController.text,
_settings[_mountType]!, _settings[_mountType]!,
); );
@ -208,10 +209,7 @@ class _AddMountScreenState extends State<AddMountScreen> {
_mountType = mountType; _mountType = mountType;
if (_mountType == 'Remote') { if (_mountType == 'Remote') {
_mountNameController.text = _mountNameController.text = 'remote';
(_settings[_mountType]?['HostNameOrIp'].toString() ?? '') +
':' +
(_settings[_mountType]?['ApiPort'].toString() ?? '');
} else if (changed) { } else if (changed) {
_mountNameController.text = mountType == 'Sia' ? 'default' : ''; _mountNameController.text = mountType == 'Sia' ? 'default' : '';
} }