mirror of
https://github.com/danbulant/despot
synced 2026-05-19 03:58:32 +00:00
hello world gui
This commit is contained in:
parent
10e0877d51
commit
2963da1634
1 changed files with 8 additions and 2 deletions
10
src/main.rs
10
src/main.rs
|
|
@ -4,7 +4,7 @@ use api::SpotifyContext;
|
|||
use auth::get_token;
|
||||
use clap::Parser;
|
||||
use cli::Args;
|
||||
use cushy::{PendingApp, Run, TokioRuntime};
|
||||
use cushy::{window::MakeWindow, Application, Open, PendingApp, Run, TokioRuntime};
|
||||
use librespot_core::{authentication::Credentials, Session, SessionConfig};
|
||||
use librespot_playback::{audio_backend, config::{AudioFormat, PlayerConfig}, mixer::NoOpVolume, player::Player};
|
||||
|
||||
|
|
@ -58,9 +58,15 @@ fn main() -> cushy::Result {
|
|||
|
||||
let context = SpotifyContext::new(session, token);
|
||||
|
||||
let mut app = app.as_app();
|
||||
tokio::spawn(async move {
|
||||
let user = context.current_user().await.unwrap();
|
||||
dbg!(user);
|
||||
dbg!(&user);
|
||||
let userid = user.id;
|
||||
|
||||
format!("Hello, {}!", user.display_name.unwrap())
|
||||
.make_window()
|
||||
.open(&mut app).unwrap();
|
||||
});
|
||||
|
||||
drop(guard);
|
||||
|
|
|
|||
Loading…
Reference in a new issue