mirror of
https://github.com/Radarr/Radarr
synced 2025-02-26 08:02:56 +00:00
Merge branch 'develop' into feature/release-dates
This commit is contained in:
commit
804b2130a8
10 changed files with 65 additions and 41 deletions
|
@ -30,7 +30,7 @@ public MovieResource()
|
|||
public DateTime? PhysicalRelease { get; set; }
|
||||
public List<MediaCover> Images { get; set; }
|
||||
public string Website { get; set; }
|
||||
|
||||
public bool Downloaded { get; set; }
|
||||
public string RemotePoster { get; set; }
|
||||
public int Year { get; set; }
|
||||
|
||||
|
@ -80,6 +80,8 @@ public static MovieResource ToResource(this Core.Tv.Movie model)
|
|||
{
|
||||
if (model == null) return null;
|
||||
|
||||
long Size = model.MovieFile.Value != null ? model.MovieFile.Value.Size : 0;
|
||||
|
||||
return new MovieResource
|
||||
{
|
||||
Id = model.Id,
|
||||
|
@ -89,6 +91,8 @@ public static MovieResource ToResource(this Core.Tv.Movie model)
|
|||
SortTitle = model.SortTitle,
|
||||
InCinemas = model.InCinemas,
|
||||
PhysicalRelease = model.PhysicalRelease,
|
||||
|
||||
Downloaded = model.MovieFile.Value != null,
|
||||
//TotalEpisodeCount
|
||||
//EpisodeCount
|
||||
//EpisodeFileCount
|
||||
|
@ -106,6 +110,8 @@ public static MovieResource ToResource(this Core.Tv.Movie model)
|
|||
|
||||
Monitored = model.Monitored,
|
||||
|
||||
SizeOnDisk = Size,
|
||||
|
||||
Runtime = model.Runtime,
|
||||
LastInfoSync = model.LastInfoSync,
|
||||
CleanTitle = model.CleanTitle,
|
||||
|
|
|
@ -50,7 +50,7 @@ var Collection = PageableCollection.extend({
|
|||
},
|
||||
|
||||
sortMappings : {
|
||||
'movie' : { sortKey : 'movie.sortTitle' }
|
||||
'movie' : { sortKey : 'movie.title' }
|
||||
},
|
||||
|
||||
initialize : function(options) {
|
||||
|
|
6
src/UI/Cells/MovieDownloadStatusCell.js
Normal file
6
src/UI/Cells/MovieDownloadStatusCell.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
var TemplatedCell = require('./TemplatedCell');
|
||||
|
||||
module.exports = TemplatedCell.extend({
|
||||
className : 'movie-title-cell',
|
||||
template : 'Cells/MovieDownloadStatusTemplate',
|
||||
});
|
1
src/UI/Cells/MovieDownloadStatusTemplate.hbs
Normal file
1
src/UI/Cells/MovieDownloadStatusTemplate.hbs
Normal file
|
@ -0,0 +1 @@
|
|||
<span class="label label-{{DownloadedStatusColor}}">{{DownloadedStatus}}</span>
|
|
@ -127,8 +127,40 @@ Handlebars.registerHelper('GetBannerStatus', function() {
|
|||
else if (!monitored) {
|
||||
return new Handlebars.SafeString('<div class="announced-banner"><i class="icon-sonarr-series-unmonitored grid-icon" title=""></i> Not Monitored</div>');
|
||||
}
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('DownloadedStatusColor', function() {
|
||||
if (!this.monitored) {
|
||||
if (this.downloaded) {
|
||||
return "default";
|
||||
}
|
||||
return "warning";
|
||||
}
|
||||
|
||||
if (this.downloaded) {
|
||||
return "success";
|
||||
}
|
||||
|
||||
if (this.status != "released") {
|
||||
return "primary";
|
||||
}
|
||||
|
||||
return "danger";
|
||||
})
|
||||
|
||||
Handlebars.registerHelper('DownloadedStatus', function() {
|
||||
|
||||
if (this.downloaded) {
|
||||
return "Downloaded";
|
||||
}
|
||||
if (!this.monitored) {
|
||||
return "Not Monitored";
|
||||
}
|
||||
|
||||
|
||||
return "Missing";
|
||||
});
|
||||
|
||||
|
||||
Handlebars.registerHelper('inCinemas', function() {
|
||||
var monthNames = ["January", "February", "March", "April", "May", "June",
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
{{else}}
|
||||
<span class="label label-default">Announced</span>
|
||||
{{/if_eq}}
|
||||
<span class="label label-{{DownloadedStatusColor}}">{{DownloadedStatus}}</span>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<span class="series-info-links">
|
||||
|
|
|
@ -12,6 +12,7 @@ var ProfileCell = require('../../Cells/ProfileCell');
|
|||
var MovieLinksCell = require('../../Cells/MovieLinksCell');
|
||||
var MovieActionCell = require('../../Cells/MovieActionCell');
|
||||
var MovieStatusCell = require('../../Cells/MovieStatusCell');
|
||||
var MovieDownloadStatusCell = require('../../Cells/MovieDownloadStatusCell');
|
||||
var FooterView = require('./FooterView');
|
||||
var FooterModel = require('./FooterModel');
|
||||
var ToolbarLayout = require('../../Shared/Toolbar/ToolbarLayout');
|
||||
|
@ -38,7 +39,6 @@ module.exports = Marionette.Layout.extend({
|
|||
label : 'Title',
|
||||
cell : MovieTitleCell,
|
||||
cellValue : 'this',
|
||||
sortValue : 'sortTitle'
|
||||
},
|
||||
{
|
||||
name : 'profileId',
|
||||
|
@ -56,6 +56,11 @@ module.exports = Marionette.Layout.extend({
|
|||
cell : MovieLinksCell,
|
||||
className : "movie-links-cell"
|
||||
},
|
||||
{
|
||||
name : "this",
|
||||
label : "Status",
|
||||
cell : MovieDownloadStatusCell,
|
||||
},
|
||||
{
|
||||
name : 'this',
|
||||
label : '',
|
||||
|
@ -128,25 +133,17 @@ module.exports = Marionette.Layout.extend({
|
|||
title : 'Title',
|
||||
name : 'title'
|
||||
},
|
||||
{
|
||||
title : 'Seasons',
|
||||
name : 'seasonCount'
|
||||
},
|
||||
{
|
||||
title : 'Quality',
|
||||
name : 'profileId'
|
||||
},
|
||||
{
|
||||
title : 'Network',
|
||||
name : 'network'
|
||||
title : 'In Cinemas',
|
||||
name : 'inCinemas'
|
||||
},
|
||||
{
|
||||
title : 'Next Airing',
|
||||
name : 'nextAiring'
|
||||
},
|
||||
{
|
||||
title : 'Episodes',
|
||||
name : 'percentOfEpisodes'
|
||||
title : "Status",
|
||||
name : "status",
|
||||
}
|
||||
]
|
||||
};
|
||||
|
@ -170,27 +167,6 @@ module.exports = Marionette.Layout.extend({
|
|||
tooltip : 'Monitored Only',
|
||||
icon : 'icon-sonarr-monitored',
|
||||
callback : this._setFilter
|
||||
},
|
||||
{
|
||||
key : 'continuing',
|
||||
title : '',
|
||||
tooltip : 'Continuing Only',
|
||||
icon : 'icon-sonarr-series-continuing',
|
||||
callback : this._setFilter
|
||||
},
|
||||
{
|
||||
key : 'ended',
|
||||
title : '',
|
||||
tooltip : 'Ended Only',
|
||||
icon : 'icon-sonarr-series-ended',
|
||||
callback : this._setFilter
|
||||
},
|
||||
{
|
||||
key : 'missing',
|
||||
title : '',
|
||||
tooltip : 'Missing',
|
||||
icon : 'icon-sonarr-missing',
|
||||
callback : this._setFilter
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
<span class="label label-default">{{inCinemas}}</span>
|
||||
|
||||
{{profile profileId}}
|
||||
|
||||
<span class="label label-{{DownloadedStatusColor}}">{{DownloadedStatus}}</span>
|
||||
</div>
|
||||
<div class="col-md-4 col-xs-4">
|
||||
<span class="movie-info-links">
|
||||
|
|
|
@ -15,10 +15,10 @@ var Collection = PageableCollection.extend({
|
|||
tableName : 'movie',
|
||||
|
||||
state : {
|
||||
sortKey : 'sortTitle',
|
||||
order : -1,
|
||||
sortKey : 'title',
|
||||
order : 1,
|
||||
pageSize : 100000,
|
||||
secondarySortKey : 'sortTitle',
|
||||
secondarySortKey : 'title',
|
||||
secondarySortOrder : -1
|
||||
},
|
||||
|
||||
|
@ -73,7 +73,7 @@ var Collection = PageableCollection.extend({
|
|||
|
||||
sortMappings : {
|
||||
title : {
|
||||
sortKey : 'sortTitle'
|
||||
sortKey : 'title'
|
||||
},
|
||||
|
||||
nextAiring : {
|
||||
|
|
|
@ -67,4 +67,4 @@ module.exports = Marionette.ItemView.extend({
|
|||
_removeSortIcon : function() {
|
||||
this.ui.icon.removeClass('icon-sonarr-sort-asc icon-sonarr-sort-desc');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue