mirror of
https://github.com/koel/koel
synced 2025-02-26 12:17:12 +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) {
|
getInfo(song, cb = null) {
|
||||||
// Check if the song's info has been retrieved before.
|
// Check if the song's info has been retrieved before.
|
||||||
if (song.lyrics !== null) {
|
if (song.infoRetrieved) {
|
||||||
if (cb) {
|
if (cb) {
|
||||||
cb();
|
cb();
|
||||||
}
|
}
|
||||||
|
@ -220,6 +220,8 @@ export default {
|
||||||
song.album.cover = data.album_info.cover;
|
song.album.cover = data.album_info.cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
song.infoRetrieved = true;
|
||||||
|
|
||||||
if (cb) {
|
if (cb) {
|
||||||
cb();
|
cb();
|
||||||
}
|
}
|
||||||
|
@ -356,9 +358,12 @@ export default {
|
||||||
if (artistStore.isArtistEmpty(artistStore.byId(originalArtistId))) {
|
if (artistStore.isArtistEmpty(artistStore.byId(originalArtistId))) {
|
||||||
artistStore.remove(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…
Add table
Reference in a new issue