@@ -18,6 +18,7 @@ public class Turntable.Mpris.Entry : GLib.Object {
1818 public string client_info_name { get { return this . client_info. identity; } }
1919 public string client_info_icon { get { return this . client_info. icon; } }
2020
21+ public bool looping { get ; private set ; default = false ; }
2122 public bool can_go_next { get ; private set ; default = false ; }
2223 public bool can_go_back { get ; private set ; default = false ; }
2324 public bool can_control { get ; private set ; default = false ; }
@@ -123,6 +124,7 @@ public class Turntable.Mpris.Entry : GLib.Object {
123124 update_position ();
124125 update_playback_status ();
125126 update_controls ();
127+ update_loop_status ();
126128
127129 GLib . Timeout . add (PROGRESS_UPDATE_TIME , update_position);
128130 } catch (Error e) {
@@ -150,6 +152,9 @@ public class Turntable.Mpris.Entry : GLib.Object {
150152 case " PlaybackStatus" :
151153 update_playback_status ();
152154 break ;
155+ case " LoopStatus" :
156+ update_loop_status ();
157+ break ;
153158 case " CanGoNext" :
154159 case " CanGoPrevious" :
155160 case " CanPlay" :
@@ -163,6 +168,10 @@ public class Turntable.Mpris.Entry : GLib.Object {
163168 });
164169 }
165170
171+ private void update_loop_status () {
172+ this . looping = this . player. loop_status == " Track" ;
173+ }
174+
166175 private bool update_position () {
167176 if (this . props == null ) return GLib . Source . REMOVE ;
168177
@@ -247,6 +256,8 @@ public class Turntable.Mpris.Entry : GLib.Object {
247256 } else {
248257 this . length = variant_length. get_int64 ();
249258 }
259+
260+ this . notify_property (" length" );
250261 }
251262 }
252263}
0 commit comments