diff options
| author | salmonik <salmonik@noreply.codeberg.org> | 2026-07-06 15:59:34 +0200 |
|---|---|---|
| committer | salmonik <salmonik@noreply.codeberg.org> | 2026-07-06 15:59:34 +0200 |
| commit | 338b4d600e2d41ef52858c73adf23473183a60a9 (patch) | |
| tree | ced63779d57e44fa35a896b27bf07e9eee120d5f /src/queue.rs | |
| parent | fix -a to work properly (diff) | |
| parent | add track index to MPRIS (diff) | |
| download | rsplayer-338b4d600e2d41ef52858c73adf23473183a60a9.tar.gz rsplayer-338b4d600e2d41ef52858c73adf23473183a60a9.zip | |
Merge pull request 'mpris merge' (#2) from mpris into main
Reviewed-on: https://codeberg.org/salmonik/RSPlayer/pulls/2
Diffstat (limited to 'src/queue.rs')
| -rw-r--r-- | src/queue.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/queue.rs b/src/queue.rs index 7675ddd..1f2f0fc 100644 --- a/src/queue.rs +++ b/src/queue.rs | |||
| @@ -98,6 +98,7 @@ pub struct Track { | |||
| 98 | pub title: Option<String>, | 98 | pub title: Option<String>, |
| 99 | pub artist: Option<String>, | 99 | pub artist: Option<String>, |
| 100 | pub album: Option<String>, | 100 | pub album: Option<String>, |
| 101 | pub track_number: Option<i32>, | ||
| 101 | pub duration_secs: Option<f64>, | 102 | pub duration_secs: Option<f64>, |
| 102 | pub is_stream: bool, | 103 | pub is_stream: bool, |
| 103 | } | 104 | } |
| @@ -115,6 +116,7 @@ impl Track { | |||
| 115 | title: metadata.and_then(|m| m.title.clone()), | 116 | title: metadata.and_then(|m| m.title.clone()), |
| 116 | artist: metadata.and_then(|m| m.artist.clone()), | 117 | artist: metadata.and_then(|m| m.artist.clone()), |
| 117 | album: metadata.and_then(|m| m.album.clone()), | 118 | album: metadata.and_then(|m| m.album.clone()), |
| 119 | track_number: metadata.and_then(|m| m.track_number), | ||
| 118 | duration_secs: metadata.and_then(|m| m.duration_secs), | 120 | duration_secs: metadata.and_then(|m| m.duration_secs), |
| 119 | is_stream: false, | 121 | is_stream: false, |
| 120 | } | 122 | } |
| @@ -139,6 +141,7 @@ impl Track { | |||
| 139 | title: Some(title), | 141 | title: Some(title), |
| 140 | artist: None, | 142 | artist: None, |
| 141 | album: None, | 143 | album: None, |
| 144 | track_number: None, | ||
| 142 | duration_secs: None, | 145 | duration_secs: None, |
| 143 | is_stream: true, | 146 | is_stream: true, |
| 144 | } | 147 | } |
