1diff --git a/pkg/view/album.go b/pkg/view/album.go
2index a96b9bd89530fbb8e557a68e2c4fb2f299784748..9e70b4b7b832bae74032c8d9ca67cfac613de5b8 100644
3--- a/pkg/view/album.go
4+++ b/pkg/view/album.go
5@@ -85,8 +85,9 @@ Medias: medias,
6 Albums: albums,
7 Name: album.Name,
8 Next: &repository.Pagination{
9- Size: p.Size,
10- Page: p.Page + 1,
11+ Size: p.Size,
12+ Page: p.Page + 1,
13+ AlbumID: &album.ID,
14 },
15 Settings: settings,
16 }
17diff --git a/pkg/view/media.go b/pkg/view/media.go
18index d5aace24688b861992e6f6147889e9b5a25eb5ac..f490ce1e77f979d19c995e17be7b382a34aee3d1 100644
19--- a/pkg/view/media.go
20+++ b/pkg/view/media.go
21@@ -44,8 +44,7 @@ page = p
22 }
23
24 if albumIDStr == "" {
25- id := uint(0)
26- albumID = &id
27+ albumID = nil
28 } else if p, err := strconv.Atoi(albumIDStr); err == nil {
29 id := uint(p)
30 albumID = &id
31@@ -133,9 +132,9 @@ return nil
32 }
33
34 func (self *MediaView) SetMyselfIn(r *ext.Router) {
35- r.GET("/media", self.Index)
36- r.POST("/media", self.Index)
37+ r.GET("/media/", self.Index)
38+ r.POST("/media/", self.Index)
39
40- r.GET("/media/image", self.GetImage)
41- r.GET("/media/thumbnail", self.GetThumbnail)
42+ r.GET("/media/image/", self.GetImage)
43+ r.GET("/media/thumbnail/", self.GetThumbnail)
44 }
45diff --git a/templates/album.qtpl b/templates/album.qtpl
46index 1f25bf6a6e2aa62127718cc5c94e62d908a57568..835db5703c2c07cc98145f76fd435e52d4f5707e 100644
47--- a/templates/album.qtpl
48+++ b/templates/album.qtpl
49@@ -30,7 +30,7 @@ <div class="columns">
50 {%= Mosaic(p.Medias, p.PreloadAttr()) %}
51 </div>
52 <div>
53- <a href="/media?page={%d p.Next.Page %}" class="button is-pulled-right">next</a>
54+ <a href="/album/?albumId={%s FromUInttoString(p.Next.AlbumID) %}&page={%d p.Next.Page %}" class="button is-pulled-right">next</a>
55 </div>
56 {% endfunc %}
57
58diff --git a/templates/media.qtpl b/templates/media.qtpl
59index 737d03d63a2ae301fc37dd3a9926e216a6fe325a..4251deb32c1b561ecdbad544bb7adbe42fec0571 100644
60--- a/templates/media.qtpl
61+++ b/templates/media.qtpl
62@@ -22,7 +22,7 @@ <div class="columns">
63 {%= Mosaic(p.Medias, p.PreloadAttr()) %}
64 </div>
65 <div>
66- <a href="/media?page={%d p.Next.Page %}" class="button is-pulled-right">next</a>
67+ <a href="/media/?page={%d p.Next.Page %}" class="button is-pulled-right">next</a>
68 </div>
69 {% endfunc %}
70
71diff --git a/templates/mosaic.qtpl b/templates/mosaic.qtpl
72index 18dbcba489fef78faa1326522e834762f3efadba..3e6ccf86d9ac5359d8a2a097af4269589af25fb7 100644
73--- a/templates/mosaic.qtpl
74+++ b/templates/mosaic.qtpl
75@@ -8,12 +8,12 @@ <div class="column is-2">
76 {% for _, media := range c %}
77 <div class="card-image">
78 {% if media.IsVideo() %}
79- <video class="image is-fit" controls muted="true" poster="/media/thumbnail?path_hash={%s media.PathHash %}" preload="{%s preloadAttr %}">
80- <source src="/media/image?path_hash={%s media.PathHash %}" type="{%s media.MIMEType %}">
81+ <video class="image is-fit" controls muted="true" poster="/media/thumbnail/?path_hash={%s media.PathHash %}" preload="{%s preloadAttr %}">
82+ <source src="/media/image/?path_hash={%s media.PathHash %}" type="{%s media.MIMEType %}">
83 </video>
84 {% else %}
85 <figure class="image is-fit">
86- <img src="/media/thumbnail?path_hash={%s media.PathHash %}">
87+ <img src="/media/thumbnail/?path_hash={%s media.PathHash %}">
88 </figure>
89 {% endif %}
90 </div>