[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
0

Configure Feed

Select the types of activity you want to include in your feed.

feat(koito): Add koito types/config

FoxxMD (Jul 9, 2025, 1:12 PM UTC) 375c0123 76900241

+74 -6
+4 -2
src/backend/common/infrastructure/Atomic.ts
··· 67 67 export type ClientType = 68 68 'maloja' 69 69 | 'lastfm' 70 - | 'listenbrainz'; 70 + | 'listenbrainz' 71 + | 'koito'; 71 72 export const clientTypes: ClientType[] = [ 72 73 'maloja', 73 74 'lastfm', 74 - 'listenbrainz' 75 + 'listenbrainz', 76 + 'koito' 75 77 ]; 76 78 export const isClientType = (data: string): data is ClientType => { 77 79 return clientTypes.includes(data as ClientType);
+3 -2
src/backend/common/infrastructure/config/client/clients.ts
··· 1 + import { KoitoClientAIOConfig, KoitoClientConfig } from "./koito.js"; 1 2 import { LastfmClientAIOConfig, LastfmClientConfig } from "./lastfm.js"; 2 3 import { ListenBrainzClientAIOConfig, ListenBrainzClientConfig } from "./listenbrainz.js"; 3 4 import { MalojaClientAIOConfig, MalojaClientConfig } from "./maloja.js"; 4 5 5 - export type ClientConfig = MalojaClientConfig | LastfmClientConfig | ListenBrainzClientConfig; 6 + export type ClientConfig = MalojaClientConfig | LastfmClientConfig | ListenBrainzClientConfig | KoitoClientConfig; 6 7 7 - export type ClientAIOConfig = MalojaClientAIOConfig | LastfmClientAIOConfig | ListenBrainzClientAIOConfig; 8 + export type ClientAIOConfig = MalojaClientAIOConfig | LastfmClientAIOConfig | ListenBrainzClientAIOConfig | KoitoClientAIOConfig;
+40
src/backend/common/infrastructure/config/client/koito.ts
··· 1 + import { RequestRetryOptions } from "../common.js" 2 + import { CommonClientConfig, CommonClientData } from "./index.js" 3 + 1 4 export interface ListensResponse { 2 5 items: ListenObjectResponse[] 3 6 total_record_count: number ··· 27 30 export interface ArtistResponse { 28 31 id: number 29 32 name: string 33 + } 34 + 35 + export interface KoitoData extends RequestRetryOptions { 36 + /** 37 + * URL for the Koito server 38 + * 39 + * @examples ["http://192.168.0.100:4110"] 40 + * */ 41 + url: string 42 + /** 43 + * User token for the user to scrobble for 44 + * 45 + * @examples ["pM195xPV98CDpk0QW47FIIOR8AKATAX5DblBF-Jq0t1MbbKL"] 46 + * */ 47 + token: string 48 + 49 + /** 50 + * Username of the user to scrobble for 51 + * */ 52 + username: string 53 + } 54 + 55 + export interface KoitoClientData extends KoitoData, CommonClientData {} 56 + 57 + export interface KoitoClientConfig extends CommonClientConfig { 58 + /** 59 + * Should always be `client` when using Koito as a client 60 + * 61 + * @default client 62 + * @examples ["client"] 63 + * */ 64 + configureAs?: 'client' | 'source' 65 + data: KoitoClientData 66 + } 67 + 68 + export interface KoitoClientAIOConfig extends KoitoClientConfig { 69 + type: 'koito' 30 70 }
+22
src/backend/common/infrastructure/config/source/koito.ts
··· 1 + import { KoitoData } from "../client/koito.js"; 2 + import { ListenBrainzData } from "../client/listenbrainz.js"; 3 + import { PollingOptions } from "../common.js"; 4 + import { CommonSourceConfig, CommonSourceData } from "./index.js"; 5 + 6 + export interface KoitoSourceData extends KoitoData, CommonSourceData, PollingOptions { 7 + } 8 + 9 + export interface KoitoSourceConfig extends CommonSourceConfig { 10 + /** 11 + * When used in `koito.config` this tells multi-scrobbler whether to use this data to configure a source or client. 12 + * 13 + * @default source 14 + * @examples ["source"] 15 + * */ 16 + configureAs?: 'source' 17 + data: KoitoSourceData 18 + } 19 + 20 + export interface KoitoSourceAIOConfig extends KoitoSourceConfig { 21 + type: 'koito' 22 + }
+5 -2
src/backend/common/infrastructure/config/source/sources.ts
··· 21 21 import { WebScrobblerSourceAIOConfig, WebScrobblerSourceConfig } from "./webscrobbler.js"; 22 22 import { YTMusicSourceAIOConfig, YTMusicSourceConfig } from "./ytmusic.js"; 23 23 import { IcecastSourceAIOConfig, IcecastSourceConfig } from "./icecast.js"; 24 + import { KoitoSourceAIOConfig, KoitoSourceConfig } from "./koito.js"; 24 25 25 26 26 27 export type SourceConfig = ··· 49 50 | MPDSourceConfig 50 51 | VLCSourceConfig 51 52 | IcecastSourceConfig 52 - | AzuracastSourceConfig; 53 + | AzuracastSourceConfig 54 + | KoitoSourceConfig; 53 55 54 56 export type SourceAIOConfig = 55 57 SpotifySourceAIOConfig ··· 77 79 | MPDSourceAIOConfig 78 80 | VLCSourceAIOConfig 79 81 | IcecastSourceAIOConfig 80 - | AzuracastSourceAIOConfig; 82 + | AzuracastSourceAIOConfig 83 + | KoitoSourceAIOConfig;