diff options
author | Florrie <towerofnix@gmail.com> | 2020-07-03 21:29:39 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2020-07-03 21:29:39 -0300 |
commit | 3d73a0da45cc8e13b5ac0f58f57683ab2d772838 (patch) | |
tree | a03a62cc792c127a83592a48d040d65aeab0b21b /smart-playlist.js | |
parent | a58f06407291824be882d896df58bace5e663196 (diff) |
make locally opened playlists have a group name!
Diffstat (limited to 'smart-playlist.js')
-rw-r--r-- | smart-playlist.js | 6 |
1 files changed, 6 insertions, 0 deletions
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 |