9f5aa729

By: Michael Lynch <git@mtlynch.io>

Share variants via embedded MediaFiles to drop type switches

Splitting MediaFiles into PhotoFiles/VideoFiles forced callers to switch
on MediaType just to pick an accessor, even when reading only the
variants both types share (FullSize, thumbnails).

Reintroduce a MediaFiles struct holding the shared variants, with a
single MediaItem.MediaFiles() accessor that does the one internal type
switch. PhotoFiles now embeds MediaFiles and adds only its DisplaySize
field. VideoFiles was identical to the shared set, so delete it.

This removes the new switches in browse.go and import-from-tinybeans;
the remaining switches in media.go are behavioral (distinct template
fields per type) and predate the split.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 17s 12s 12s 30s 17s
Eval 28s 1m12s 1m12s 1m41s 0s
Build 39s 7m54s 3m04s 3m43s 1m08s
Suite 17s 9m20s 3m26s 3m43s 1m26s

Timeline

0s20s30s40s50s1m1m10s1m20s1m30s1m40s1m50s2m2m10s2m20s2m30s3m40s