Skip to content

Commit

Permalink
Rekordbox xml uses TrackNumber attribute
Browse files Browse the repository at this point in the history
Not Track attribute
  • Loading branch information
alza-bitz committed Feb 3, 2019
1 parent b2ebbf1 commit b9e817b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/converter/traktor/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,16 @@
:ret entry-spec)

(defn item->entry
[{:keys [::u/location ::u/title ::u/artist ::u/track ::u/album ::u/total-time ::u/bpm ::u/tempos ::u/markers]}]
[{:keys [::u/location ::u/title ::u/artist ::u/track-number ::u/album ::u/total-time ::u/bpm ::u/tempos ::u/markers]}]
{:tag :ENTRY
:attrs (cond-> {}
title (assoc :TITLE title)
artist (assoc :ARTIST artist))
:content (cond-> []
true (conj (url->location location))
(or track album) (conj {:tag :ALBUM
(or track-number album) (conj {:tag :ALBUM
:attrs (cond-> {}
track (assoc :TRACK track)
track-number (assoc :TRACK track-number)
album (assoc :TITLE album))})
total-time (conj {:tag :INFO
:attrs {:PLAYTIME total-time}})
Expand Down Expand Up @@ -225,7 +225,7 @@
(cond-> {::u/location (location->url (zx/xml1-> entry-z :LOCATION))}
title (assoc ::u/title title)
artist (assoc ::u/artist artist)
track (assoc ::u/track track)
track (assoc ::u/track-number track)
album-title (assoc ::u/album album-title)
playtime (assoc ::u/total-time playtime)
bpm (assoc ::u/bpm bpm)
Expand Down
2 changes: 1 addition & 1 deletion src/converter/universal/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{::location ::url/url
(std/opt ::title) string?
(std/opt ::artist) string?
(std/opt ::track) string?
(std/opt ::track-number) string?
(std/opt ::album) string?
(std/opt ::total-time) string?
(std/opt ::bpm) string?
Expand Down

0 comments on commit b9e817b

Please sign in to comment.