Skip to content

Commit

Permalink
Fix demo type filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
bugdone committed Oct 12, 2015
1 parent fce9f87 commit ce47330
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hsbox/stats.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[clojure.set :refer [subset? intersection]]
[hsbox.steamapi :as steamapi]
[hsbox.util :refer [current-timestamp]]
[hsbox.db :as db :refer [demo-path get-steam-api-key]]))
[hsbox.db :as db :refer [demo-path get-steam-api-key latest-data-version]]))

(taoensso.timbre/refer-timbre)

Expand Down Expand Up @@ -209,7 +209,7 @@

(defn filter-demos [steamid {:keys [demo-type start-date end-date map-name teammates]} demos]
(filter #(and
(if (contains? #{"valve" "faceit" "esea"} demo-type) (= demo-type (:type %)) true)
(if (contains? (-> latest-data-version keys set) demo-type) (= demo-type (:type %)) true)
(if map-name (= (:map %) map-name) true)
(if start-date (>= (:timestamp %) start-date) true)
(if end-date (<= (:timestamp %) end-date) true)
Expand Down

0 comments on commit ce47330

Please sign in to comment.