forked from Keelrleek/SoulStream
Baseline: full tree snapshot after git repository loss
The previous .git directory was found gutted (only info/ remained), so history is unrecoverable locally. This commit restores version control with the tree exactly as it stands: the working app, the preview-tracks launcher on the artist hero, the scrollable-track-previews design bundle (docs + approved mockups), and the Phase 0 validation artifacts.
This commit is contained in:
commit
a667b4b28e
161 files changed
+53170
No files matched your search
@@ -0,0 +1,33 @@
|
||||
//! Live check: MusicBrainz lookup + art fetch.
|
||||
//! cargo run -p metadata --example lookup -- "Nirvana" "Nevermind"
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let artist = std::env::args().nth(1).unwrap_or_else(|| "Nirvana".into());
|
||||
let album = std::env::args()
|
||||
.nth(2)
|
||||
.unwrap_or_else(|| "Nevermind".into());
|
||||
|
||||
let client = metadata::MetadataClient::new();
|
||||
match client.lookup_album(&artist, &album).await {
|
||||
Some(meta) => {
|
||||
println!(
|
||||
"MB: {} — {} ({:?}) mbid={:?}",
|
||||
meta.artist, meta.album, meta.year, meta.release_mbid
|
||||
);
|
||||
match client
|
||||
.fetch_art(
|
||||
meta.release_mbid.as_deref(),
|
||||
meta.release_group_mbid.as_deref(),
|
||||
&meta.artist,
|
||||
&meta.album,
|
||||
)
|
||||
.await
|
||||
{
|
||||
Some(bytes) => println!("ART: {} bytes (starts {:02x?})", bytes.len(), &bytes[..4]),
|
||||
None => println!("ART: none found"),
|
||||
}
|
||||
}
|
||||
None => println!("MB: no match"),
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user