« get me outta code hell

OS-agnostic default music directory - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2020-02-04 22:51:44 -0400
committerFlorrie <towerofnix@gmail.com>2020-02-04 22:51:44 -0400
commit54c0ae40e4cb05f055bd3f7e195bc9308aee2e73 (patch)
tree660ebbfef30857bf4f771b1fd50f6848f3c4f954
parent4923c4d2b06cda8d1ba0710602f205e9cd3d9d5d (diff)
OS-agnostic default music directory
-rw-r--r--client.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/client.js b/client.js
index 50e4a7a..0f7dde3 100644
--- a/client.js
+++ b/client.js
@@ -4,6 +4,7 @@
 
 const AppElement = require('./ui')
 const processSmartPlaylist = require('./smart-playlist')
+const os = require('os')
 
 const {
   ui: {
@@ -68,7 +69,7 @@ const setupClient = async ({backend, writable, interfacer, appConfig}) => {
     comment: (
       '(Add songs and folders to ~/Music to make them show up here,' +
       ' or pass mtui your own playlist.json file!)'),
-    source: ['crawl-local', process.env.HOME + '/Music']
+    source: ['crawl-local', os.homedir() + '/Music']
   }
   grouplike = await processSmartPlaylist(grouplike)
   appElement.tabber.currentElement.loadGrouplike(grouplike)