diff options
author | jan <jan@ruken.pw> | 2016-10-09 16:25:46 (UTC) |
---|---|---|
committer | jan <jan@ruken.pw> | 2016-10-09 16:25:46 (UTC) |
commit | 82e4530eb98f065f79339829fca45f404ca6ffce (patch) | |
tree | f69e3975ddb7dea862d3260d07b2b885958f433a /tools | |
parent | 3663ae0e1d87e6132db514c96c9df05fd676f8f5 (diff) |
anderes format
Diffstat (limited to 'tools')
-rw-r--r-- | tools/image-on-demand/.main.go.swp | bin | 12288 -> 0 bytes | |||
-rw-r--r-- | tools/image-on-demand/gril.list | 4 | ||||
-rw-r--r-- | tools/image-on-demand/main.go | 5 |
3 files changed, 5 insertions, 4 deletions
diff --git a/tools/image-on-demand/.main.go.swp b/tools/image-on-demand/.main.go.swp deleted file mode 100644 index 5b60469..0000000 --- a/tools/image-on-demand/.main.go.swp +++ /dev/null | |||
Binary files differ | |||
diff --git a/tools/image-on-demand/gril.list b/tools/image-on-demand/gril.list index 0e24253..0ff2750 100644 --- a/tools/image-on-demand/gril.list +++ b/tools/image-on-demand/gril.list | |||
@@ -1,2 +1,2 @@ | |||
1 | 64 0 http://ami.animecharactersdatabase.com/images/Clannad/fujibayashi_ryou_thumb.jpg | 1 | 64 http://ami.animecharactersdatabase.com/images/Clannad/fujibayashi_ryou_thumb.jpg |
2 | 64 1 http://ami.animecharactersdatabase.com/images/Clannad/fujibayashi_ryou.jpg | 2 | 64 http://ami.animecharactersdatabase.com/images/Clannad/fujibayashi_ryou.jpg |
diff --git a/tools/image-on-demand/main.go b/tools/image-on-demand/main.go index a3a401d..e2300b6 100644 --- a/tools/image-on-demand/main.go +++ b/tools/image-on-demand/main.go | |||
@@ -117,9 +117,9 @@ func loadList(name string) error { | |||
117 | } | 117 | } |
118 | 118 | ||
119 | if e, ok := files[name][int(id)]; ok { | 119 | if e, ok := files[name][int(id)]; ok { |
120 | files[name][int(id)] = append(e, data[2]) | 120 | files[name][int(id)] = append(e, data[1]) |
121 | } else { | 121 | } else { |
122 | files[name][int(id)] = []string{data[2]} | 122 | files[name][int(id)] = []string{data[1]} |
123 | } | 123 | } |
124 | } | 124 | } |
125 | return nil | 125 | return nil |
@@ -139,5 +139,6 @@ func main() { | |||
139 | 139 | ||
140 | router := httprouter.New() | 140 | router := httprouter.New() |
141 | router.GET("/:type/:image_type/:id", serveImage) | 141 | router.GET("/:type/:image_type/:id", serveImage) |
142 | log.Println("starting image-on-demand on localhost:8081") | ||
142 | log.Fatal(http.ListenAndServe("localhost:8081", router)) | 143 | log.Fatal(http.ListenAndServe("localhost:8081", router)) |
143 | } | 144 | } |