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