 (defn route->thumb-map
   [route-params]
   (let [map (-> route-params
-                (add-request-type :thumbnail)
+                (assoc :request-type :thumbnail)
                 (assoc :thumbnail-mode "thumbnail")
                 (route->dimensions)
                 (route->revision)

(declare route->revision
         route->dimensions
         route->thumb-mode
         route->options
         add-request-type)

;29 {
;30    "width" : "185px",
;31    "archive" : "",
;32    "wikia" : "happywheels",
;33    "input" : "/happywheels/images/thumb/b/bb/SuperMario64_20.png/185px-SuperMario64_20.webp",
;34    "hook_name" : "image thumbnailer",
;35    "thumbpath" : "happywheels/images/thumb/b/bb/SuperMario64_20.png",
;36    "thumbname" : "185px-SuperMario64_20.webp",
;37    "filename" : "SuperMario64_20",
;38    "thumbext" : "SuperMario64_20",
;39    "type" : "images",
;40    "fileext" : "png"
;41 }
; qr{ \/((?!\w\/)?(.+)\/(images|avatars)\/thumb((?!\/archive).*|\/archive)?\/\w\/\w{2}\/(.+)\.(jpg|jpeg|png|gif{1,}))\/((\d+px|\d+x\d+|\d+x\d+x\d+|)\-(.*)\.(jpg|jpeg|jpe|png|gif|webp))(\?.*)?$ }xi,
(def thumbnail-route
  (route-compile "/:wikia:lang/:image-type/thumb:archive/:top-dir/:middle-dir/:original/:thumbname"
                 {:wikia #"[\w-]+"

                        :thumbnail-mode "zoom-crop"})
          route)))
    route))
