Adding generic loadItem (refactor elsewhere); Adding foundation for Add Random

This commit is contained in:
James Barnsley
2020-08-03 07:08:16 +12:00
parent 8824d7a5d6
commit e398949a06
14 changed files with 690 additions and 460 deletions

View File

@ -115,6 +115,14 @@ export function cachebustHttpStream() {
* relevant service to load the record - all from one neat package.
* */
export function loadItem(uri, force_reload = false) {
return {
type: 'LOAD_ITEM',
uri,
force_reload,
};
}
export function loadTrack(uri, force_reload = false) {
return {
type: 'LOAD_TRACK',
@ -249,6 +257,14 @@ export function removeFromIndex(index_name, key, new_key = null) {
};
}
export function viewDataLoaded(name, data) {
return {
type: 'VIEW_DATA_LOADED',
name,
data,
};
}
/**
* Playlist manipulation