mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-18 21:55:12 -04:00
Various anime improvements
Series type is persisted in the client New: Warning in UI if anime episode doesn't have an absolute episode number New: If series type is changed the series will be rescanned New: Update scene mappings when series is refreshed
This commit is contained in:
@@ -42,10 +42,11 @@ define(
|
||||
},
|
||||
|
||||
events: {
|
||||
'click .x-add' : '_addSeries',
|
||||
'change .x-quality-profile': '_qualityProfileChanged',
|
||||
'change .x-root-folder' : '_rootFolderChanged',
|
||||
'change .x-season-folder' : '_seasonFolderChanged'
|
||||
'click .x-add' : '_addSeries',
|
||||
'change .x-quality-profile' : '_qualityProfileChanged',
|
||||
'change .x-root-folder' : '_rootFolderChanged',
|
||||
'change .x-season-folder' : '_seasonFolderChanged',
|
||||
'change .x-series-type' : '_seriesTypeChanged'
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
@@ -67,6 +68,7 @@ define(
|
||||
var defaultQuality = Config.getValue(Config.Keys.DefaultQualityProfileId);
|
||||
var defaultRoot = Config.getValue(Config.Keys.DefaultRootFolderId);
|
||||
var useSeasonFolder = Config.getValueBoolean(Config.Keys.UseSeasonFolder, true);
|
||||
var defaultSeriesType = Config.getValueBoolean(Config.Keys.DefaultSeriesType, true);
|
||||
|
||||
if (QualityProfiles.get(defaultQuality)) {
|
||||
this.ui.qualityProfile.val(defaultQuality);
|
||||
@@ -77,6 +79,7 @@ define(
|
||||
}
|
||||
|
||||
this.ui.seasonFolder.prop('checked', useSeasonFolder);
|
||||
this.ui.rootFolder.val(defaultSeriesType);
|
||||
|
||||
var minSeasonNotZero = _.min(_.reject(this.model.get('seasons'), { seasonNumber: 0 }), 'seasonNumber');
|
||||
|
||||
@@ -117,6 +120,10 @@ define(
|
||||
else if (options.key === Config.Keys.UseSeasonFolder) {
|
||||
this.ui.seasonFolder.prop('checked', options.value);
|
||||
}
|
||||
|
||||
else if (options.key === Config.Keys.DefaultSeriesType) {
|
||||
this.ui.seriesType.val(options.value);
|
||||
}
|
||||
},
|
||||
|
||||
_qualityProfileChanged: function () {
|
||||
@@ -139,6 +146,10 @@ define(
|
||||
}
|
||||
},
|
||||
|
||||
_seriesTypeChanged: function () {
|
||||
Config.setValue(Config.Keys.DefaultSeriesType, this.ui.seriesType.val());
|
||||
},
|
||||
|
||||
_setRootFolder: function (options) {
|
||||
vent.trigger(vent.Commands.CloseModalCommand);
|
||||
this.ui.rootFolder.val(options.model.id);
|
||||
|
||||
@@ -172,3 +172,12 @@ td.delete-episode-file-cell {
|
||||
.backup-type-cell {
|
||||
width : 20px;
|
||||
}
|
||||
|
||||
.table>tbody>tr>td, .table>thead>tr>th {
|
||||
|
||||
&.episode-warning-cell {
|
||||
width : 1px;
|
||||
padding-left : 0px;
|
||||
padding-right : 0px;
|
||||
}
|
||||
}
|
||||
|
||||
+5
-4
@@ -8,10 +8,11 @@ define(
|
||||
ConfigUpdatedEvent: 'ConfigUpdatedEvent'
|
||||
},
|
||||
Keys : {
|
||||
DefaultQualityProfileId: 'DefaultQualityProfileId',
|
||||
DefaultRootFolderId : 'DefaultRootFolderId',
|
||||
UseSeasonFolder : 'UseSeasonFolder',
|
||||
AdvancedSettings : 'advancedSettings'
|
||||
DefaultQualityProfileId : 'DefaultQualityProfileId',
|
||||
DefaultRootFolderId : 'DefaultRootFolderId',
|
||||
UseSeasonFolder : 'UseSeasonFolder',
|
||||
DefaultSeriesType : 'DefaultSeriesType',
|
||||
AdvancedSettings : 'advancedSettings'
|
||||
},
|
||||
|
||||
getValueBoolean: function (key, defaultValue) {
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
'use strict';
|
||||
|
||||
define(
|
||||
[
|
||||
'Cells/NzbDroneCell',
|
||||
'Series/SeriesCollection'
|
||||
], function (NzbDroneCell, SeriesCollection) {
|
||||
return NzbDroneCell.extend({
|
||||
|
||||
className: 'episode-warning-cell',
|
||||
|
||||
render: function () {
|
||||
|
||||
this.$el.empty();
|
||||
|
||||
if (SeriesCollection.get(this.model.get('seriesId')).get('seriesType') === 'anime') {
|
||||
|
||||
if (this.model.get('seasonNumber') > 0 && this.model.get('absoluteEpisodeNumber') === 0) {
|
||||
this.$el.html('<i class="icon-nd-form-warning" title="Episode does not have an absolute episode number"></i>');
|
||||
}
|
||||
}
|
||||
|
||||
this.delegateEvents();
|
||||
return this;
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -10,6 +10,7 @@ define(
|
||||
'Cells/EpisodeStatusCell',
|
||||
'Cells/EpisodeActionsCell',
|
||||
'Series/Details/EpisodeNumberCell',
|
||||
'Series/Details/EpisodeWarningCell',
|
||||
'Commands/CommandController',
|
||||
'moment',
|
||||
'underscore',
|
||||
@@ -23,6 +24,7 @@ define(
|
||||
EpisodeStatusCell,
|
||||
EpisodeActionsCell,
|
||||
EpisodeNumberCell,
|
||||
EpisodeWarningCell,
|
||||
CommandController,
|
||||
Moment,
|
||||
_,
|
||||
@@ -64,6 +66,13 @@ define(
|
||||
label: '#',
|
||||
cell : EpisodeNumberCell
|
||||
},
|
||||
{
|
||||
name : 'this',
|
||||
label : '',
|
||||
cell : EpisodeWarningCell,
|
||||
sortable : false,
|
||||
className : 'episode-warning-cell'
|
||||
},
|
||||
{
|
||||
name : 'this',
|
||||
label : 'Title',
|
||||
|
||||
@@ -35,6 +35,10 @@ define(
|
||||
//Do we need this?
|
||||
this.$el.addClass(column.get('name'));
|
||||
|
||||
if (column.has('className')) {
|
||||
this.$el.addClass(column.get('className'));
|
||||
}
|
||||
|
||||
this.delegateEvents();
|
||||
this.direction(column.get('direction'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user