mirror of
https://github.com/austinried/subtracks.git
synced 2025-12-27 17:19:27 +01:00
20 lines
369 B
Dart
20 lines
369 B
Dart
import 'package:xml/xml.dart';
|
|
|
|
enum Status {
|
|
ok('ok'),
|
|
failed('failed');
|
|
|
|
const Status(this.value);
|
|
final String value;
|
|
}
|
|
|
|
class SubsonicResponse {
|
|
late Status status;
|
|
late XmlElement xml;
|
|
|
|
SubsonicResponse(XmlDocument xml) {
|
|
this.xml = xml.getElement('subsonic-response')!;
|
|
status = Status.values.byName(this.xml.getAttribute('status')!);
|
|
}
|
|
}
|