// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see .
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Kyoo.Abstractions.Controllers;
using Kyoo.Abstractions.Models.Attributes;
using PathIO = System.IO.Path;
namespace Kyoo.Abstractions.Models
{
///
/// A watch item give information useful for playback.
/// Information about tracks and display information that could be used by the player.
/// This contains mostly data from an with another form.
///
public class WatchItem : CustomTypeDescriptor, IThumbnails
{
///
/// The ID of the episode associated with this item.
///
public int EpisodeID { get; set; }
///
/// The slug of this episode.
///
public string Slug { get; set; }
///
/// The title of the show containing this episode.
///
public string ShowTitle { get; set; }
///
/// The slug of the show containing this episode
///
public string ShowSlug { get; set; }
///
/// The season in witch this episode is in.
///
public int? SeasonNumber { get; set; }
///
/// The number of this episode is it's season.
///
public int? EpisodeNumber { get; set; }
///
/// The absolute number of this episode. It's an episode number that is not reset to 1 after a new season.
///
public int? AbsoluteNumber { get; set; }
///
/// The title of this episode.
///
public string Title { get; set; }
///
/// The release date of this episode. It can be null if unknown.
///
public DateTime? ReleaseDate { get; set; }
///
/// The path of the video file for this episode. Any format supported by a is allowed.
///
[SerializeIgnore] public string Path { get; set; }
///
/// The episode that come before this one if you follow usual watch orders.
/// If this is the first episode or this is a movie, it will be null.
///
public Episode PreviousEpisode { get; set; }
///
/// The episode that come after this one if you follow usual watch orders.
/// If this is the last aired episode or this is a movie, it will be null.
///
public Episode NextEpisode { get; set; }
///
/// true if this is a movie, false otherwise.
///
public bool IsMovie { get; set; }
///
public Dictionary Images { get; set; }
///
/// The container of the video file of this episode.
/// Common containers are mp4, mkv, avi and so on.
///
public string Container { get; set; }
///
/// The video track. See for more information.
///
public Track Video { get; set; }
///
/// The list of audio tracks. See for more information.
///
public ICollection