Skip to content

Commit 314ca1b

Browse files
committed
feat(Entry): length can be string
1 parent d050c72 commit 314ca1b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Mpris/Entry.vala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ public class Turntable.Mpris.Entry : GLib.Object {
219219
// Spotify:
220220
if (variant_length.is_of_type (GLib.VariantType.UINT64)) {
221221
this.length = (int64) variant_length.get_uint64 ();
222+
} else if (variant_length.is_of_type (GLib.VariantType.STRING)) { // whatever at this point, nobody reads the spec
223+
this.length = int64.parse (variant_length.get_string ());
222224
} else {
223225
this.length = variant_length.get_int64 ();
224226
}

0 commit comments

Comments
 (0)