Add functions to get top/recent songs and artists from history

This commit is contained in:
2024-11-01 13:05:47 -04:00
parent f1e177c7b0
commit 23bfb510c1
2 changed files with 245 additions and 0 deletions

View File

@ -1,10 +1,12 @@
use crate::models::{Album, Artist, Song};
use serde::{Serialize, Deserialize};
use time::Date;
/// Holds information about a song
///
/// Intended to be used in the front-end, as it includes artist and album objects, rather than just their ids.
#[derive(Serialize, Deserialize)]
pub struct SongData {
/// Song id
pub id: i32,