mirror of
https://github.com/danbulant/despot
synced 2026-07-05 11:00:53 +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 auth::get_token;
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use cli::Args;
|
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_core::{authentication::Credentials, Session, SessionConfig};
|
||||||
use librespot_playback::{audio_backend, config::{AudioFormat, PlayerConfig}, mixer::NoOpVolume, player::Player};
|
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 context = SpotifyContext::new(session, token);
|
||||||
|
|
||||||
|
let mut app = app.as_app();
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
let user = context.current_user().await.unwrap();
|
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);
|
drop(guard);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue