Skip to content

Commit

Permalink
Merge pull request #454 from mroetsc/master
Browse files Browse the repository at this point in the history
fix: update Spotify extended streaming history schema to match new format
  • Loading branch information
Yooooomi authored Nov 24, 2024
2 parents 7620569 + 39053ea commit f9f14f5
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions apps/server/src/tools/importers/full_privacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,10 @@ import {
const fullPrivacyFileSchema = z.array(
z.object({
ts: z.string(),
username: z.string().nullable(),
platform: z.string().nullable(),
ms_played: z.number(),
conn_country: z.string().nullable(),
ip_addr_decrypted: z.string().nullable(),
user_agent_decrypted: z.string().nullable(),
spotify_track_uri: z.string().nullable(),
master_metadata_track_name: z.string().nullable(),
master_metadata_album_artist_name: z.string().nullable(),
master_metadata_album_album_name: z.string().nullable(),
spotify_track_uri: z.string().nullable(),
episode_name: z.string().nullable(),
episode_show_name: z.string().nullable(),
spotify_episode_uri: z.string().nullable(),
reason_start: z.string().nullable(),
reason_end: z.string().nullable(),
shuffle: z.boolean().nullable(),
skipped: z.boolean().nullable(),
offline: z.boolean().nullable(),
offline_timestamp: z.number().nullable(),
incognito_mode: z.boolean().nullable(),
}),
);

Expand Down Expand Up @@ -250,7 +234,7 @@ export class FullPrivacyImporter
);
if (!spotifyId) {
logger.warn(
`Could not get spotify id from uri: ${content.spotify_episode_uri}`,
`Could not get spotify id from uri: ${content.spotify_track_uri}`,
);
continue;
}
Expand Down

0 comments on commit f9f14f5

Please sign in to comment.