Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/FoxxMD/multi-scrobbler. Scrobble plays from multiple sources to multiple clients docs.multi-scrobbler.app
deezer docker jellyfin koito lastfm listenbrainz maloja mopidy mpris music music-assistant plex scrobble self-hosted spotify subsonic tautulli youtube-music
Something went wrong. Try again.
1.0 kB · 29 lines
TypeScript
123456789101112131415161718192021222324252627282930import type { MSCache } from "./common/Cache.ts";import type { CovertArtSingletonMap, MusicBrainzSingletonMap } from "./common/vendor/musicbrainz/MusicbrainzTypes.ts";import type { RockskySingletonMap } from "./common/vendor/rocksky/RockskyClientWrapped.ts";
/** * Subset of root container items used by API clients that are (indirectly) constructed by the root container. * * These live outside of ioc.ts so those clients do not need to import the container that imports them (circular import) */export interface RootCommon { version: string cache: () => MSCache mbMap: () => MusicBrainzSingletonMap rsMap: () => RockskySingletonMap caMap: () => CovertArtSingletonMap}
let common: RootCommon | undefined;
export const setRootCommon = (items: RootCommon) => { common = items;}
export const getRootCommon = (): RootCommon => { if (common === undefined) { throw new Error('Root container has not been created yet, call getRoot() from ioc.ts first'); } return common;}