   (let [processing-fn {:forward identity
                        :backward reverse}]
     (cond->> chapters
+      (= direction :backward) (reverse)
       chapter (drop-while #(not= (format-chapter %) chapter))
       :always (page-seq (processing-fn direction) scraper site)
       page (drop-while #(not= (:location/page %) page))

  (set/rename-keys chapter {:name :chapter/title
                            :ch-num :chapter/number}))

(defn- format-page [page]
  (-> page
      (set/rename-keys {:url :page/url})
      (dissoc :name)
      (assoc :page/number (and (:name page) (Integer/parseInt (:name page))))))

(defn- unformat-page [page]
  (-> page

  (previous-locations [this site comic-id location n]
    (let [{page :location/page chapter :location/chapter} location]
      (when chapter
        (locations-for scraper site :backward (site-scraper/list-chapters scraper site comic-id) chapter page n))))

  (next-locations [this site comic-id location n]
    (let [{page :location/page chapter :location/chapter} location]
