Files
ui-agregator/src/data/sample.rs
T
Alexander fcefcc02a0 feat: implement harmony TUI with vim/evil-mode navigation and SPC leader
Full Ratatui implementation of the harmony music library manager prototype:
- 6 tab views (Library 3-pane, Wanted, Queue, History, Calendar, Settings)
- Vim/evil-mode keybindings (hjkl, counts, gg/G, w/b/e, Ctrl-d/u, H/M/L, marks, operator-pending)
- SPC leader key with which-key popup (Doom Emacs style)
- Command mode (:q, :theme, :help) and / search filter
- Help and quit confirmation modals
- Toast notification system with auto-dismiss
- Gruvbox dark theme throughout
2026-05-08 13:26:09 +02:00

263 lines
21 KiB
Rust

use super::models::*;
pub fn sample_artists() -> Vec<Artist> {
vec![
Artist {
id: "bcnr".into(),
name: "Black Country, New Road".into(),
country: "UK".into(),
genres: vec!["Post-rock".into(), "Avant-prog".into(), "Chamber".into()],
monitored: true,
path: "/music/B/Black Country New Road".into(),
quality: "FLAC".into(),
size_gb: 3.2,
albums: vec![
Album { id: "ftft".into(), title: "For the first time".into(), year: 2021, album_type: "Album".into(), monitored: true, total: 6, have: 6, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "afut".into(), title: "Ants From Up There".into(), year: 2022, album_type: "Album".into(), monitored: true, total: 10, have: 10, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "bush".into(), title: "Live at Bush Hall".into(), year: 2023, album_type: "Live".into(), monitored: true, total: 9, have: 5, quality: "FLAC".into(), status: AlbumStatus::Partial },
Album { id: "fhwl".into(), title: "Forever Howlong".into(), year: 2025, album_type: "Album".into(), monitored: true, total: 12, have: 0, quality: "".into(), status: AlbumStatus::Wanted },
],
},
Artist {
id: "rad".into(),
name: "Radiohead".into(),
country: "UK".into(),
genres: vec!["Alt-rock".into(), "Electronic".into(), "Art-rock".into()],
monitored: true,
path: "/music/R/Radiohead".into(),
quality: "FLAC".into(),
size_gb: 8.7,
albums: vec![
Album { id: "okc".into(), title: "OK Computer".into(), year: 1997, album_type: "Album".into(), monitored: true, total: 12, have: 12, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "kida".into(), title: "Kid A".into(), year: 2000, album_type: "Album".into(), monitored: true, total: 10, have: 10, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "amne".into(), title: "Amnesiac".into(), year: 2001, album_type: "Album".into(), monitored: true, total: 11, have: 11, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "htft".into(), title: "Hail to the Thief".into(), year: 2003, album_type: "Album".into(), monitored: true, total: 14, have: 14, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "rain".into(), title: "In Rainbows".into(), year: 2007, album_type: "Album".into(), monitored: true, total: 10, have: 10, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "kol".into(), title: "The King of Limbs".into(), year: 2011, album_type: "Album".into(), monitored: true, total: 8, have: 8, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "moon".into(), title: "A Moon Shaped Pool".into(), year: 2016, album_type: "Album".into(), monitored: true, total: 11, have: 11, quality: "FLAC".into(), status: AlbumStatus::Complete },
],
},
Artist {
id: "ken".into(),
name: "Kendrick Lamar".into(),
country: "US".into(),
genres: vec!["Hip-hop".into(), "Conscious".into()],
monitored: true,
path: "/music/K/Kendrick Lamar".into(),
quality: "FLAC > MP3 320".into(),
size_gb: 4.1,
albums: vec![
Album { id: "skd".into(), title: "Section.80".into(), year: 2011, album_type: "Album".into(), monitored: true, total: 16, have: 16, quality: "MP3".into(), status: AlbumStatus::Complete },
Album { id: "gkmc".into(), title: "good kid, m.A.A.d city".into(), year: 2012, album_type: "Album".into(), monitored: true, total: 12, have: 12, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "tpab".into(), title: "To Pimp a Butterfly".into(), year: 2015, album_type: "Album".into(), monitored: true, total: 16, have: 16, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "damn".into(), title: "DAMN.".into(), year: 2017, album_type: "Album".into(), monitored: true, total: 14, have: 14, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "mmbs".into(), title: "Mr. Morale & The Big Steppers".into(), year: 2022, album_type: "Album".into(), monitored: true, total: 18, have: 14, quality: "FLAC".into(), status: AlbumStatus::Partial },
Album { id: "gnx".into(), title: "GNX".into(), year: 2024, album_type: "Album".into(), monitored: true, total: 12, have: 0, quality: "".into(), status: AlbumStatus::Wanted },
],
},
Artist {
id: "tame".into(),
name: "Tame Impala".into(),
country: "AU".into(),
genres: vec!["Psychedelic".into(), "Synth-pop".into()],
monitored: true,
path: "/music/T/Tame Impala".into(),
quality: "FLAC".into(),
size_gb: 2.9,
albums: vec![
Album { id: "inrn".into(), title: "Innerspeaker".into(), year: 2010, album_type: "Album".into(), monitored: true, total: 11, have: 11, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "lonr".into(), title: "Lonerism".into(), year: 2012, album_type: "Album".into(), monitored: true, total: 12, have: 12, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "curr".into(), title: "Currents".into(), year: 2015, album_type: "Album".into(), monitored: true, total: 13, have: 13, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "slow".into(), title: "The Slow Rush".into(), year: 2020, album_type: "Album".into(), monitored: true, total: 12, have: 12, quality: "FLAC".into(), status: AlbumStatus::Complete },
],
},
Artist {
id: "fka".into(),
name: "FKA twigs".into(),
country: "UK".into(),
genres: vec!["Art-pop".into(), "R&B".into(), "Electronic".into()],
monitored: true,
path: "/music/F/FKA twigs".into(),
quality: "FLAC".into(),
size_gb: 1.8,
albums: vec![
Album { id: "lp1".into(), title: "LP1".into(), year: 2014, album_type: "Album".into(), monitored: true, total: 10, have: 10, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "magd".into(), title: "MAGDALENE".into(), year: 2019, album_type: "Album".into(), monitored: true, total: 9, have: 9, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "caps".into(), title: "CAPRISONGS".into(), year: 2022, album_type: "Mixtape".into(), monitored: false, total: 17, have: 0, quality: "".into(), status: AlbumStatus::Unmonitored },
Album { id: "evt".into(), title: "EUSEXUA".into(), year: 2025, album_type: "Album".into(), monitored: true, total: 11, have: 11, quality: "FLAC".into(), status: AlbumStatus::Complete },
],
},
Artist {
id: "mit".into(),
name: "Mitski".into(),
country: "US".into(),
genres: vec!["Indie rock".into(), "Art-pop".into()],
monitored: true,
path: "/music/M/Mitski".into(),
quality: "FLAC".into(),
size_gb: 2.4,
albums: vec![
Album { id: "bitc".into(), title: "Bury Me at Makeout Creek".into(), year: 2014, album_type: "Album".into(), monitored: true, total: 10, have: 10, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "puby".into(), title: "Puberty 2".into(), year: 2016, album_type: "Album".into(), monitored: true, total: 11, have: 11, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "bhdc".into(), title: "Be the Cowboy".into(), year: 2018, album_type: "Album".into(), monitored: true, total: 14, have: 14, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "lhdh".into(), title: "Laurel Hell".into(), year: 2022, album_type: "Album".into(), monitored: true, total: 11, have: 11, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "tlid".into(), title: "The Land Is Inhospitable...".into(), year: 2023, album_type: "Album".into(), monitored: true, total: 11, have: 7, quality: "FLAC".into(), status: AlbumStatus::Partial },
],
},
Artist {
id: "phbr".into(),
name: "Phoebe Bridgers".into(),
country: "US".into(),
genres: vec!["Indie folk".into(), "Singer-songwriter".into()],
monitored: true,
path: "/music/P/Phoebe Bridgers".into(),
quality: "FLAC".into(),
size_gb: 1.1,
albums: vec![
Album { id: "stge".into(), title: "Stranger in the Alps".into(), year: 2017, album_type: "Album".into(), monitored: true, total: 11, have: 11, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "punr".into(), title: "Punisher".into(), year: 2020, album_type: "Album".into(), monitored: true, total: 11, have: 11, quality: "FLAC".into(), status: AlbumStatus::Complete },
],
},
Artist {
id: "vw".into(),
name: "Vampire Weekend".into(),
country: "US".into(),
genres: vec!["Indie rock".into(), "Baroque pop".into()],
monitored: true,
path: "/music/V/Vampire Weekend".into(),
quality: "FLAC".into(),
size_gb: 2.0,
albums: vec![
Album { id: "vw1".into(), title: "Vampire Weekend".into(), year: 2008, album_type: "Album".into(), monitored: true, total: 11, have: 11, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "cont".into(), title: "Contra".into(), year: 2010, album_type: "Album".into(), monitored: true, total: 10, have: 10, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "moav".into(), title: "Modern Vampires...".into(), year: 2013, album_type: "Album".into(), monitored: true, total: 12, have: 12, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "fofb".into(), title: "Father of the Bride".into(), year: 2019, album_type: "Album".into(), monitored: true, total: 18, have: 18, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "ognc".into(), title: "Only God Was Above Us".into(), year: 2024, album_type: "Album".into(), monitored: true, total: 10, have: 10, quality: "FLAC".into(), status: AlbumStatus::Complete },
],
},
Artist {
id: "bigt".into(),
name: "Big Thief".into(),
country: "US".into(),
genres: vec!["Indie folk".into()],
monitored: true,
path: "/music/B/Big Thief".into(),
quality: "FLAC".into(),
size_gb: 3.6,
albums: vec![
Album { id: "mskc".into(), title: "Masterpiece".into(), year: 2016, album_type: "Album".into(), monitored: true, total: 11, have: 11, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "cap".into(), title: "Capacity".into(), year: 2017, album_type: "Album".into(), monitored: true, total: 11, have: 11, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "uffp".into(), title: "U.F.O.F.".into(), year: 2019, album_type: "Album".into(), monitored: true, total: 12, have: 12, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "twoh".into(), title: "Two Hands".into(), year: 2019, album_type: "Album".into(), monitored: true, total: 10, have: 10, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "ddiy".into(), title: "Dragon New Warm Mountain...".into(), year: 2022, album_type: "Album".into(), monitored: true, total: 20, have: 14, quality: "FLAC".into(), status: AlbumStatus::Partial },
],
},
Artist {
id: "carp".into(),
name: "Caroline Polachek".into(),
country: "US".into(),
genres: vec!["Art-pop".into()],
monitored: true,
path: "/music/C/Caroline Polachek".into(),
quality: "FLAC".into(),
size_gb: 0.9,
albums: vec![
Album { id: "panc".into(), title: "Pang".into(), year: 2019, album_type: "Album".into(), monitored: true, total: 14, have: 14, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "dsrt".into(), title: "Desire, I Want to Turn Into You".into(), year: 2023, album_type: "Album".into(), monitored: true, total: 12, have: 12, quality: "FLAC".into(), status: AlbumStatus::Complete },
],
},
Artist {
id: "nat".into(),
name: "The National".into(),
country: "US".into(),
genres: vec!["Indie rock".into()],
monitored: false,
path: "/music/T/The National".into(),
quality: "MP3 320".into(),
size_gb: 2.2,
albums: vec![
Album { id: "boxer".into(), title: "Boxer".into(), year: 2007, album_type: "Album".into(), monitored: true, total: 12, have: 12, quality: "MP3".into(), status: AlbumStatus::Complete },
Album { id: "hvcc".into(), title: "High Violet".into(), year: 2010, album_type: "Album".into(), monitored: true, total: 11, have: 11, quality: "MP3".into(), status: AlbumStatus::Complete },
Album { id: "tbtb".into(), title: "Trouble Will Find Me".into(), year: 2013, album_type: "Album".into(), monitored: false, total: 13, have: 0, quality: "".into(), status: AlbumStatus::Unmonitored },
],
},
Artist {
id: "stv".into(),
name: "St. Vincent".into(),
country: "US".into(),
genres: vec!["Art-rock".into()],
monitored: true,
path: "/music/S/St. Vincent".into(),
quality: "FLAC".into(),
size_gb: 2.7,
albums: vec![
Album { id: "marr".into(), title: "Marry Me".into(), year: 2007, album_type: "Album".into(), monitored: true, total: 13, have: 13, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "actr".into(), title: "Actor".into(), year: 2009, album_type: "Album".into(), monitored: true, total: 11, have: 11, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "sssv".into(), title: "St. Vincent".into(), year: 2014, album_type: "Album".into(), monitored: true, total: 11, have: 11, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "mads".into(), title: "MASSEDUCTION".into(), year: 2017, album_type: "Album".into(), monitored: true, total: 13, have: 13, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "dhft".into(), title: "Daddy's Home".into(), year: 2021, album_type: "Album".into(), monitored: true, total: 11, have: 11, quality: "FLAC".into(), status: AlbumStatus::Complete },
Album { id: "alai".into(), title: "All Born Screaming".into(), year: 2024, album_type: "Album".into(), monitored: true, total: 10, have: 10, quality: "FLAC".into(), status: AlbumStatus::Complete },
],
},
]
}
pub fn sample_tracks_bush_hall() -> Vec<Track> {
vec![
Track { number: 1, title: "Up Song".into(), duration: "4:24".into(), have: true, quality: "FLAC".into() },
Track { number: 2, title: "The Boy".into(), duration: "3:01".into(), have: true, quality: "FLAC".into() },
Track { number: 3, title: "I Won't Always Love You".into(), duration: "5:13".into(), have: false, quality: "".into() },
Track { number: 4, title: "Across the Pond Friend".into(), duration: "6:48".into(), have: true, quality: "FLAC".into() },
Track { number: 5, title: "Laughing Song".into(), duration: "5:02".into(), have: false, quality: "".into() },
Track { number: 6, title: "The Wrong Trousers".into(), duration: "4:39".into(), have: true, quality: "FLAC".into() },
Track { number: 7, title: "Turbines / Pigs".into(), duration: "9:22".into(), have: true, quality: "FLAC".into() },
Track { number: 8, title: "Dancers".into(), duration: "5:55".into(), have: false, quality: "".into() },
Track { number: 9, title: "Up Song (Reprise)".into(), duration: "1:33".into(), have: false, quality: "".into() },
]
}
pub fn sample_wanted() -> Vec<WantedEntry> {
vec![
WantedEntry { id: "w1".into(), artist: "Black Country, New Road".into(), album: "Forever Howlong".into(), year: 2025, missing: 12, release_date: "2025-04-04".into(), status: AlbumStatus::Wanted },
WantedEntry { id: "w2".into(), artist: "Kendrick Lamar".into(), album: "GNX".into(), year: 2024, missing: 12, release_date: "2024-11-22".into(), status: AlbumStatus::Wanted },
WantedEntry { id: "w3".into(), artist: "Black Country, New Road".into(), album: "Live at Bush Hall".into(), year: 2023, missing: 4, release_date: "2023-03-31".into(), status: AlbumStatus::Partial },
WantedEntry { id: "w4".into(), artist: "Kendrick Lamar".into(), album: "Mr. Morale...".into(), year: 2022, missing: 4, release_date: "2022-05-13".into(), status: AlbumStatus::Partial },
WantedEntry { id: "w5".into(), artist: "Mitski".into(), album: "The Land Is...".into(), year: 2023, missing: 4, release_date: "2023-09-15".into(), status: AlbumStatus::Partial },
WantedEntry { id: "w6".into(), artist: "Big Thief".into(), album: "Dragon New Warm...".into(), year: 2022, missing: 6, release_date: "2022-02-11".into(), status: AlbumStatus::Partial },
]
}
pub fn sample_queue() -> Vec<QueueEntry> {
vec![
QueueEntry { id: "q1".into(), title: "Forever Howlong".into(), artist: "Black Country, New Road".into(), indexer: "redacted.ch".into(), size: "412 MB".into(), progress: 0.73, eta: "0:42".into(), speed: "8.1 MB/s".into(), client: "qbittorrent".into() },
QueueEntry { id: "q2".into(), title: "GNX".into(), artist: "Kendrick Lamar".into(), indexer: "orpheus.network".into(), size: "284 MB".into(), progress: 0.41, eta: "1:18".into(), speed: "3.4 MB/s".into(), client: "qbittorrent".into() },
QueueEntry { id: "q3".into(), title: "Bush Hall (4 trk)".into(), artist: "Black Country, New Road".into(), indexer: "redacted.ch".into(), size: "98 MB".into(), progress: 0.92, eta: "0:08".into(), speed: "11.2 MB/s".into(), client: "qbittorrent".into() },
]
}
pub fn sample_history() -> Vec<HistoryEntry> {
vec![
HistoryEntry { when: "12:04".into(), event: "imported".into(), artist: "Vampire Weekend".into(), detail: "Only God Was Above Us - 10/10 FLAC".into() },
HistoryEntry { when: "11:58".into(), event: "downloaded".into(), artist: "Vampire Weekend".into(), detail: "Only God Was Above Us - redacted.ch - 348 MB".into() },
HistoryEntry { when: "11:42".into(), event: "grabbed".into(), artist: "Vampire Weekend".into(), detail: "Only God Was Above Us [WEB FLAC]".into() },
HistoryEntry { when: "11:40".into(), event: "search".into(), artist: "Vampire Weekend".into(), detail: "manual search - 14 results".into() },
HistoryEntry { when: "10:31".into(), event: "imported".into(), artist: "St. Vincent".into(), detail: "All Born Screaming - 10/10 FLAC".into() },
HistoryEntry { when: "10:24".into(), event: "downloaded".into(), artist: "St. Vincent".into(), detail: "All Born Screaming - orpheus.network - 412 MB".into() },
HistoryEntry { when: "09:12".into(), event: "grabbed".into(), artist: "Caroline Polachek".into(), detail: "Desire, I Want... [WEB FLAC]".into() },
HistoryEntry { when: "yesterday".into(), event: "refreshed".into(), artist: "Library".into(), detail: "scanned 18 artists - 62 albums - 0 changes".into() },
HistoryEntry { when: "yesterday".into(), event: "imported".into(), artist: "Tame Impala".into(), detail: "The Slow Rush - 12/12 FLAC".into() },
HistoryEntry { when: "yesterday".into(), event: "failed".into(), artist: "Mitski".into(), detail: "release rejected - audio quality below cutoff".into() },
]
}
pub fn sample_calendar() -> Vec<CalendarEntry> {
vec![
CalendarEntry { date: "2026-05-09".into(), artist: "Phoebe Bridgers".into(), album: "TBD".into(), status: "announced".into(), entry_type: "Album".into() },
CalendarEntry { date: "2026-05-15".into(), artist: "Tame Impala".into(), album: "Deadbeat".into(), status: "monitored".into(), entry_type: "Album".into() },
CalendarEntry { date: "2026-05-22".into(), artist: "FKA twigs".into(), album: "EUSEXUA Afterglow EP".into(), status: "monitored".into(), entry_type: "EP".into() },
CalendarEntry { date: "2026-06-03".into(), artist: "Big Thief".into(), album: "(unannounced)".into(), status: "announced".into(), entry_type: "Album".into() },
CalendarEntry { date: "2026-06-14".into(), artist: "Mitski".into(), album: "Live at the Met".into(), status: "monitored".into(), entry_type: "Live".into() },
CalendarEntry { date: "2026-07-01".into(), artist: "Caroline Polachek".into(), album: "Pang Reissue".into(), status: "monitored".into(), entry_type: "Reissue".into() },
]
}