« get me outta code hell

Fix a bug where you couldn't --exclude groups added by a smart playlist - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2017-09-23 10:42:04 -0300
committerFlorrie <towerofnix@gmail.com>2017-09-23 10:42:04 -0300
commit8d99a28e2466c43ec554904ef90d09109f2c1004 (patch)
tree79c7193928fb4a4be7f8a99a464d7650e154943a /src
parent6fea30c21dc4642ca1043a45f8f87a9cef5726d4 (diff)
Fix a bug where you couldn't --exclude groups added by a smart playlist
Diffstat (limited to 'src')
-rwxr-xr-xsrc/play.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/play.js b/src/play.js
index c27d2f3..8b051ac 100755
--- a/src/play.js
+++ b/src/play.js
@@ -125,11 +125,16 @@ async function main(args) {
     // We also want to de-smart-ify (stupidify? - simplify?) the playlist.
     const processedPlaylist = await processSmartPlaylist(openedPlaylist)
 
+    // ..And finally, we have to update the playlist format again, since
+    // processSmartPlaylist might have added new (un-updated) items:
+    const finalPlaylist = updatePlaylistFormat(processedPlaylist)
+
+    sourcePlaylist = finalPlaylist
+
     // The active playlist is a clone of the source playlist; after all it's
     // quite possible we'll be messing with the value of the active playlist,
     // and we don't want to reflect those changes in the source playlist.
-    sourcePlaylist = processedPlaylist
-    activePlaylist = clone(processedPlaylist)
+    activePlaylist = clone(sourcePlaylist)
 
     await processArgv(processedPlaylist.options, optionFunctions)
   }