Skip to content

Commit

Permalink
fix(alist port): modify check method
Browse files Browse the repository at this point in the history
The new feature in alist v3.19.0 caused the output to change, so the check method was modified

#11
  • Loading branch information
Xmarmalade committed Jun 19, 2023
1 parent b6a684c commit 37217ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/provider/alist_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ class AlistNotifier extends StateNotifier<AlistState> {
}

void checkState(String text) {
if (text.contains('start server')) {
if (text.contains('start ') && text.contains('server')) {
if (text.contains('FATA')) {
text = text.split('FATA')[0].trim();
}
String url = text.split('@')[1].trim().split(':')[1].trim();
url = 'http://localhost:$url';
String port = text.split('@')[1].trim().split(':')[1].trim();
String url = 'http://localhost:$port';
state = state.copyWith(url: url);
}
}
Expand Down

0 comments on commit 37217ac

Please sign in to comment.