Music player reads mpris:length instead of xesam:length

This commit is contained in:
mars 2022-11-20 00:28:49 -07:00
parent 2144a2ab3d
commit 452cb9c708
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ impl<'a> From<MetadataMap<'a>> for Metadata {
.get("xesam:trackNumber")
.and_then(|v| TryFrom::try_from(v).ok()),
length: map
.get("xesam:length")
.get("mpris:length")
.and_then(|v| i64::try_from(v).ok())
.map(|us| us as f32 / 1_000_000.0), // 1,000,000 microseconds in a second
};