mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 23:02:43 +01:00
v2
This commit is contained in:
19
lib/sources/subsonic/xml.dart
Normal file
19
lib/sources/subsonic/xml.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
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')!);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user