mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 19:50:15 -07:00
Set episode file modified date to local or utc air date
This commit is contained in:
parent
8478379ff4
commit
a02108922f
26 changed files with 175 additions and 202 deletions
|
@ -9,11 +9,10 @@ define(
|
|||
], function (_, vent, Backbone, Marionette, CommandController) {
|
||||
|
||||
return Marionette.ItemView.extend({
|
||||
template: 'Series/Editor/UpdateFiles/UpdateFilesSeriesViewTemplate',
|
||||
template: 'Series/Editor/Organize/OrganizeFilesViewTemplate',
|
||||
|
||||
events: {
|
||||
'click .x-confirm-rename': '_rename',
|
||||
'click .x-confirm-airdate': '_setFileAirDate'
|
||||
'click .x-confirm-organize': '_organize'
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
|
@ -22,7 +21,7 @@ define(
|
|||
this.templateHelpers = { numberOfSeries: this.series.length, series: new Backbone.Collection(this.series).toJSON() };
|
||||
},
|
||||
|
||||
_rename: function () {
|
||||
_organize: function () {
|
||||
var seriesIds = _.pluck(this.series, 'id');
|
||||
|
||||
CommandController.Execute('renameSeries', {
|
||||
|
@ -30,19 +29,7 @@ define(
|
|||
seriesIds : seriesIds
|
||||
});
|
||||
|
||||
this.trigger('updatingFiles');
|
||||
vent.trigger(vent.Commands.CloseModalCommand);
|
||||
},
|
||||
|
||||
_setFileAirDate: function () {
|
||||
var seriesIds = _.pluck(this.series, 'id');
|
||||
|
||||
CommandController.Execute('AirDateSeries', {
|
||||
name: 'AirDateSeries',
|
||||
seriesIds: seriesIds
|
||||
});
|
||||
|
||||
this.trigger('updatingFiles');
|
||||
this.trigger('organizingFiles');
|
||||
vent.trigger(vent.Commands.CloseModalCommand);
|
||||
}
|
||||
});
|
|
@ -1,6 +1,6 @@
|
|||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>Update Files of Selected Series</h3>
|
||||
<h3>Organize of Selected Series</h3>
|
||||
</div>
|
||||
<div class="modal-body update-files-series-modal">
|
||||
<div class="alert alert-info">
|
||||
|
@ -19,6 +19,5 @@
|
|||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal">cancel</button>
|
||||
<button class="btn btn-danger x-confirm-rename">rename</button>
|
||||
<button class="btn btn-danger x-confirm-airdate">set file date to air date</button>
|
||||
<button class="btn btn-danger x-confirm-organize">organize</button>
|
||||
</div>
|
|
@ -10,7 +10,7 @@ define(
|
|||
'AddSeries/RootFolders/RootFolderCollection',
|
||||
'Shared/Toolbar/ToolbarLayout',
|
||||
'AddSeries/RootFolders/RootFolderLayout',
|
||||
'Series/Editor/UpdateFiles/UpdateFilesSeriesView',
|
||||
'Series/Editor/Organize/OrganizeFilesView',
|
||||
'Config'
|
||||
], function (_,
|
||||
Marionette,
|
||||
|
@ -27,20 +27,20 @@ define(
|
|||
template: 'Series/Editor/SeriesEditorFooterViewTemplate',
|
||||
|
||||
ui: {
|
||||
monitored : '.x-monitored',
|
||||
qualityProfile : '.x-quality-profiles',
|
||||
seasonFolder : '.x-season-folder',
|
||||
rootFolder : '.x-root-folder',
|
||||
selectedCount : '.x-selected-count',
|
||||
saveButton : '.x-save',
|
||||
updateFilesButton: '.x-update-files',
|
||||
container : '.series-editor-footer'
|
||||
monitored : '.x-monitored',
|
||||
qualityProfile : '.x-quality-profiles',
|
||||
seasonFolder : '.x-season-folder',
|
||||
rootFolder : '.x-root-folder',
|
||||
selectedCount : '.x-selected-count',
|
||||
saveButton : '.x-save',
|
||||
organizeFilesButton : '.x-organize-files',
|
||||
container : '.series-editor-footer'
|
||||
},
|
||||
|
||||
events: {
|
||||
'click .x-save' : '_updateAndSave',
|
||||
'change .x-root-folder': '_rootFolderChanged',
|
||||
'click .x-update-files': '_updateFiles'
|
||||
'click .x-save' : '_updateAndSave',
|
||||
'change .x-root-folder' : '_rootFolderChanged',
|
||||
'click .x-organize-files' : '_organizeFiles'
|
||||
},
|
||||
|
||||
templateHelpers: function () {
|
||||
|
@ -119,7 +119,7 @@ define(
|
|||
this.ui.seasonFolder.attr('disabled', '');
|
||||
this.ui.rootFolder.attr('disabled', '');
|
||||
this.ui.saveButton.attr('disabled', '');
|
||||
this.ui.updateFilesButton.attr('disabled', '');
|
||||
this.ui.organizeFilesButton.attr('disabled', '');
|
||||
}
|
||||
|
||||
else {
|
||||
|
@ -128,7 +128,7 @@ define(
|
|||
this.ui.seasonFolder.removeAttr('disabled', '');
|
||||
this.ui.rootFolder.removeAttr('disabled', '');
|
||||
this.ui.saveButton.removeAttr('disabled', '');
|
||||
this.ui.updateFilesButton.removeAttr('disabled', '');
|
||||
this.ui.organizeFilesButton.removeAttr('disabled', '');
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -162,7 +162,7 @@ define(
|
|||
});
|
||||
},
|
||||
|
||||
_updateFiles: function () {
|
||||
_organizeFiles: function () {
|
||||
var selected = this.editorGrid.getSelectedModels();
|
||||
var updateFilesSeriesView = new UpdateFilesSeriesView({ series: selected });
|
||||
this.listenToOnce(updateFilesSeriesView, 'updatingFiles', this._afterSave);
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<span class="pull-right">
|
||||
<span class="selected-count x-selected-count">0 series selected</span>
|
||||
<button class="btn btn-primary x-save">Save</button>
|
||||
<button class="btn btn-danger x-update-files">Update Files</button>
|
||||
<button class="btn btn-danger x-organize-files">Organize</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
|
@ -21,23 +21,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Set File Date to Airdate</label>
|
||||
<div class="controls">
|
||||
<label class="checkbox toggle well">
|
||||
<input type="checkbox" name="fileDateAiredDate" />
|
||||
<p>
|
||||
<span>Yes</span>
|
||||
<span>No</span>
|
||||
</p>
|
||||
<div class="btn btn-primary slide-button" />
|
||||
</label>
|
||||
<span class="help-inline-checkbox">
|
||||
<i class="icon-nd-form-info" title="Adjust added media file dates to the original episode aired date" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Download Propers</label>
|
||||
|
||||
|
@ -68,4 +51,19 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Change File Date</label>
|
||||
|
||||
<div class="controls">
|
||||
<select class="inputClass" name="fileDate">
|
||||
<option value="none">None</option>
|
||||
<option value="localAirDate">Local Air Date</option>
|
||||
<option value="utcAirDate">UTC Air Date</option>
|
||||
</select>
|
||||
<span class="help-inline">
|
||||
<i class="icon-nd-form-info" title="Change file date on import/rescan"/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue