diff --git a/docs/Changelog.md b/docs/Changelog.md index 5c3fd50..7fb2e8c 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -1,5 +1,5 @@ -# 6.0.3.1 (202?-??-??) +# 6.0.3.1 (2022-07-30) - Creating a playlist from a folder uses absolute normalized paths, non media files are ignored. - The show-info command shows directly an advanced view which was enhanced with a General section and the filename. @@ -13,7 +13,7 @@ - Shift key enables `process-instance=multi`. - Command line syntax (preceding double hyphen) is supported in mpv.conf for options implemented by mpv.net. - MediaInfo v22.06 -- libmpv shinchiro 2022-07-02 +- libmpv shinchiro 2022-07-30 # 6.0.3.0 (2022-07-03) diff --git a/src/Misc/Player.cs b/src/Misc/Player.cs index f6fab10..3fcb158 100644 --- a/src/Misc/Player.cs +++ b/src/Misc/Player.cs @@ -1782,6 +1782,7 @@ namespace mpvnet string lang = mi.GetText(i, "Language/String"); string nativeLang = GetNativeLanguage(lang); string title = mi.GetText(i, "Title"); + bool forced = mi.GetText(i, "Forced") == "Yes"; if (!string.IsNullOrEmpty(title)) { @@ -1791,6 +1792,12 @@ namespace mpvnet if (title.ContainsEx(codec)) title = title.Replace(codec, ""); + if (title.ContainsEx(lang.ToLowerEx())) + title = title.Replace(lang.ToLowerEx(), lang); + + if (title.ContainsEx(nativeLang.ToLowerEx())) + title = title.Replace(nativeLang.ToLowerEx(), nativeLang).Trim(); + if (title.ContainsEx(lang)) title = title.Replace(lang, ""); @@ -1806,6 +1813,9 @@ namespace mpvnet if (title.ContainsEx("forced")) title = title.Replace("forced", "Forced").Trim(); + if (forced && title.ContainsEx("Forced")) + title = title.Replace("Forced", "").Trim(); + if (title.ContainsEx("()")) title = title.Replace("()", ""); @@ -1817,7 +1827,7 @@ namespace mpvnet Add(track, lang); Add(track, codec); Add(track, mi.GetText(i, "Format_Profile")); - Add(track, mi.GetText(i, "Forced") == "Yes" ? "Forced" : ""); + Add(track, forced ? "Forced" : ""); Add(track, (subCount > 1 && mi.GetText(i, "Default") == "Yes") ? "Default" : ""); Add(track, title); track.Text = "S: " + track.Text.Trim(' ', ','); diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs index ceb7f05..ec6defa 100644 --- a/src/Properties/AssemblyInfo.cs +++ b/src/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("6.0.3.0")] -[assembly: AssemblyFileVersion("6.0.3.0")] +[assembly: AssemblyVersion("6.0.3.1")] +[assembly: AssemblyFileVersion("6.0.3.1")]