« get me outta code hell

http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
path: root/src/loop-play.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/loop-play.js')
-rw-r--r--src/loop-play.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/loop-play.js b/src/loop-play.js
index 810d1c6..5d0048b 100644
--- a/src/loop-play.js
+++ b/src/loop-play.js
@@ -13,13 +13,16 @@ const FIFO = require('fifo-js')
 const EventEmitter = require('events')
 const promisifyProcess = require('./promisify-process')
 const killProcess = require('./kill-process')
-const { getItemPathString, safeUnlink } = require('./playlist-utils')
 const { HistoryController, generalPicker } = require('./pickers')
 
 const {
   getDownloaderFor, byName: downloadersByName, makeConverter
 } = require('./downloaders')
 
+const {
+  getItemPathString, safeUnlink, parentSymbol
+} = require('./playlist-utils')
+
 class Player {
   constructor() {
     this.disablePlaybackStatus = false
@@ -499,7 +502,7 @@ class PlayController extends EventEmitter {
     const getColorMessage = t => {
       if (!t) return '\x1b[2m(No track)\x1b[0m'
 
-      const path = getItemPathString(t)
+      const path = getItemPathString(t[parentSymbol])
 
       return (
         `\x1b[1m${t.name} \x1b[0m@ ${path} \x1b[2m(${t.downloaderArg})\x1b[0m`
@@ -509,7 +512,7 @@ class PlayController extends EventEmitter {
     const getCleanMessage = t => {
       if (!t) return '(No track)'
 
-      const path = getItemPathString(t)
+      const path = getItemPathString(t[parentSymbol])
 
       return `${t.name} @ ${path}`
     }