mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57:25 +01:00
Implement program parameters
This commit is contained in:
parent
815dede141
commit
1788303bf3
6 changed files with 108 additions and 42 deletions
|
|
@ -27,6 +27,9 @@ mod imp {
|
|||
|
||||
#[property(get, construct_only)]
|
||||
pub path: OnceCell<PathBuf>,
|
||||
|
||||
#[property(get, construct_only)]
|
||||
pub track_id: OnceCell<String>,
|
||||
}
|
||||
|
||||
#[glib::object_subclass]
|
||||
|
|
@ -50,6 +53,7 @@ impl PlaylistItem {
|
|||
performers: Option<&str>,
|
||||
part_title: Option<&str>,
|
||||
path: impl AsRef<Path>,
|
||||
track_id: &str,
|
||||
) -> Self {
|
||||
glib::Object::builder()
|
||||
.property("is-title", is_title)
|
||||
|
|
@ -57,6 +61,7 @@ impl PlaylistItem {
|
|||
.property("performers", performers)
|
||||
.property("part-title", part_title)
|
||||
.property("path", path.as_ref())
|
||||
.property("track-id", track_id)
|
||||
.build()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue