Skip to content

Commit

Permalink
hello world gui
Browse files Browse the repository at this point in the history
  • Loading branch information
danbulant committed Oct 14, 2024
1 parent 10e0877 commit 2963da1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 2963da1

Please sign in to comment.