//
// Copyright (c) PlaceholderCompany. All rights reserved.
//
#nullable disable
#pragma warning disable CA1724, CS1591
using System;
using System.Text.Json.Serialization;
using Jellyfin.Data.Enums;
using MediaBrowser.Controller.Providers;
namespace MediaBrowser.Controller.Entities
{
[Common.RequiresSourceSerialisation]
public class AudioBook : Audio.Audio, IHasSeries, IHasLookupInfo
{
[JsonIgnore]
public override bool SupportsPositionTicksResume => true;
[JsonIgnore]
public override bool SupportsPlayedStatus => true;
[JsonIgnore]
public string SeriesPresentationUniqueKey { get; set; }
[JsonIgnore]
public string SeriesName { get; set; }
[JsonIgnore]
public Guid SeriesId { get; set; }
///
/// Finds the series sort name.
///
/// The series sort name.
public string FindSeriesSortName()
{
return this.SeriesName;
}
///
/// Finds the series name.
///
/// The series name.
public string FindSeriesName()
{
return this.SeriesName;
}
///
/// Finds the series presentation unique key.
///
/// The series presentation unique key.
public string FindSeriesPresentationUniqueKey()
{
return this.SeriesPresentationUniqueKey;
}
///
/// Gets the default primary image aspect ratio.
///
/// The default primary image aspect ratio.
public override double GetDefaultPrimaryImageAspectRatio()
{
return 0;
}
///
/// Finds the series identifier.
///
/// The series identifier.
public Guid FindSeriesId()
{
return this.SeriesId;
}
///
/// Determines whether this audiobook can be downloaded.
///
/// True if downloadable; otherwise, false.
public override bool CanDownload()
{
return this.IsFileProtocol;
}
///
/// Gets the unrated type for blocking purposes.
///
/// The unrated item type.
public override UnratedItem GetBlockUnratedType()
{
return UnratedItem.Book;
}
}
}