Organized tag-deriver to surface code smell.

This commit is contained in:
Elf M. Sternberg 2014-12-08 11:16:55 -08:00
parent 634cf57687
commit e079cd21cd
1 changed files with 7 additions and 7 deletions

View File

@ -156,8 +156,8 @@
(defn derive-tags [mp3s artist-deriver album-deriver genre-deriver title-deriver]
(defn derive-tag [mp3]
(let [[file (get mp3 0)]]
(, (get mp3 0) (artist-deriver (get mp3 1) file) (album-deriver (get mp3 2) file)
(genre-deriver (get mp3 3) file) (title-deriver (get mp3 4) file) (get mp3 5))))
(, (get mp3 5) (artist-deriver (get mp3 1) file) (album-deriver (get mp3 2) file)
(genre-deriver (get mp3 3) file) (title-deriver (get mp3 4) file) (get mp3 0))))
(ap-map (derive-tag it) mp3s))
; For all the songs, analyze a consist entry (usually genre and album
@ -210,12 +210,12 @@
(ap-each newmp3s
(print (.format format-string
(get it 5)
(get it 0)
(get it 1)
(get it 2)
(get it 3)
(get it 4)
(get it 0))))))
(get it 5))))))
(defmain [&rest args]
(try