client: Set sync status for works and recordings

This commit is contained in:
Elias Projahn 2020-07-17 20:12:50 +02:00
parent d566e6c473
commit 6c7891de14
3 changed files with 67 additions and 22 deletions

View file

@ -436,7 +436,7 @@ class MusicusClient {
));
final json = jsonDecode(response.body);
return json.map<WorkInfo>((j) => WorkInfo.fromJson(j)).toList();
return json.map<WorkInfo>((j) => WorkInfo.fromJson(j, sync: true)).toList();
}
/// Get a work by ID.
@ -446,7 +446,7 @@ class MusicusClient {
));
final json = jsonDecode(response.body);
return WorkInfo.fromJson(json);
return WorkInfo.fromJson(json, sync: true);
}
/// Delete a work by ID.
@ -475,7 +475,9 @@ class MusicusClient {
));
final json = jsonDecode(response.body);
return json.map<RecordingInfo>((j) => RecordingInfo.fromJson(j)).toList();
return json
.map<RecordingInfo>((j) => RecordingInfo.fromJson(j, sync: true))
.toList();
}
/// Create or update a work.
@ -570,7 +572,7 @@ class MusicusClient {
));
final json = jsonDecode(response.body);
return RecordingInfo.fromJson(json);
return RecordingInfo.fromJson(json, sync: true);
}
/// Create or update a recording.