Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

Commit e3df3ab

Browse files
[v2] Add TMDB extension library (#153 #158)
1 parent d434e17 commit e3df3ab

File tree

9 files changed

+145
-0
lines changed

9 files changed

+145
-0
lines changed

src/Trakt.NET.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Trakt.NET.Modules.Tests", "
124124
EndProject
125125
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Trakt.NET.HttpClientFactory", "libs\Trakt.NET.HttpClientFactory\Trakt.NET.HttpClientFactory.csproj", "{AE64986B-39E8-49C2-A3E0-48FBA888B437}"
126126
EndProject
127+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Trakt.NET.Images.TMDB", "libs\Trakt.NET.Images.TMDB\Trakt.NET.Images.TMDB.csproj", "{CB45A1AC-38D0-4A25-B55C-6171F4140CCE}"
128+
EndProject
127129
Global
128130
GlobalSection(SolutionConfigurationPlatforms) = preSolution
129131
Debug|Any CPU = Debug|Any CPU
@@ -166,6 +168,10 @@ Global
166168
{AE64986B-39E8-49C2-A3E0-48FBA888B437}.Debug|Any CPU.Build.0 = Debug|Any CPU
167169
{AE64986B-39E8-49C2-A3E0-48FBA888B437}.Release|Any CPU.ActiveCfg = Release|Any CPU
168170
{AE64986B-39E8-49C2-A3E0-48FBA888B437}.Release|Any CPU.Build.0 = Release|Any CPU
171+
{CB45A1AC-38D0-4A25-B55C-6171F4140CCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
172+
{CB45A1AC-38D0-4A25-B55C-6171F4140CCE}.Debug|Any CPU.Build.0 = Debug|Any CPU
173+
{CB45A1AC-38D0-4A25-B55C-6171F4140CCE}.Release|Any CPU.ActiveCfg = Release|Any CPU
174+
{CB45A1AC-38D0-4A25-B55C-6171F4140CCE}.Release|Any CPU.Build.0 = Release|Any CPU
169175
EndGlobalSection
170176
GlobalSection(SolutionProperties) = preSolution
171177
HideSolutionNode = FALSE
@@ -197,6 +203,7 @@ Global
197203
{A5279041-12FE-4DEA-AC60-79B7FFF3D229} = {50AD22EC-EB56-476B-8DCE-4AF2B5BD8B09}
198204
{991F0FB1-CDFD-412E-B7B2-81946E12D6D7} = {50AD22EC-EB56-476B-8DCE-4AF2B5BD8B09}
199205
{AE64986B-39E8-49C2-A3E0-48FBA888B437} = {E7B2A7FC-F550-4546-8F2C-6FC9AA49F6B5}
206+
{CB45A1AC-38D0-4A25-B55C-6171F4140CCE} = {E7B2A7FC-F550-4546-8F2C-6FC9AA49F6B5}
200207
EndGlobalSection
201208
GlobalSection(ExtensibilityGlobals) = postSolution
202209
SolutionGuid = {7025A39E-11A6-4587-98F7-E887B941D5A0}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace TraktNET
2+
{
3+
public record class TMDBConfiguration
4+
{
5+
public List<string>? ChangeKeys { get; set; }
6+
7+
public TMDBConfigurationImages? Images { get; set; }
8+
}
9+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
namespace TraktNET
2+
{
3+
public record class TMDBConfigurationImages
4+
{
5+
public string? BaseUrl { get; set; }
6+
7+
public string? SecureBaseUrl { get; set; }
8+
9+
public List<string>? BackdropSizes { get; set; }
10+
11+
public List<string>? LogoSizes { get; set; }
12+
13+
public List<string>? PosterSizes { get; set; }
14+
15+
public List<string>? ProfileSizes { get; set; }
16+
17+
public List<string>? StillSizes { get; set; }
18+
}
19+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System.Text.Json.Serialization;
2+
3+
namespace TraktNET
4+
{
5+
public record class TMDBImage
6+
{
7+
public string? FilePath { get; set; }
8+
9+
public uint? Width { get; set; }
10+
11+
public uint? Height { get; set; }
12+
13+
public float? AspectRatio { get; set; }
14+
15+
public uint? VoteCount { get; set; }
16+
17+
public float? VoteAverage { get; set; }
18+
19+
[JsonPropertyName("iso_639_1")]
20+
public string? ISO6391 { get; set; }
21+
}
22+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace TraktNET
2+
{
3+
public record class TMDBMovieImages
4+
{
5+
public uint? Id { get; set; }
6+
7+
public List<TMDBImage>? Backdrops { get; set; }
8+
9+
public List<TMDBImage>? Posters { get; set; }
10+
11+
public List<TMDBImage>? Logos { get; set; }
12+
}
13+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace TraktNET
2+
{
3+
public record class TMDBPersonImages
4+
{
5+
public uint? Id { get; set; }
6+
7+
public List<TMDBImage>? Profiles { get; set; }
8+
}
9+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace TraktNET
2+
{
3+
public record class TMDBShowImages
4+
{
5+
public uint? Id { get; set; }
6+
7+
public List<TMDBImage>? Backdrops { get; set; }
8+
9+
public List<TMDBImage>? Posters { get; set; }
10+
11+
public List<TMDBImage>? Logos { get; set; }
12+
}
13+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<Product>Trakt.NET.Images.TMDB ($(TargetFramework))</Product>
5+
<Title>Trakt.NET.Images.TMDB</Title>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<ProjectReference Include="..\Trakt.NET\Trakt.NET.csproj" />
10+
</ItemGroup>
11+
12+
</Project>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
namespace TraktNET
2+
{
3+
public static class TraktTMDBImageExtensions
4+
{
5+
public static async Task<TMDBMovieImages> GetTMDBImagesAsync(this TraktMovieMinimal traktMovie, CancellationToken cancellationToken = default)
6+
{
7+
// TODO
8+
return await Task.FromResult(new TMDBMovieImages());
9+
}
10+
11+
public static async Task<TMDBMovieImages> GetTMDBImagesAsync(this TraktMovie traktMovie, CancellationToken cancellationToken = default)
12+
{
13+
// TODO
14+
return await Task.FromResult(new TMDBMovieImages());
15+
}
16+
17+
public static async Task<TMDBShowImages> GetTMDBImagesAsync(this TraktShowMinimal traktShow, CancellationToken cancellationToken = default)
18+
{
19+
// TODO
20+
return await Task.FromResult(new TMDBShowImages());
21+
}
22+
23+
public static async Task<TMDBShowImages> GetTMDBImagesAsync(this TraktShow traktShow, CancellationToken cancellationToken = default)
24+
{
25+
// TODO
26+
return await Task.FromResult(new TMDBShowImages());
27+
}
28+
29+
public static async Task<TMDBPersonImages> GetTMDBImagesAsync(this TraktPersonMinimal traktPerson, CancellationToken cancellationToken = default)
30+
{
31+
// TODO
32+
return await Task.FromResult(new TMDBPersonImages());
33+
}
34+
35+
public static async Task<TMDBPersonImages> GetTMDBImagesAsync(this TraktPerson traktPerson, CancellationToken cancellationToken = default)
36+
{
37+
// TODO
38+
return await Task.FromResult(new TMDBPersonImages());
39+
}
40+
}
41+
}

0 commit comments

Comments
 (0)