From dfefc06abfb4665d31d2bf5a01c8e7b097809bfd Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Mon, 6 Apr 2026 04:57:20 +0300 Subject: [PATCH] Add tracks count getter to ISelectableTrack --- MuzikaGromche/Plugin.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MuzikaGromche/Plugin.cs b/MuzikaGromche/Plugin.cs index 41a742e..17dcce6 100644 --- a/MuzikaGromche/Plugin.cs +++ b/MuzikaGromche/Plugin.cs @@ -345,6 +345,8 @@ namespace MuzikaGromche internal IAudioTrack[] GetTracks(); + internal int Count() => GetTracks().Length; + // Index is a non-negative monotonically increasing number of times // this ISelectableTrack has been played for this Jester on this day. // A group of tracks can use this index to rotate tracks sequentially. @@ -588,6 +590,8 @@ namespace MuzikaGromche IAudioTrack[] ISelectableTrack.GetTracks() => [this]; + int ISelectableTrack.Count() => 1; + IAudioTrack ISelectableTrack.SelectTrack(int index) => this; void ISelectableTrack.Debug() @@ -612,6 +616,8 @@ namespace MuzikaGromche IAudioTrack[] ISelectableTrack.GetTracks() => Tracks; + int ISelectableTrack.Count() => Tracks.Length; + IAudioTrack ISelectableTrack.SelectTrack(int index) { if (Tracks.Length == 0)