Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions src/libs/Trakt.NET/Enums/TraktExtendedInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,33 @@
[Flags]
public enum TraktExtendedInfo
{
/// <summary>No additional data should be retrieved.</summary>
/// <summary>No additional data shall be retrieved.</summary>
[TraktEnumMember(JsonValue = "")]
None = 0,

/// <summary>Metadata information should be retrieved.</summary>
/// <summary>Metadata information shall be retrieved.</summary>
Metadata = 1,

/// <summary>Full information for media objects should be retrieved.</summary>
/// <summary>Full information for media objects shall be retrieved.</summary>
Full = 2,

/// <summary>No seasons information should be retrieved.</summary>
/// <summary>No seasons information shall be retrieved.</summary>
[TraktEnumMember(JsonValue = "noseasons")]
NoSeasons = 4,

/// <summary>Episodes information should be retrieved.</summary>
/// <summary>Episodes information shall be retrieved.</summary>
Episodes = 8,

/// <summary>Guest stars information should be retrieved.</summary>
/// <summary>Guest stars information shall be retrieved.</summary>
GuestStars = 16,

/// <summary>Comment media object information should be retrieved.</summary>
/// <summary>Comment media object information shall be retrieved.</summary>
Comments = 32,

/// <summary>User VIP information should be retrieved.</summary>
VIP = 64
/// <summary>User VIP information shall be retrieved.</summary>
VIP = 64,

/// <summary>Media images shall be retrieved.</summary>
Images = 128
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ namespace TraktNET
{
[ExcludeFromCodeCoverage]
[JsonSerializable(typeof(TraktEpisode))]
[JsonSerializable(typeof(IReadOnlyList<TraktEpisode>))]
[JsonSerializable(typeof(TraktEpisodeIDs))]
[JsonSerializable(typeof(IReadOnlyList<TraktEpisodeIDs>))]
[JsonSerializable(typeof(TraktEpisodeImages))]
[JsonSerializable(typeof(IReadOnlyList<TraktEpisodeImages>))]
[JsonSerializable(typeof(TraktEpisodeMinimal))]
[JsonSerializable(typeof(IReadOnlyList<TraktEpisodeMinimal>))]
[JsonSerializable(typeof(TraktEpisodeTranslation))]
[JsonSerializable(typeof(IReadOnlyList<TraktEpisodeTranslation>))]
public sealed partial class EpisodesJsonSerializerContext : JsonSerializerContext
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ internal static JsonSerializerContext GetContext<TJsonObjectType>()
{
typeof(TraktEpisode),
typeof(TraktEpisodeIDs),
typeof(TraktEpisodeImages),
typeof(TraktEpisodeMinimal),
typeof(TraktEpisodeTranslation)
});
Expand Down Expand Up @@ -186,6 +187,7 @@ internal static JsonSerializerContext GetContext<TJsonObjectType>()
typeof(TraktMovie),
typeof(TraktMovieAlias),
typeof(TraktMovieIDs),
typeof(TraktMovieImages),
typeof(TraktMovieMinimal),
typeof(TraktMovieRelease),
typeof(TraktMovieStatistics),
Expand All @@ -198,6 +200,7 @@ internal static JsonSerializerContext GetContext<TJsonObjectType>()
{
typeof(TraktPerson),
typeof(TraktPersonIDs),
typeof(TraktPersonImages),
typeof(TraktPersonMinimal),
typeof(TraktPersonSocialIDs)
});
Expand All @@ -206,6 +209,7 @@ internal static JsonSerializerContext GetContext<TJsonObjectType>()
{
typeof(TraktSeason),
typeof(TraktSeasonIDs),
typeof(TraktSeasonImages),
typeof(TraktSeasonMinimal)
});

Expand All @@ -214,6 +218,7 @@ internal static JsonSerializerContext GetContext<TJsonObjectType>()
typeof(TraktShow),
typeof(TraktShowAirs),
typeof(TraktShowIDs),
typeof(TraktShowImages),
typeof(TraktShowMinimal)
});

Expand Down Expand Up @@ -264,6 +269,7 @@ internal static JsonSerializerContext GetContext<TJsonObjectType>()
private static readonly HashSet<Type> s_episodeJsonTypes = [
typeof(TraktEpisode),
typeof(TraktEpisodeIDs),
typeof(TraktEpisodeImages),
typeof(TraktEpisodeMinimal),
typeof(TraktEpisodeTranslation)
];
Expand Down Expand Up @@ -297,6 +303,7 @@ internal static JsonSerializerContext GetContext<TJsonObjectType>()
typeof(TraktMovie),
typeof(TraktMovieAlias),
typeof(TraktMovieIDs),
typeof(TraktMovieImages),
typeof(TraktMovieMinimal),
typeof(TraktMovieRelease),
typeof(TraktMovieStatistics),
Expand All @@ -308,20 +315,23 @@ internal static JsonSerializerContext GetContext<TJsonObjectType>()
private static readonly HashSet<Type> s_peopleJsonTypes = [
typeof(TraktPerson),
typeof(TraktPersonIDs),
typeof(TraktPersonImages),
typeof(TraktPersonMinimal),
typeof(TraktPersonSocialIDs)
];

private static readonly HashSet<Type> s_seasonsJsonTypes = [
typeof(TraktSeason),
typeof(TraktSeasonIDs),
typeof(TraktSeasonImages),
typeof(TraktSeasonMinimal)
];

private static readonly HashSet<Type> s_showsJsonTypes = [
typeof(TraktShow),
typeof(TraktShowAirs),
typeof(TraktShowIDs),
typeof(TraktShowImages),
typeof(TraktShowMinimal)
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ namespace TraktNET
[JsonSerializable(typeof(IReadOnlyList<TraktMovieAlias>))]
[JsonSerializable(typeof(TraktMovieIDs))]
[JsonSerializable(typeof(IReadOnlyList<TraktMovieIDs>))]
[JsonSerializable(typeof(TraktMovieImages))]
[JsonSerializable(typeof(IReadOnlyList<TraktMovieImages>))]
[JsonSerializable(typeof(TraktMovieMinimal))]
[JsonSerializable(typeof(IReadOnlyList<TraktMovieMinimal>))]
[JsonSerializable(typeof(TraktMovieRelease))]
[JsonSerializable(typeof(IReadOnlyList<TraktMovieRelease>))]
[JsonSerializable(typeof(TraktMovieStatistics))]
[JsonSerializable(typeof(IReadOnlyList<TraktMovieStatistics>))]
[JsonSerializable(typeof(TraktMovieTranslation))]
[JsonSerializable(typeof(IReadOnlyList<TraktMovieTranslation>))]
[JsonSerializable(typeof(TraktTrendingMovie))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ namespace TraktNET
{
[ExcludeFromCodeCoverage]
[JsonSerializable(typeof(TraktPerson))]
[JsonSerializable(typeof(IReadOnlyList<TraktPerson>))]
[JsonSerializable(typeof(TraktPersonIDs))]
[JsonSerializable(typeof(IReadOnlyList<TraktPersonIDs>))]
[JsonSerializable(typeof(TraktPersonImages))]
[JsonSerializable(typeof(IReadOnlyList<TraktPersonImages>))]
[JsonSerializable(typeof(TraktPersonMinimal))]
[JsonSerializable(typeof(IReadOnlyList<TraktPersonMinimal>))]
[JsonSerializable(typeof(TraktPersonSocialIDs))]
[JsonSerializable(typeof(IReadOnlyList<TraktPersonSocialIDs>))]
public sealed partial class PeopleJsonSerializerContext : JsonSerializerContext
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ namespace TraktNET
{
[ExcludeFromCodeCoverage]
[JsonSerializable(typeof(TraktSeason))]
[JsonSerializable(typeof(IReadOnlyList<TraktSeason>))]
[JsonSerializable(typeof(TraktSeasonIDs))]
[JsonSerializable(typeof(IReadOnlyList<TraktSeasonIDs>))]
[JsonSerializable(typeof(TraktSeasonImages))]
[JsonSerializable(typeof(IReadOnlyList<TraktSeasonImages>))]
[JsonSerializable(typeof(TraktSeasonMinimal))]
[JsonSerializable(typeof(IReadOnlyList<TraktSeasonMinimal>))]
public sealed partial class SeasonsJsonSerializerContext : JsonSerializerContext
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ namespace TraktNET
{
[ExcludeFromCodeCoverage]
[JsonSerializable(typeof(TraktShow))]
[JsonSerializable(typeof(IReadOnlyList<TraktShow>))]
[JsonSerializable(typeof(TraktShowAirs))]
[JsonSerializable(typeof(IReadOnlyList<TraktShowAirs>))]
[JsonSerializable(typeof(TraktShowIDs))]
[JsonSerializable(typeof(IReadOnlyList<TraktShowIDs>))]
[JsonSerializable(typeof(TraktShowImages))]
[JsonSerializable(typeof(IReadOnlyList<TraktShowImages>))]
[JsonSerializable(typeof(TraktShowMinimal))]
[JsonSerializable(typeof(IReadOnlyList<TraktShowMinimal>))]
public sealed partial class ShowsJsonSerializerContext : JsonSerializerContext
{
}
Expand Down
9 changes: 9 additions & 0 deletions src/libs/Trakt.NET/Json/Episodes/TraktEpisodeImages.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace TraktNET
{
/// <summary>A collection of Trakt episode image URLs.</summary>
public record class TraktEpisodeImages
{
/// <summary>A list of Screenshot image URLs.</summary>
public List<string>? Screenshot { get; set; }
}
}
6 changes: 6 additions & 0 deletions src/libs/Trakt.NET/Json/Episodes/TraktEpisodeMinimal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ public record class TraktEpisodeMinimal
[JsonPropertyName("ids")]
public TraktEpisodeIDs? IDs { get; set; }

/// <summary>
/// The collection of image URLs for the episode.
/// See also <seealso cref="TraktEpisodeImages" />.
/// </summary>
public TraktEpisodeImages? Images { get; set; }

/// <summary>Gets a string representation of the episode.</summary>
/// <returns>A string representation of the episode.</returns>
public override string ToString()
Expand Down
24 changes: 24 additions & 0 deletions src/libs/Trakt.NET/Json/Movies/TraktMovieImages.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace TraktNET
{
/// <summary>A collection of Trakt movie image URLs.</summary>
public record class TraktMovieImages
{
/// <summary>A list of Fanart image URLs.</summary>
public List<string>? Fanart { get; set; }

/// <summary>A list of Poster image URLs.</summary>
public List<string>? Poster { get; set; }

/// <summary>A list of Logo image URLs.</summary>
public List<string>? Logo { get; set; }

/// <summary>A list of Clearart image URLs.</summary>
public List<string>? Clearart { get; set; }

/// <summary>A list of Banner image URLs.</summary>
public List<string>? Banner { get; set; }

/// <summary>A list of Thumbnail image URLs.</summary>
public List<string>? Thumb { get; set; }
}
}
6 changes: 6 additions & 0 deletions src/libs/Trakt.NET/Json/Movies/TraktMovieMinimal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ public record class TraktMovieMinimal
[JsonPropertyName("ids")]
public TraktMovieIDs? IDs { get; set; }

/// <summary>
/// The collection of image URLs for the movie.
/// See also <seealso cref="TraktMovieImages" />.
/// </summary>
public TraktMovieImages? Images { get; set; }

/// <summary>Gets a string representation of the movie.</summary>
/// <returns>A string representation of the movie.</returns>
public override string ToString()
Expand Down
12 changes: 12 additions & 0 deletions src/libs/Trakt.NET/Json/People/TraktPersonImages.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace TraktNET
{
/// <summary>A collection of Trakt person image URLs.</summary>
public record class TraktPersonImages
{
/// <summary>A list of Headshot image URLs.</summary>
public List<string>? Headshot { get; set; }

/// <summary>A list of Fanart image URLs.</summary>
public List<string>? Fanart { get; set; }
}
}
6 changes: 6 additions & 0 deletions src/libs/Trakt.NET/Json/People/TraktPersonMinimal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,11 @@ public record class TraktPersonMinimal
/// </summary>
[JsonPropertyName("ids")]
public TraktPersonIDs? IDs { get; set; }

/// <summary>
/// The collection of image URLs for the person.
/// See also <seealso cref="TraktPersonImages" />.
/// </summary>
public TraktPersonImages? Images { get; set; }
}
}
12 changes: 12 additions & 0 deletions src/libs/Trakt.NET/Json/Seasons/TraktSeasonImages.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace TraktNET
{
/// <summary>A collection of Trakt season image URLs.</summary>
public record class TraktSeasonImages
{
/// <summary>A list of Poster image URLs.</summary>
public List<string>? Poster { get; set; }

/// <summary>A list of Thumbnail image URLs.</summary>
public List<string>? Thumb { get; set; }
}
}
6 changes: 6 additions & 0 deletions src/libs/Trakt.NET/Json/Seasons/TraktSeasonMinimal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,11 @@ public record class TraktSeasonMinimal
/// </summary>
[JsonPropertyName("ids")]
public TraktSeasonIDs? IDs { get; set; }

/// <summary>
/// The collection of image URLs for the season.
/// See also <seealso cref="TraktSeasonImages" />.
/// </summary>
public TraktSeasonImages? Images { get; set; }
}
}
24 changes: 24 additions & 0 deletions src/libs/Trakt.NET/Json/Shows/TraktShowImages.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace TraktNET
{
/// <summary>A collection of Trakt show image URLs.</summary>
public record class TraktShowImages
{
/// <summary>A list of Fanart image URLs.</summary>
public List<string>? Fanart { get; set; }

/// <summary>A list of Poster image URLs.</summary>
public List<string>? Poster { get; set; }

/// <summary>A list of Logo image URLs.</summary>
public List<string>? Logo { get; set; }

/// <summary>A list of Clearart image URLs.</summary>
public List<string>? Clearart { get; set; }

/// <summary>A list of Banner image URLs.</summary>
public List<string>? Banner { get; set; }

/// <summary>A list of Thumbnail image URLs.</summary>
public List<string>? Thumb { get; set; }
}
}
6 changes: 6 additions & 0 deletions src/libs/Trakt.NET/Json/Shows/TraktShowMinimal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ public record class TraktShowMinimal
[JsonPropertyName("ids")]
public TraktShowIDs? IDs { get; set; }

/// <summary>
/// The collection of image URLs for the show.
/// See also <seealso cref="TraktShowImages" />.
/// </summary>
public TraktShowImages? Images { get; set; }

/// <summary>Gets a string representation of the show.</summary>
/// <returns>A string representation of the show.</returns>
public override string ToString()
Expand Down
Loading
Loading