Discovery of upcoming movies points to our server now.

Discovery results now show physical release date (if present).
All physical release dates now should show a note (if available) detailing what kind of release date it is (e.g. Netflix, DVD, Streaming, etc.)
Leonardo Galli 8 years ago
parent 390e4c3014
commit 9dee1d6fad

@ -28,6 +28,7 @@ namespace NzbDrone.Api.Movie
public string Overview { get; set; } public string Overview { get; set; }
public DateTime? InCinemas { get; set; } public DateTime? InCinemas { get; set; }
public DateTime? PhysicalRelease { get; set; } public DateTime? PhysicalRelease { get; set; }
public string PhysicalReleaseNote { get; set; }
public List<MediaCover> Images { get; set; } public List<MediaCover> Images { get; set; }
public string Website { get; set; } public string Website { get; set; }
public bool Downloaded { get; set; } public bool Downloaded { get; set; }
@ -116,6 +117,7 @@ namespace NzbDrone.Api.Movie
SortTitle = model.SortTitle, SortTitle = model.SortTitle,
InCinemas = model.InCinemas, InCinemas = model.InCinemas,
PhysicalRelease = model.PhysicalRelease, PhysicalRelease = model.PhysicalRelease,
PhysicalReleaseNote = model.PhysicalReleaseNote,
HasFile = model.HasFile, HasFile = model.HasFile,
Downloaded = downloaded, Downloaded = downloaded,
//TotalEpisodeCount //TotalEpisodeCount
@ -176,6 +178,7 @@ namespace NzbDrone.Api.Movie
SortTitle = resource.SortTitle, SortTitle = resource.SortTitle,
InCinemas = resource.InCinemas, InCinemas = resource.InCinemas,
PhysicalRelease = resource.PhysicalRelease, PhysicalRelease = resource.PhysicalRelease,
PhysicalReleaseNote = resource.PhysicalReleaseNote,
//TotalEpisodeCount //TotalEpisodeCount
//EpisodeCount //EpisodeCount
//EpisodeFileCount //EpisodeFileCount

@ -0,0 +1,16 @@
using System.Data;
using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework;
using NzbDrone.Core.Tv;
namespace NzbDrone.Core.Datastore.Migration
{
[Migration(138)]
public class add_physical_release_note : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
Alter.Table("Movies").AddColumn("PhysicalReleaseNote").AsString().Nullable();
}
}
}

@ -36,6 +36,8 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource
public float vote_average { get; set; } public float vote_average { get; set; }
public string trailer_key { get; set; } public string trailer_key { get; set; }
public string trailer_site { get; set; } public string trailer_site { get; set; }
public string physical_release { get; set; }
public string physical_release_note { get; set; }
} }

@ -191,11 +191,13 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
if (movie.PhysicalRelease.Value.After(DateTime.Parse(releaseDate.release_date))) if (movie.PhysicalRelease.Value.After(DateTime.Parse(releaseDate.release_date)))
{ {
movie.PhysicalRelease = DateTime.Parse(releaseDate.release_date); //Use oldest release date available. movie.PhysicalRelease = DateTime.Parse(releaseDate.release_date); //Use oldest release date available.
movie.PhysicalReleaseNote = releaseDate.note;
} }
} }
else else
{ {
movie.PhysicalRelease = DateTime.Parse(releaseDate.release_date); movie.PhysicalRelease = DateTime.Parse(releaseDate.release_date);
movie.PhysicalReleaseNote = releaseDate.note;
} }
} }
} }
@ -363,7 +365,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
HttpRequest request; HttpRequest request;
List<MovieResult> results; List<MovieResult> results;
if (action == "upcoming") /*if (action == "upcoming")
{ {
var lastWeek = DateTime.Now.AddDays(-7); var lastWeek = DateTime.Now.AddDays(-7);
var threeWeeks = DateTime.Now.AddDays(7 * 3); var threeWeeks = DateTime.Now.AddDays(7 * 3);
@ -388,7 +390,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
results = response.Resource.results.ToList(); results = response.Resource.results.ToList();
} }
else else
{ {*/
request = new HttpRequestBuilder("https://radarr.video/api/{action}/").SetSegment("action", action).Build(); request = new HttpRequestBuilder("https://radarr.video/api/{action}/").SetSegment("action", action).Build();
request.AllowAutoRedirect = true; request.AllowAutoRedirect = true;
@ -404,7 +406,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
} }
results = response.Resource; results = response.Resource;
} //}
results = results.Where(m => allMovies.None(mo => mo.TmdbId == m.id) && allExclusions.None(ex => ex.TmdbId == m.id)).ToList(); results = results.Where(m => allMovies.None(mo => mo.TmdbId == m.id) && allExclusions.None(ex => ex.TmdbId == m.id)).ToList();
@ -577,6 +579,16 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
imdbMovie.Year = imdbMovie.InCinemas.Value.Year; imdbMovie.Year = imdbMovie.InCinemas.Value.Year;
} }
if (result.physical_release.IsNotNullOrWhiteSpace())
{
imdbMovie.PhysicalRelease = DateTime.Parse(result.physical_release);
if (result.physical_release_note.IsNotNullOrWhiteSpace())
{
imdbMovie.PhysicalReleaseNote = result.physical_release_note;
}
}
var now = DateTime.Now; var now = DateTime.Now;
//handle the case when we have both theatrical and physical release dates //handle the case when we have both theatrical and physical release dates
if (imdbMovie.InCinemas.HasValue && imdbMovie.PhysicalRelease.HasValue) if (imdbMovie.InCinemas.HasValue && imdbMovie.PhysicalRelease.HasValue)

@ -1284,6 +1284,7 @@
<Compile Include="NetImport\ImportExclusions\ImportExclusion.cs" /> <Compile Include="NetImport\ImportExclusions\ImportExclusion.cs" />
<Compile Include="NetImport\ImportExclusions\ImportExclusionsRepository.cs" /> <Compile Include="NetImport\ImportExclusions\ImportExclusionsRepository.cs" />
<Compile Include="NetImport\ImportExclusions\ImportExclusionsService.cs" /> <Compile Include="NetImport\ImportExclusions\ImportExclusionsService.cs" />
<Compile Include="Datastore\Migration\138_add_physical_release_note.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client"> <BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">

@ -45,6 +45,7 @@ namespace NzbDrone.Core.Tv
public DateTime Added { get; set; } public DateTime Added { get; set; }
public DateTime? InCinemas { get; set; } public DateTime? InCinemas { get; set; }
public DateTime? PhysicalRelease { get; set; } public DateTime? PhysicalRelease { get; set; }
public String PhysicalReleaseNote { get; set; }
public LazyLoaded<Profile> Profile { get; set; } public LazyLoaded<Profile> Profile { get; set; }
public HashSet<int> Tags { get; set; } public HashSet<int> Tags { get; set; }
public AddMovieOptions AddOptions { get; set; } public AddMovieOptions AddOptions { get; set; }

@ -29,9 +29,11 @@
<span class="label label-default" title="{{ratings.votes}} Vote(s)">{{ratings.value}}</span> <span class="label label-default" title="{{ratings.votes}} Vote(s)">{{ratings.value}}</span>
{{#if youTubeTrailerId}} {{#if youTubeTrailerId}}
<span class="label label-info"> <span class="label label-info"><a href="{{youTubeTrailerUrl}}" style="color: white;">Trailer</a></span>
<a href="{{youTubeTrailerUrl}}" style="color: white;">Trailer</a> {{/if}}
</span>
{{#if physicalRelease}}
<span class="label label-info" title="{{physicalReleaseNote}}">{{inCinemas}}</span>
{{/if}} {{/if}}
</span> </span>

@ -20,7 +20,7 @@
{{#if_eq status compare="announced"}} {{#if_eq status compare="announced"}}
<span class="label label-default">{{inCinemas}}</span> <span class="label label-default">{{inCinemas}}</span>
{{else}} {{else}}
<span class="label label-info">{{inCinemas}}</span> <span class="label label-info" title="{{physicalReleaseNote}}">{{inCinemas}}</span>
{{/if_eq}} {{/if_eq}}
<span class="label label-{{DownloadedStatusColor}}" title="{{DownloadedQuality}}">{{DownloadedStatus}}</span> <span class="label label-{{DownloadedStatusColor}}" title="{{DownloadedQuality}}">{{DownloadedStatus}}</span>
</div> </div>

Loading…
Cancel
Save