From 1b5d6f8f96baae53367a7a7d0f9485a42029eaa3 Mon Sep 17 00:00:00 2001 From: Florrie Date: Fri, 16 Feb 2018 11:02:51 -0400 Subject: Make --track-display-file show SOURCE path to track This also means we're keeping track of the source item of items, which is sure to be useful more later. --- src/loop-play.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/loop-play.js') diff --git a/src/loop-play.js b/src/loop-play.js index e82e77e..83cbcfe 100644 --- a/src/loop-play.js +++ b/src/loop-play.js @@ -23,7 +23,7 @@ const { } = require('./downloaders') const { - getItemPathString, safeUnlink, parentSymbol + getItemPathString, safeUnlink, parentSymbol, sourceSymbol } = require('./playlist-utils') function createStatusLine({percentStr, curStr, lenStr}) { @@ -450,7 +450,9 @@ class PlayController extends EventEmitter { if (next) { if (this.trackDisplayFile) { - await writeFile(this.trackDisplayFile, getItemPathString(this.currentTrack)) + await writeFile(this.trackDisplayFile, + getItemPathString(this.currentTrack[sourceSymbol]) + ) } await this.playFile(next) -- cgit 1.3.0-6-gf8a5