Add Last.fm music stats to about page

This commit is contained in:
SirBlob committed 2026-11-01 01:54:15 -04:00
1 parent 3122bc4bf9
commit 2d84d68c46
27 files changed
+1618 -4

No files matched your search

+63
View File
@@ -0,0 +1,63 @@
export type ListeningPeriod = 'week' | 'month' | 'year' | 'all';
export interface PlayedTrack {
track: string;
artist: string;
album: string;
url: string;
image: string | null;
playedAt: number | null;
}
export interface CountBucket {
label: string;
title: string;
count: number;
}
export interface ChartItem {
name: string;
artist: string | null;
count: number;
url: string;
image: string | null;
}
export interface TopCharts {
artists: ChartItem[];
albums: ChartItem[];
tracks: ChartItem[];
}
export interface TrendingArtist {
name: string;
url: string;
count: number;
previousCount: number;
}
export interface ListeningTotals {
scrobbles: number;
artists: number;
albums: number;
tracks: number;
}
export interface ListeningProfile {
userName: string;
profileUrl: string;
registeredAt: number | null;
totals: ListeningTotals;
nowPlaying: PlayedTrack | null;
recentTracks: PlayedTrack[];
daily: CountBucket[];
monthly: CountBucket[];
hourly: CountBucket[];
averagePerDay: number;
currentStreak: number;
longestStreak: number;
trending: TrendingArtist[];
top: Record<ListeningPeriod, TopCharts>;
storedScrobbles: number;
syncedAt: number | null;
}