« get me outta code hell

Prefer album artist over artist in iTunes crawler - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorliam4 <towerofnix@gmail.com>2017-07-20 16:00:35 -0300
committerliam4 <towerofnix@gmail.com>2017-07-20 16:00:35 -0300
commit2680ea9126499fb775b699f1dbd4ac9aacbc4e4a (patch)
tree3effd2dda6c682886787285858f19632c13f6635
parent4bb2bcf5018d7a3e76de3df74c176f4330b19dbe (diff)
Prefer album artist over artist in iTunes crawler
-rwxr-xr-xsrc/crawl-itunes.js3
-rw-r--r--todo.txt5
2 files changed, 7 insertions, 1 deletions
diff --git a/src/crawl-itunes.js b/src/crawl-itunes.js
index 8e07165..5cc1b55 100755
--- a/src/crawl-itunes.js
+++ b/src/crawl-itunes.js
@@ -66,7 +66,8 @@ async function crawl(libraryXML) {
     album = album && album.val
     album = album || 'Unknown Album'
 
-    let artist = getDictValue(trackDict, 'Artist')
+    let artist = getDictValue(trackDict, 'Album Artist')
+    artist = artist || getDictValue(trackDict, 'Artist')
     artist = artist && artist.val
     artist = artist || 'Unknown Artist'
 
diff --git a/todo.txt b/todo.txt
index a65ad2f..d74bf4b 100644
--- a/todo.txt
+++ b/todo.txt
@@ -218,3 +218,8 @@ TODO: Figure out how man pages work, and update the syntax in those files.
       more consistent, and figure out when to use '\-' or '-'.
 
 TODO: Fix skip up-next..!
+
+TODO: Make iTunes crawler prefer album artist over artist.
+      (Done!)
+
+TODO: Make iTunes crawler take into account track numbers.