ampache_react/app/models/entities.js
Phyks (Lucas Verney) d8a7d4f66a Rework webplayer
Full rework of webplayer. Webplayer is back to its previous working
state, and ready for further improvements.
2016-08-10 23:50:23 +02:00

23 lines
741 B
JavaScript

/**
* This file defines entities storage models.
*/
// NPM imports
import Immutable from "immutable";
/** Record to store the shared entities. */
export const stateRecord = new Immutable.Record({
isFetching: false, /** Whether API fetching is in progress */
error: null, /** An error string */
refCounts: new Immutable.Map({
album: new Immutable.Map(),
artist: new Immutable.Map(),
song: new Immutable.Map(),
}), /** Map of id => reference count for each object type (garbage collection) */
entities: new Immutable.Map({
album: new Immutable.Map(),
artist: new Immutable.Map(),
song: new Immutable.Map(),
}), /** Map of id => entity for each object type */
});