Files
Futonizer/Models/JobProgressItem.cs
l4kr 05c496c10b Add overall progress, notifications, and UI polish
- Unify audio/subtitle selection: single-select, auto-default,
  cross-file propagation by exact name
- Show file size in queue, group divider and reordered columns in
  track table, drop accent highlight on row selection
- Add cumulative progress bar (files finished, MB copied) to the
  stripping window
- Add Windows toast notifications on stripping completion/cancel/error
- Restart the app after settings are changed; Cancel no longer
  clears the queue, only closes the window
- Add ConfigureAwait(false) throughout MkvService so concurrent
  strips don't starve the UI thread
- Hardcode scan/strip concurrency (10/5) instead of exposing it in
  Settings
2026-07-04 02:35:26 +02:00

54 lines
1.4 KiB
C#

using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace Futonizer.Models;
/// <summary>
/// Represents one currently-running strip job for display in the "active jobs" list,
/// since multiple files can be stripped concurrently.
/// </summary>
public class JobProgressItem : INotifyPropertyChanged
{
private int _percent;
private double _megabytesPerSecond;
public string FileName { get; set; } = string.Empty;
/// <summary>
/// Size of the source file in bytes, used as this job's weight when
/// computing overall cumulative progress across all queued files.
/// </summary>
public long FileSizeBytes { get; set; }
public int Percent
{
get => _percent;
set
{
_percent = value;
OnPropertyChanged();
OnPropertyChanged(nameof(Display));
}
}
public double MegabytesPerSecond
{
get => _megabytesPerSecond;
set
{
_megabytesPerSecond = value;
OnPropertyChanged();
OnPropertyChanged(nameof(Display));
}
}
public string Display => $"{FileName} - {Percent}% - {MegabytesPerSecond:F1} MB/s";
public event PropertyChangedEventHandler? PropertyChanged;
private void OnPropertyChanged([CallerMemberName] string? name = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
}
}