mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 06:45:19 -07:00
Patch/more updates (#1009)
* add downloaded quality to cut off * set profile to 1 on model too * get the lowest year in release dates
This commit is contained in:
parent
5cace1d857
commit
83560ad937
3 changed files with 25 additions and 3 deletions
|
@ -138,12 +138,23 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||||
movie.SortTitle = Parser.Parser.NormalizeTitle(resource.title);
|
movie.SortTitle = Parser.Parser.NormalizeTitle(resource.title);
|
||||||
movie.Overview = resource.overview;
|
movie.Overview = resource.overview;
|
||||||
movie.Website = resource.homepage;
|
movie.Website = resource.homepage;
|
||||||
|
|
||||||
if (resource.release_date.IsNotNullOrWhiteSpace())
|
if (resource.release_date.IsNotNullOrWhiteSpace())
|
||||||
{
|
{
|
||||||
movie.InCinemas = DateTime.Parse(resource.release_date);
|
movie.InCinemas = DateTime.Parse(resource.release_date);
|
||||||
movie.Year = movie.InCinemas.Value.Year;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get the lowest year in all release date
|
||||||
|
var lowestYear = new List<int>();
|
||||||
|
foreach (ReleaseDates releaseDates in resource.release_dates.results)
|
||||||
|
{
|
||||||
|
foreach (ReleaseDate releaseDate in releaseDates.release_dates)
|
||||||
|
{
|
||||||
|
lowestYear.Add(DateTime.Parse(releaseDate.release_date).Year);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
movie.Year = lowestYear.Min();
|
||||||
|
|
||||||
movie.TitleSlug += "-" + movie.TmdbId.ToString();
|
movie.TitleSlug += "-" + movie.TmdbId.ToString();
|
||||||
|
|
||||||
movie.Images.Add(_configService.GetCoverForURL(resource.poster_path, MediaCoverTypes.Poster));//TODO: Update to load image specs from tmdb page!
|
movie.Images.Add(_configService.GetCoverForURL(resource.poster_path, MediaCoverTypes.Poster));//TODO: Update to load image specs from tmdb page!
|
||||||
|
|
|
@ -28,8 +28,12 @@ module.exports = TemplatedCell.extend({
|
||||||
if(ProfileCollection.get(this.defaultProfile))
|
if(ProfileCollection.get(this.defaultProfile))
|
||||||
{
|
{
|
||||||
this.profile = this.defaultProfile;
|
this.profile = this.defaultProfile;
|
||||||
this.$(".x-profile").val(this.defaultProfile);//this.ui.profile.val(this.defaultProfile);
|
this.$(".x-profile").val(this.defaultProfile);
|
||||||
this.model.set("profileId", this.defaultProfile)
|
this.model.set("profileId", this.defaultProfile);
|
||||||
|
} else {
|
||||||
|
this.profile = 1;
|
||||||
|
this.$(".x-profile").val(1);
|
||||||
|
this.model.set("profileId", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.cellValue = ProfileCollection;
|
this.cellValue = ProfileCollection;
|
||||||
|
|
|
@ -4,6 +4,7 @@ var Backgrid = require('backgrid');
|
||||||
var CutoffUnmetCollection = require('./CutoffUnmetCollection');
|
var CutoffUnmetCollection = require('./CutoffUnmetCollection');
|
||||||
var SelectAllCell = require('../../Cells/SelectAllCell');
|
var SelectAllCell = require('../../Cells/SelectAllCell');
|
||||||
var MovieTitleCell = require('../../Cells/MovieTitleCell');
|
var MovieTitleCell = require('../../Cells/MovieTitleCell');
|
||||||
|
var DownloadedQualityCell = require('../../Cells/DownloadedQualityCell');
|
||||||
var MovieStatusWithTextCell = require('../../Cells/MovieStatusWithTextCell');
|
var MovieStatusWithTextCell = require('../../Cells/MovieStatusWithTextCell');
|
||||||
var RelativeDateCell = require('../../Cells/RelativeDateCell');
|
var RelativeDateCell = require('../../Cells/RelativeDateCell');
|
||||||
var GridPager = require('../../Shared/Grid/Pager');
|
var GridPager = require('../../Shared/Grid/Pager');
|
||||||
|
@ -41,6 +42,12 @@ module.exports = Marionette.Layout.extend({
|
||||||
cell : MovieTitleCell,
|
cell : MovieTitleCell,
|
||||||
cellValue : 'this',
|
cellValue : 'this',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name : "downloadedQuality",
|
||||||
|
label : "Downloaded",
|
||||||
|
cell : DownloadedQualityCell,
|
||||||
|
sortable : true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name : 'inCinemas',
|
name : 'inCinemas',
|
||||||
label : 'In Cinemas',
|
label : 'In Cinemas',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue