A decentralized music tracking and discovery platform built on AT Protocol 🎵 rocksky.app
spotify atproto lastfm musicbrainz scrobbling listenbrainz

update record types for artist and scrobble functions to use defined interfaces

+3 -8
+3 -8
apps/api/src/nowplaying/nowplaying.service.ts
··· 29 29 agent: Agent 30 30 ): Promise<string | null> { 31 31 const rkey = TID.nextStr(); 32 - const record: { 33 - $type: string; 34 - name: string; 35 - createdAt: string; 36 - pictureUrl?: string; 37 - tags?: string[]; 38 - } = { 32 + const record: Artist.Record = { 39 33 $type: "app.rocksky.artist", 40 34 name: track.albumArtist, 41 35 createdAt: new Date().toISOString(), ··· 166 160 ): Promise<string | null> { 167 161 const rkey = TID.nextStr(); 168 162 169 - const record = { 163 + const record: Scrobble.Record = { 170 164 $type: "app.rocksky.scrobble", 171 165 title: track.title, 172 166 albumArtist: track.albumArtist, ··· 191 185 : new Date().toISOString(), 192 186 spotifyLink: track.spotifyLink ? track.spotifyLink : undefined, 193 187 tags: track.genres || [], 188 + mbid: track.mbId, 194 189 }; 195 190 196 191 if (!Scrobble.validateRecord(record).success) {