diff --git a/docs/Changelog.md b/docs/Changelog.md index f802647..97e445a 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -7,6 +7,7 @@ - Support of shortcuts (.lnk files) with media file target. - playlist-random command jumps to a random playlist entry, default key binding is F9. - Fix OSC hide behavior on mouse move. +- Fix external audio tracks not shown correctly in tracks context menu. - New binding to show the current file in File Explorer. - Shift key enables `process-instance=multi`. - Command line syntax (preceding double hyphen) is supported in mpv.conf for options implemented by mpv.net. diff --git a/src/Misc/Player.cs b/src/Misc/Player.cs index 1fd761c..f164dee 100644 --- a/src/Misc/Player.cs +++ b/src/Misc/Player.cs @@ -1524,12 +1524,13 @@ namespace mpvnet public void UpdateExternalTracks() { - int trackCount = GetPropertyInt("track-list/count"); + int trackListTrackCount = GetPropertyInt("track-list/count"); int editionCount = GetPropertyInt("edition-list/count"); + int count = MediaTracks.Where(i => i.Type != "g").Count(); lock (MediaTracksLock) { - if (MediaTracks.Count != (trackCount + editionCount)) + if (count != (trackListTrackCount + editionCount)) { MediaTracks = MediaTracks.Where(i => !i.External).ToList(); MediaTracks.AddRange(GetTracks(false));