// Copyright (C) 2024 Intro-Skipper contributors // SPDX-License-Identifier: GPL-3.0-only. using System; using System.Runtime.Serialization; namespace IntroSkipper.Data; /// /// Result of fingerprinting and analyzing two episodes in a season. /// All times are measured in seconds relative to the beginning of the media file. /// /// /// Initializes a new instance of the class. /// /// intro. [DataContract(Namespace = "http://schemas.datacontract.org/2004/07/ConfusedPolarBear.Plugin.IntroSkipper")] public class Intro(Segment intro) { /// /// Gets or sets the Episode ID. /// [DataMember] public Guid EpisodeId { get; set; } = intro.EpisodeId; /// /// Gets a value indicating whether this introduction is valid or not. /// Invalid results must not be returned through the API. /// public bool Valid => IntroEnd > 0; /// /// Gets or sets the introduction sequence start time. /// [DataMember] public double IntroStart { get; set; } = intro.Start; /// /// Gets or sets the introduction sequence end time. /// [DataMember] public double IntroEnd { get; set; } = intro.End; /// /// Gets or sets the recommended time to display the skip intro prompt. /// public double ShowSkipPromptAt { get; set; } /// /// Gets or sets the recommended time to hide the skip intro prompt. /// public double HideSkipPromptAt { get; set; } }