|
|
|
@ -21,9 +21,10 @@ impl SongMetadata
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const COM_START: &str = "playerctl --player=strawberry";
|
|
|
|
|
|
|
|
|
|
|
|
pub fn get_song_metadata() -> SongMetadata
|
|
|
|
pub fn get_song_metadata() -> SongMetadata
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const COM_START: &str = "playerctl --player=strawberry";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let command = format!("{} {}", COM_START, "metadata --format {{title}},{{artist}},{{album}}");
|
|
|
|
let command = format!("{} {}", COM_START, "metadata --format {{title}},{{artist}},{{album}}");
|
|
|
|
|
|
|
|
|
|
|
|
@ -40,6 +41,12 @@ pub fn get_song_metadata() -> SongMetadata
|
|
|
|
sm
|
|
|
|
sm
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub fn next_track()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
let command = format!("{} {}", COM_START, "next");
|
|
|
|
|
|
|
|
let _ = run_command(&command);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn run_command(command: &str) -> String
|
|
|
|
fn run_command(command: &str) -> String
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|