5.7.0.0 Stable
This commit is contained in:
@@ -1509,6 +1509,10 @@ KP1 script-binding delete_current_file/confirm
|
||||
{
|
||||
string text = GetPropertyString($"chapter-list/{x}/title");
|
||||
double time = GetPropertyDouble($"chapter-list/{x}/time");
|
||||
|
||||
if (string.IsNullOrEmpty(text))
|
||||
text = "Chapter " + (x + 1);
|
||||
|
||||
Chapters.Add(new KeyValuePair<string, double>(text, time));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,22 +320,26 @@ namespace mpvnet
|
||||
|
||||
lock (Core.BluRayTitles)
|
||||
{
|
||||
List<(int Index, TimeSpan Len)> items = new List<(int Index, TimeSpan Len)>();
|
||||
List<(int Index, TimeSpan Length)> items = new List<(int, TimeSpan)>();
|
||||
|
||||
for (int i = 0; i < Core.BluRayTitles.Count; i++)
|
||||
items.Add((i, Core.BluRayTitles[i]));
|
||||
|
||||
var titleItems = items.OrderByDescending(item => item.Len)
|
||||
.Take(20).OrderBy(item => item.Index);
|
||||
var titleItems = items.OrderByDescending(item => item.Length)
|
||||
.Take(20)
|
||||
.OrderBy(item => item.Index);
|
||||
|
||||
foreach (var item in titleItems)
|
||||
{
|
||||
if (item.Len != TimeSpan.Zero)
|
||||
if (item.Length != TimeSpan.Zero)
|
||||
{
|
||||
var mi = MenuHelp.Add(titlesMenuItem.Items, $"{item.Len} ({item.Index})");
|
||||
var mi = MenuHelp.Add(titlesMenuItem.Items, $"Title {item.Index + 1}");
|
||||
|
||||
if (mi != null)
|
||||
{
|
||||
mi.InputGestureText = item.Length.ToString();
|
||||
mi.Click += (sender, args) => Core.SetBluRayTitle(item.Index);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user