Fix an issue setting episode artwork

This commit is contained in:
Micah Morrison
2026-03-05 19:21:30 -05:00
parent 9730ffd541
commit a9c7130d55
2 changed files with 23 additions and 5 deletions
+16 -2
View File
@@ -219,8 +219,22 @@ class _MetadataEditScreenState extends State<MetadataEditScreen> {
);
if (result == true && mounted) {
// Reload metadata to get updated artwork paths
_loadMetadata();
// Re-fetch metadata to get updated artwork paths without resetting
// any text field edits the user may have made.
await _reloadArtwork();
}
}
Future<void> _reloadArtwork() async {
try {
final meta = await _client.getMetadataWithImages(widget.metadata.ratingKey);
if (!mounted) return;
if (meta != null) {
setState(() => _fullMetadata = meta);
}
} catch (_) {
// Artwork was already saved by the picker; display will refresh next
// time the editor is opened.
}
}