tangled
alpha
login
or
join now
t1c.dev
/
rocksky
forked from
rocksky.app/rocksky
2
fork
atom
A decentralized music tracking and discovery platform built on AT Protocol 🎵
2
fork
atom
overview
issues
pulls
pipelines
fix empty mbid in track
tsiry-sandratraina.com
5 months ago
9c1ce408
adc544f5
+12
-12
1 changed file
expand all
collapse all
unified
split
apps
api
src
nowplaying
nowplaying.service.ts
+12
-12
apps/api/src/nowplaying/nowplaying.service.ts
···
609
.limit(1)
610
.then((rows) => rows[0]);
611
0
0
0
0
0
0
0
0
0
0
0
0
612
if (!existingTrack?.uri || !userTrack?.userTrack.uri?.includes(userDid)) {
613
await putSongRecord(track, agent);
614
}
···
820
`Artist uri ready: ${chalk.cyan(existingTrack.id)} - ${track.title}, after ${chalk.magenta(tries)} tries`
821
);
822
}
823
-
824
-
const { data: mbTrack } = await ctx.musicbrainz.post<MusicbrainzTrack>(
825
-
"/hydrate",
826
-
{
827
-
artist: track.artist.split(",").map((a) => ({ name: a.trim() })),
828
-
name: track.title,
829
-
// temporarily disable album to see if it improves matching
830
-
// album: track.album,
831
-
}
832
-
);
833
-
834
-
track.mbId = mbTrack?.trackMBID;
835
836
if (userDid === "did:plc:7vdlgi2bflelz7mmuxoqjfcr" && mbTrack?.trackMBID) {
837
mbTrack.timestamp = track.timestamp
···
609
.limit(1)
610
.then((rows) => rows[0]);
611
612
+
const { data: mbTrack } = await ctx.musicbrainz.post<MusicbrainzTrack>(
613
+
"/hydrate",
614
+
{
615
+
artist: track.artist.split(",").map((a) => ({ name: a.trim() })),
616
+
name: track.title,
617
+
// temporarily disable album to see if it improves matching
618
+
// album: track.album,
619
+
}
620
+
);
621
+
622
+
track.mbId = mbTrack?.trackMBID;
623
+
624
if (!existingTrack?.uri || !userTrack?.userTrack.uri?.includes(userDid)) {
625
await putSongRecord(track, agent);
626
}
···
832
`Artist uri ready: ${chalk.cyan(existingTrack.id)} - ${track.title}, after ${chalk.magenta(tries)} tries`
833
);
834
}
0
0
0
0
0
0
0
0
0
0
0
0
835
836
if (userDid === "did:plc:7vdlgi2bflelz7mmuxoqjfcr" && mbTrack?.trackMBID) {
837
mbTrack.timestamp = track.timestamp