mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-27 03:07:26 +01:00
client: Set sync status for works and recordings
This commit is contained in:
parent
d566e6c473
commit
6c7891de14
3 changed files with 67 additions and 22 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue