diff --git a/docs/Changelog.md b/docs/Changelog.md index 97e445a..5c3fd50 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -5,6 +5,7 @@ - The show-info command shows directly an advanced view which was enhanced with a General section and the filename. - Media info titles are shortened if they contain duplicated or obvious information. - Support of shortcuts (.lnk files) with media file target. +- Support --audio-file and --sub-file aliases. - 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. diff --git a/src/Misc/Player.cs b/src/Misc/Player.cs index f164dee..f6fab10 100644 --- a/src/Misc/Player.cs +++ b/src/Misc/Player.cs @@ -1132,11 +1132,13 @@ namespace mpvnet string left = arg.Substring(2, arg.IndexOf("=") - 2); string right = arg.Substring(left.Length + 3); - if (left == "script") - left = "scripts"; - - if (left == "external-file") - left = "external-files"; + switch (left) + { + case "script": left = "scripts"; break; + case "audio-file": left = "audio-files"; break; + case "sub-file": left = "sub-files"; break; + case "external-file": left = "external-files"; break; + } if (preInit && preInitProperties.Contains(left)) {