// Path: src/net/straylightlabs/archivo/controller/ArchiveTaskException.java
// public class ArchiveTaskException extends RuntimeException {
//     private final String tooltip;
// 
//     public ArchiveTaskException(String message) {
//         super(message);
//         tooltip = null;
//     }
// 
//     public ArchiveTaskException(String message, String tooltip) {
//         super(message);
//         this.tooltip = tooltip;
//     }
// 
//     public String getTooltip() {
//         return tooltip;
//     }
// }


import net.straylightlabs.archivo.controller.ArchiveTaskException;

    public static ArchiveStatus createRemuxingStatus(double progress, int secondsRemaining) {
        if (progress >= 1.0) {
            progress = .99;
        }
        return new ArchiveStatus(TaskStatus.REMUXING, progress, secondsRemaining);
    }

    public static ArchiveStatus createFindingCommercialsStatus(double progress, int secondsRemaining) {
        if (progress >= 1.0) {
            progress = .99;
        }
        return new ArchiveStatus(TaskStatus.FINDING_COMMERCIALS, progress, secondsRemaining);
    }

    public static ArchiveStatus createRemovingCommercialsStatus(double progress, int secondsRemaining) {
        if (progress >= 1.0) {
            progress = .99;
        }
        return new ArchiveStatus(TaskStatus.REMOVING_COMMERCIALS, progress, secondsRemaining);
    }

    public static ArchiveStatus createTranscodingStatus(double progress, int secondsRemaining) {
        if (progress >= 1.0) {
            progress = .99;
        }
        return new ArchiveStatus(TaskStatus.TRANSCODING, progress, secondsRemaining);
    }

    public static ArchiveStatus createErrorStatus(Throwable e) {
// Path: src/net/straylightlabs/archivo/controller/ArchiveTaskException.java
// public class ArchiveTaskException extends RuntimeException {
//     private final String tooltip;
// 
//     public ArchiveTaskException(String message) {
//         super(message);
//         tooltip = null;
//     }
// 
//     public ArchiveTaskException(String message, String tooltip) {
//         super(message);
//         this.tooltip = tooltip;
//     }
// 
//     public String getTooltip() {
//         return tooltip;
//     }
// }


// Path: src/net/straylightlabs/archivo/model/ArchiveStatus.java
import net.straylightlabs.archivo.controller.ArchiveTaskException;


    public static ArchiveStatus createRemuxingStatus(double progress, int secondsRemaining) {
        if (progress >= 1.0) {
            progress = .99;
        }
        return new ArchiveStatus(TaskStatus.REMUXING, progress, secondsRemaining);
    }

    public static ArchiveStatus createFindingCommercialsStatus(double progress, int secondsRemaining) {
        if (progress >= 1.0) {
            progress = .99;
        }
        return new ArchiveStatus(TaskStatus.FINDING_COMMERCIALS, progress, secondsRemaining);
    }

    public static ArchiveStatus createRemovingCommercialsStatus(double progress, int secondsRemaining) {
        if (progress >= 1.0) {
            progress = .99;
        }
        return new ArchiveStatus(TaskStatus.REMOVING_COMMERCIALS, progress, secondsRemaining);
    }

    public static ArchiveStatus createTranscodingStatus(double progress, int secondsRemaining) {
        if (progress >= 1.0) {
            progress = .99;
        }
        return new ArchiveStatus(TaskStatus.TRANSCODING, progress, secondsRemaining);
    }

    public static ArchiveStatus createErrorStatus(Throwable e) {
        if (e instanceof ArchiveTaskException) {