player: Implement MPRIS

This commit is contained in:
Elias Projahn 2023-11-03 18:20:41 +01:00
parent c378305465
commit 31144dff46
6 changed files with 213 additions and 67 deletions

View file

@ -59,4 +59,19 @@ impl PlaylistItem {
.property("path", path.as_ref())
.build()
}
pub fn make_title(&self) -> String {
let mut title = self.title();
if let Some(part_title) = self.part_title() {
title.push_str(": ");
title.push_str(&part_title);
}
title
}
pub fn make_subtitle(&self) -> Option<String> {
self.performers()
}
}