mirror of
https://github.com/koel/koel
synced 2024-11-28 15:00:42 +00:00
Refresh song info after editing
This commit is contained in:
parent
89b8e37880
commit
e12d723e8d
1 changed files with 7 additions and 2 deletions
|
@ -178,7 +178,7 @@ export default {
|
|||
*/
|
||||
getInfo(song, cb = null) {
|
||||
// Check if the song's info has been retrieved before.
|
||||
if (song.lyrics !== null) {
|
||||
if (song.infoRetrieved) {
|
||||
if (cb) {
|
||||
cb();
|
||||
}
|
||||
|
@ -220,6 +220,8 @@ export default {
|
|||
song.album.cover = data.album_info.cover;
|
||||
}
|
||||
|
||||
song.infoRetrieved = true;
|
||||
|
||||
if (cb) {
|
||||
cb();
|
||||
}
|
||||
|
@ -356,9 +358,12 @@ export default {
|
|||
if (artistStore.isArtistEmpty(artistStore.byId(originalArtistId))) {
|
||||
artistStore.remove(artistStore.byId(originalArtistId));
|
||||
}
|
||||
|
||||
// Now we make sure the next call to info() get the refreshed, correct info.
|
||||
originalSong.infoRetrieved = false;
|
||||
}
|
||||
|
||||
return updatedSong;
|
||||
return originalSong;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue