fix: artwork changing not working

- Use PUT instead of POST and singular element path (art/poster) to
  match Plex Web API behavior
- Set content type to application/octet-stream for binary uploads
- Add GestureDetector for mouse/touch tap support in artwork picker
- Always refresh detail screen metadata after returning from edit
This commit is contained in:
edde746
2026-02-26 11:55:45 +01:00
parent 414e5804eb
commit a38aac7829
3 changed files with 41 additions and 33 deletions
+30 -27
View File
@@ -187,37 +187,40 @@ class _ArtworkPickerDialogState extends State<ArtworkPickerDialog> {
return FocusableWrapper(
borderRadius: 8,
onSelect: () => _selectArtwork(artwork),
child: Stack(
fit: StackFit.expand,
children: [
Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainerHighest,
borderRadius: const BorderRadius.all(Radius.circular(8)),
),
child: ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(8)),
child: PlexOptimizedImage(
client: widget.client,
imagePath: thumbUrl,
fit: BoxFit.contain,
child: GestureDetector(
onTap: () => _selectArtwork(artwork),
child: Stack(
fit: StackFit.expand,
children: [
Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainerHighest,
borderRadius: const BorderRadius.all(Radius.circular(8)),
),
),
),
if (isSelected)
Positioned(
right: 6,
bottom: 6,
child: Container(
padding: const EdgeInsets.all(4),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.primary,
shape: BoxShape.circle,
child: ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(8)),
child: PlexOptimizedImage(
client: widget.client,
imagePath: thumbUrl,
fit: BoxFit.contain,
),
child: Icon(Symbols.check_rounded, size: 16, color: Theme.of(context).colorScheme.onPrimary),
),
),
],
if (isSelected)
Positioned(
right: 6,
bottom: 6,
child: Container(
padding: const EdgeInsets.all(4),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.primary,
shape: BoxShape.circle,
),
child: Icon(Symbols.check_rounded, size: 16, color: Theme.of(context).colorScheme.onPrimary),
),
),
],
),
),
);
},