From 3d73a0da45cc8e13b5ac0f58f57683ab2d772838 Mon Sep 17 00:00:00 2001 From: Florrie Date: Fri, 3 Jul 2020 21:29:39 -0300 Subject: make locally opened playlists have a group name! --- smart-playlist.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'smart-playlist.js') diff --git a/smart-playlist.js b/smart-playlist.js index 09badd9..19294db 100644 --- a/smart-playlist.js +++ b/smart-playlist.js @@ -18,6 +18,12 @@ async function processSmartPlaylist(item, topItem = true) { if (crawl) { Object.assign(newItem, await crawl(...args)) + + // If the passed smart playlist had a name, retain that instead of using + // the name resulting from the crawler. + if (item.name) { + newItem.name = item.name + } } else { console.error(`No crawler by name ${name} - skipped item:`, item) newItem.failed = true -- cgit 1.3.0-6-gf8a5