diff --git a/lib/PoorBooru/Backend/Controller/Media.pm b/lib/PoorBooru/Backend/Controller/Media.pm index cfceae7..d0f6b3d 100644 --- a/lib/PoorBooru/Backend/Controller/Media.pm +++ b/lib/PoorBooru/Backend/Controller/Media.pm @@ -23,7 +23,8 @@ sub list ($self) $self->title("Pooru~"); my @media = map +{ - media_src => $self->seaweed->url_for( + media_link => $self->url_for("media_show", media_id => $_->{media_id}), + media_src => $self->seaweed->url_for( SeaweedFS::FID->from_string($_->{seaweedfs_fid}) ), }, @{$res->json->{media}}; diff --git a/lib/PoorBooru/Backend/Controller/Tags.pm b/lib/PoorBooru/Backend/Controller/Tags.pm index 6cdee89..c3cdc3a 100644 --- a/lib/PoorBooru/Backend/Controller/Tags.pm +++ b/lib/PoorBooru/Backend/Controller/Tags.pm @@ -50,7 +50,8 @@ sub show ($self) $self->title($res->json->{name}); my @media = map +{ - media_src => $self->seaweed->url_for( + media_link => $self->url_for("media_show", media_id => $_->{media_id}), + media_src => $self->seaweed->url_for( SeaweedFS::FID->from_string($_->{seaweedfs_fid}) ), }, @{$res->json->{media}}; diff --git a/templates/gallery.html.ep b/templates/gallery.html.ep index a2f0733..0a80668 100644 --- a/templates/gallery.html.ep +++ b/templates/gallery.html.ep @@ -2,7 +2,7 @@