1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-22 22:15:17 -04:00

New: TMDb List Rework

This commit is contained in:
Qstick
2019-12-15 02:34:27 -05:00
parent bdc1adb2ed
commit 65287ec4f3
32 changed files with 1123 additions and 312 deletions
@@ -15,6 +15,17 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource
public int total_pages { get; set; }
}
public class AuthRefreshTokenResponse
{
public string request_token { get; set; }
}
public class AuthAccessTokenResponse
{
public string access_token { get; set; }
public string account_id { get; set; }
}
public class MovieResult
{
public string poster_path { get; set; }
@@ -37,6 +48,13 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource
public string physical_release_note { get; set; }
}
public class CreditsResult : MovieResult
{
public string department { get; set; }
public string job { get; set; }
public string credit_id { get; set; }
}
public class MovieResourceRoot
{
public bool adult { get; set; }
@@ -181,17 +199,31 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource
public class ListResponseRoot
{
public string created_by { get; set; }
public string description { get; set; }
public int favorite_count { get; set; }
public string id { get; set; }
public Item[] items { get; set; }
public int item_count { get; set; }
public Item[] results { get; set; }
public int total_results { get; set; }
public string iso_639_1 { get; set; }
public string name { get; set; }
public object poster_path { get; set; }
}
public class CollectionResponseRoot
{
public int id { get; set; }
public string name { get; set; }
public string overview { get; set; }
public string poster_path { get; set; }
public string backdrop_path { get; set; }
public MovieResult[] parts { get; set; }
}
public class PersonCreditsRoot
{
public CreditsResult[] cast { get; set; }
public CreditsResult[] crew { get; set; }
public int id { get; set; }
}
public class Item : MovieResult
{
public string media_type { get; set; }
@@ -63,6 +63,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
var startDate = startTime.ToString("o");
var request = _movieBuilder.Create()
.SetSegment("api", "3")
.SetSegment("route", "movie")
.SetSegment("id", "")
.SetSegment("secondaryRoute", "changes")
@@ -82,6 +83,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
var langCode = profile != null ? IsoLanguages.Get(profile.Language)?.TwoLetterCode ?? "en" : "en";
var request = _movieBuilder.Create()
.SetSegment("api", "3")
.SetSegment("route", "movie")
.SetSegment("id", tmdbId.ToString())
.SetSegment("secondaryRoute", "")
@@ -329,6 +331,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
public Movie GetMovieInfo(string imdbId)
{
var request = _movieBuilder.Create()
.SetSegment("api", "3")
.SetSegment("route", "find")
.SetSegment("id", imdbId)
.SetSegment("secondaryRoute", "")
@@ -504,6 +507,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
var firstChar = searchTerm.First();
var request = _movieBuilder.Create()
.SetSegment("api", "3")
.SetSegment("route", "search")
.SetSegment("id", "movie")
.SetSegment("secondaryRoute", "")