Moving tracks into 'items' database; in_library now pre-populated; Next to add/remove from library

This commit is contained in:
James Barnsley
2020-09-11 22:13:06 +12:00
parent 5953fc84cf
commit f254170b2f
23 changed files with 297 additions and 318 deletions

View File

@ -147,7 +147,7 @@ export function getMe() {
* */
export function getTrackLyrics(uri, path) {
return (dispatch, getState) => {
dispatch(coreActions.trackLoaded({
dispatch(coreActions.itemLoaded({
uri,
lyrics: null,
lyrics_path: null,
@ -187,7 +187,7 @@ export function getTrackLyrics(uri, path) {
lyrics_html = lyrics_html.replace(/(\[)/g, '<span class="mid_grey-text">[');
lyrics_html = lyrics_html.replace(/(\])/g, ']</span>');
dispatch(coreActions.trackLoaded({
dispatch(coreActions.itemLoaded({
uri,
lyrics: lyrics_html,
lyrics_path: path,
@ -232,7 +232,7 @@ export function findTrackLyrics(track = null) {
path: response.hits[i].result.path,
});
}
dispatch(coreActions.trackLoaded({
dispatch(coreActions.itemLoaded({
uri: track.uri,
lyrics_results,
}));