Skip to content

Commit 40c82b3

Browse files
committed
restoring album
1 parent 6e1779d commit 40c82b3

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/main.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async function playSong(song) {
5252
points.setUniform('showMessage', 0);
5353
const audioUrl = URL.createObjectURL(file);
5454
const name = song?.name || file.name;
55-
const title = song?.title || name;
55+
const title = name;
5656

5757
audio && audio.pause() && (audio = null);
5858
audio = points.setAudio('audio', audioUrl, options.volume, false, false);
@@ -133,7 +133,8 @@ async function onCompleteTags(result) {
133133
const { tag, song } = result;
134134
const { file } = song;
135135
const { title, album, picture } = tag.tags;
136-
const name = `${title} - ${album}`
136+
const albumExists = album?` - ${album}`: '';
137+
const name = `${title}${albumExists}`
137138
let artworkImageUrl = null;
138139
let artworkColors = null;
139140

@@ -151,7 +152,7 @@ async function onCompleteTags(result) {
151152
}
152153

153154
song.name = name || file.name;
154-
song.title = title || name;
155+
song.title = name;
155156

156157

157158
if (!song.default) {

0 commit comments

Comments
 (0)