A music player that connects to your cloud/distributed storage.
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Closes #253

+9 -4
+9 -4
src/Javascript/processing.js
··· 86 86 Object.assign({}, parserConfiguration, options || {}) 87 87 ) 88 88 }) 89 - .then(pickTags) 89 + .then(result => { 90 + return pickTags(filename, result) 91 + }) 90 92 .catch(err => { 91 93 console.error(err) 92 94 return fallbackTags(filename) ··· 94 96 } 95 97 96 98 97 - function pickTags(result) { 99 + function pickTags(filename, result) { 98 100 const tags = result && result.common 99 101 if (!tags) return null 100 102 103 + const artist = tags.artist && tags.artist.length ? tags.artist : null 104 + const title = tags.title && tags.title.length ? tags.title : null 105 + 101 106 return { 102 107 disc: tags.disk.no || 1, 103 108 nr: tags.track.no || 1, 104 109 album: tags.album && tags.album.length ? tags.album : "Unknown", 105 - artist: tags.artist && tags.artist.length ? tags.artist : "Unknown", 106 - title: tags.title && tags.title.length ? tags.title : "Unknown", 110 + artist: artist || "Unknown", 111 + title: title ? title : (artist ? "Unknown" : filename.replace(/\.\w+$/, "")), 107 112 genre: (tags.genre && tags.genre[0]) || null, 108 113 year: tags.year || null, 109 114 picture: tags.picture ? tags.picture[0] : null