diff --git a/src/UI/Activity/Blacklist/BlacklistModel.js b/src/UI/Activity/Blacklist/BlacklistModel.js
index c94d57d47..809186e5c 100644
--- a/src/UI/Activity/Blacklist/BlacklistModel.js
+++ b/src/UI/Activity/Blacklist/BlacklistModel.js
@@ -1,16 +1,9 @@
var Backbone = require('backbone');
-var SeriesModel = require('../../Series/SeriesModel');
-var EpisodeModel = require('../../Series/EpisodeModel');
var MovieModel = require('../../Movies/MovieModel');
var MoviesCollection = require('../../Movies/FullMovieCollection');
module.exports = Backbone.Model.extend({
parse : function(model) {
- if (model.series) {
- model.series = new SeriesModel(model.series);
- model.episode = new EpisodeModel(model.episode);
- model.episode.set('series', model.series);
- }
//if (model.movie) {
// model.movie = new MovieModel(model.movie);
diff --git a/src/UI/Activity/History/HistoryModel.js b/src/UI/Activity/History/HistoryModel.js
index 967b7ba22..e3bc7f242 100644
--- a/src/UI/Activity/History/HistoryModel.js
+++ b/src/UI/Activity/History/HistoryModel.js
@@ -1,16 +1,8 @@
var Backbone = require('backbone');
-var SeriesModel = require('../../Series/SeriesModel');
-var EpisodeModel = require('../../Series/EpisodeModel');
var MovieModel = require('../../Movies/MovieModel');
module.exports = Backbone.Model.extend({
parse : function(model) {
- if (model.series) {
- model.series = new SeriesModel(model.series);
- model.episode = new EpisodeModel(model.episode);
- model.episode.set('series', model.series);
- }
-
if (model.movie) {
model.movie = new MovieModel(model.movie);
}
diff --git a/src/UI/Activity/Queue/QueueModel.js b/src/UI/Activity/Queue/QueueModel.js
index e9b3fb045..fc8900be1 100644
--- a/src/UI/Activity/Queue/QueueModel.js
+++ b/src/UI/Activity/Queue/QueueModel.js
@@ -1,13 +1,8 @@
var Backbone = require('backbone');
-var SeriesModel = require('../../Series/SeriesModel');
-var EpisodeModel = require('../../Series/EpisodeModel');
var MovieModel = require('../../Movies/MovieModel');
module.exports = Backbone.Model.extend({
parse : function(model) {
- model.series = new SeriesModel(model.series);
- model.episode = new EpisodeModel(model.episode);
- model.episode.set('series', model.series);
model.movie = new MovieModel(model.movie);
return model;
}
diff --git a/src/UI/AddSeries/AddSeriesCollection.js b/src/UI/AddSeries/AddSeriesCollection.js
deleted file mode 100644
index 5be24d3a7..000000000
--- a/src/UI/AddSeries/AddSeriesCollection.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var Backbone = require('backbone');
-var SeriesModel = require('../Series/SeriesModel');
-var _ = require('underscore');
-
-module.exports = Backbone.Collection.extend({
- url : window.NzbDrone.ApiRoot + '/series/lookup',
- model : SeriesModel,
-
- parse : function(response) {
- var self = this;
-
- _.each(response, function(model) {
- model.id = undefined;
-
- if (self.unmappedFolderModel) {
- model.path = self.unmappedFolderModel.get('folder').path;
- }
- });
-
- return response;
- }
-});
\ No newline at end of file
diff --git a/src/UI/AddSeries/AddSeriesLayout.js b/src/UI/AddSeries/AddSeriesLayout.js
deleted file mode 100644
index 166aedb5a..000000000
--- a/src/UI/AddSeries/AddSeriesLayout.js
+++ /dev/null
@@ -1,53 +0,0 @@
-var vent = require('vent');
-var AppLayout = require('../AppLayout');
-var Marionette = require('marionette');
-var RootFolderLayout = require('./RootFolders/RootFolderLayout');
-var ExistingSeriesCollectionView = require('./Existing/AddExistingSeriesCollectionView');
-var AddSeriesView = require('./AddSeriesView');
-var ProfileCollection = require('../Profile/ProfileCollection');
-var RootFolderCollection = require('./RootFolders/RootFolderCollection');
-require('../Series/SeriesCollection');
-
-module.exports = Marionette.Layout.extend({
- template : 'AddSeries/AddSeriesLayoutTemplate',
-
- regions : {
- workspace : '#add-series-workspace'
- },
-
- events : {
- 'click .x-import' : '_importSeries',
- 'click .x-add-new' : '_addSeries'
- },
-
- attributes : {
- id : 'add-series-screen'
- },
-
- initialize : function() {
- ProfileCollection.fetch();
- RootFolderCollection.fetch().done(function() {
- RootFolderCollection.synced = true;
- });
- },
-
- onShow : function() {
- this.workspace.show(new AddSeriesView());
- },
-
- _folderSelected : function(options) {
- vent.trigger(vent.Commands.CloseModalCommand);
-
- this.workspace.show(new ExistingSeriesCollectionView({ model : options.model }));
- },
-
- _importSeries : function() {
- this.rootFolderLayout = new RootFolderLayout();
- this.listenTo(this.rootFolderLayout, 'folderSelected', this._folderSelected);
- AppLayout.modalRegion.show(this.rootFolderLayout);
- },
-
- _addSeries : function() {
- this.workspace.show(new AddSeriesView());
- }
-});
\ No newline at end of file
diff --git a/src/UI/AddSeries/AddSeriesLayoutTemplate.hbs b/src/UI/AddSeries/AddSeriesLayoutTemplate.hbs
deleted file mode 100644
index 097a7ed75..000000000
--- a/src/UI/AddSeries/AddSeriesLayoutTemplate.hbs
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/src/UI/AddSeries/AddSeriesView.js b/src/UI/AddSeries/AddSeriesView.js
deleted file mode 100644
index 3cda1db63..000000000
--- a/src/UI/AddSeries/AddSeriesView.js
+++ /dev/null
@@ -1,182 +0,0 @@
-var _ = require('underscore');
-var vent = require('vent');
-var Marionette = require('marionette');
-var AddSeriesCollection = require('./AddSeriesCollection');
-var SearchResultCollectionView = require('./SearchResultCollectionView');
-var EmptyView = require('./EmptyView');
-var NotFoundView = require('./NotFoundView');
-var ErrorView = require('./ErrorView');
-var LoadingView = require('../Shared/LoadingView');
-
-module.exports = Marionette.Layout.extend({
- template : 'AddSeries/AddSeriesViewTemplate',
-
- regions : {
- searchResult : '#search-result'
- },
-
- ui : {
- seriesSearch : '.x-series-search',
- searchBar : '.x-search-bar',
- loadMore : '.x-load-more'
- },
-
- events : {
- 'click .x-load-more' : '_onLoadMore'
- },
-
- initialize : function(options) {
- this.isExisting = options.isExisting;
- this.collection = new AddSeriesCollection();
-
- if (this.isExisting) {
- this.collection.unmappedFolderModel = this.model;
- }
-
- if (this.isExisting) {
- this.className = 'existing-series';
- } else {
- this.className = 'new-series';
- }
-
- this.listenTo(vent, vent.Events.SeriesAdded, this._onSeriesAdded);
- this.listenTo(this.collection, 'sync', this._showResults);
-
- this.resultCollectionView = new SearchResultCollectionView({
- collection : this.collection,
- isExisting : this.isExisting
- });
-
- this.throttledSearch = _.debounce(this.search, 1000, { trailing : true }).bind(this);
- },
-
- onRender : function() {
- var self = this;
-
- this.$el.addClass(this.className);
-
- this.ui.seriesSearch.keyup(function(e) {
-
- if (_.contains([
- 9,
- 16,
- 17,
- 18,
- 19,
- 20,
- 33,
- 34,
- 35,
- 36,
- 37,
- 38,
- 39,
- 40,
- 91,
- 92,
- 93
- ], e.keyCode)) {
- return;
- }
-
- self._abortExistingSearch();
- self.throttledSearch({
- term : self.ui.seriesSearch.val()
- });
- });
-
- this._clearResults();
-
- if (this.isExisting) {
- this.ui.searchBar.hide();
- }
- },
-
- onShow : function() {
- this.ui.seriesSearch.focus();
- },
-
- search : function(options) {
- var self = this;
-
- this.collection.reset();
-
- if (!options.term || options.term === this.collection.term) {
- return Marionette.$.Deferred().resolve();
- }
-
- this.searchResult.show(new LoadingView());
- this.collection.term = options.term;
- this.currentSearchPromise = this.collection.fetch({
- data : { term : options.term }
- });
-
- this.currentSearchPromise.fail(function() {
- self._showError();
- });
-
- return this.currentSearchPromise;
- },
-
- _onSeriesAdded : function(options) {
- if (this.isExisting && options.series.get('path') === this.model.get('folder').path) {
- this.close();
- }
-
- else if (!this.isExisting) {
- this.collection.term = '';
- this.collection.reset();
- this._clearResults();
- this.ui.seriesSearch.val('');
- this.ui.seriesSearch.focus();
- }
- },
-
- _onLoadMore : function() {
- var showingAll = this.resultCollectionView.showMore();
- this.ui.searchBar.show();
-
- if (showingAll) {
- this.ui.loadMore.hide();
- }
- },
-
- _clearResults : function() {
- if (!this.isExisting) {
- this.searchResult.show(new EmptyView());
- } else {
- this.searchResult.close();
- }
- },
-
- _showResults : function() {
- if (!this.isClosed) {
- if (this.collection.length === 0) {
- this.ui.searchBar.show();
- this.searchResult.show(new NotFoundView({ term : this.collection.term }));
- } else {
- this.searchResult.show(this.resultCollectionView);
- if (!this.showingAll && this.isExisting) {
- this.ui.loadMore.show();
- }
- }
- }
- },
-
- _abortExistingSearch : function() {
- if (this.currentSearchPromise && this.currentSearchPromise.readyState > 0 && this.currentSearchPromise.readyState < 4) {
- console.log('aborting previous pending search request.');
- this.currentSearchPromise.abort();
- } else {
- this._clearResults();
- }
- },
-
- _showError : function() {
- if (!this.isClosed) {
- this.ui.searchBar.show();
- this.searchResult.show(new ErrorView({ term : this.collection.term }));
- this.collection.term = '';
- }
- }
-});
\ No newline at end of file
diff --git a/src/UI/AddSeries/AddSeriesViewTemplate.hbs b/src/UI/AddSeries/AddSeriesViewTemplate.hbs
deleted file mode 100644
index 8048f48ae..000000000
--- a/src/UI/AddSeries/AddSeriesViewTemplate.hbs
+++ /dev/null
@@ -1,24 +0,0 @@
-{{#if folder.path}}
-{{/if}}
-
-
-
-
- more
-
diff --git a/src/UI/AddSeries/EmptyView.js b/src/UI/AddSeries/EmptyView.js
deleted file mode 100644
index 047a07ca5..000000000
--- a/src/UI/AddSeries/EmptyView.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Marionette = require('marionette');
-
-module.exports = Marionette.CompositeView.extend({
- template : 'AddSeries/EmptyViewTemplate'
-});
\ No newline at end of file
diff --git a/src/UI/AddSeries/EmptyViewTemplate.hbs b/src/UI/AddSeries/EmptyViewTemplate.hbs
deleted file mode 100644
index 60346f0c0..000000000
--- a/src/UI/AddSeries/EmptyViewTemplate.hbs
+++ /dev/null
@@ -1,3 +0,0 @@
-
- You can also search by tvdbid using the tvdb: prefixes.
-
diff --git a/src/UI/AddSeries/ErrorView.js b/src/UI/AddSeries/ErrorView.js
deleted file mode 100644
index 3b619bcb2..000000000
--- a/src/UI/AddSeries/ErrorView.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var Marionette = require('marionette');
-
-module.exports = Marionette.CompositeView.extend({
- template : 'AddSeries/ErrorViewTemplate',
-
- initialize : function(options) {
- this.options = options;
- },
-
- templateHelpers : function() {
- return this.options;
- }
-});
\ No newline at end of file
diff --git a/src/UI/AddSeries/ErrorViewTemplate.hbs b/src/UI/AddSeries/ErrorViewTemplate.hbs
deleted file mode 100644
index 163779c26..000000000
--- a/src/UI/AddSeries/ErrorViewTemplate.hbs
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
- There was an error searching for '{{term}}'.
-
-
- If the series title contains non-alphanumeric characters try removing them, otherwise try your search again later.
-
diff --git a/src/UI/AddSeries/Existing/AddExistingSeriesCollectionView.js b/src/UI/AddSeries/Existing/AddExistingSeriesCollectionView.js
deleted file mode 100644
index 5c5eddc64..000000000
--- a/src/UI/AddSeries/Existing/AddExistingSeriesCollectionView.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var Marionette = require('marionette');
-var AddSeriesView = require('../AddSeriesView');
-var UnmappedFolderCollection = require('./UnmappedFolderCollection');
-
-module.exports = Marionette.CompositeView.extend({
- itemView : AddSeriesView,
- itemViewContainer : '.x-loading-folders',
- template : 'AddSeries/Existing/AddExistingSeriesCollectionViewTemplate',
-
- ui : {
- loadingFolders : '.x-loading-folders'
- },
-
- initialize : function() {
- this.collection = new UnmappedFolderCollection();
- this.collection.importItems(this.model);
- },
-
- showCollection : function() {
- this._showAndSearch(0);
- },
-
- appendHtml : function(collectionView, itemView, index) {
- collectionView.ui.loadingFolders.before(itemView.el);
- },
-
- _showAndSearch : function(index) {
- var self = this;
- var model = this.collection.at(index);
-
- if (model) {
- var currentIndex = index;
- var folderName = model.get('folder').name;
- this.addItemView(model, this.getItemView(), index);
- this.children.findByModel(model).search({ term : folderName }).always(function() {
- if (!self.isClosed) {
- self._showAndSearch(currentIndex + 1);
- }
- });
- }
-
- else {
- this.ui.loadingFolders.hide();
- }
- },
-
- itemViewOptions : {
- isExisting : true
- }
-
-});
\ No newline at end of file
diff --git a/src/UI/AddSeries/Existing/AddExistingSeriesCollectionViewTemplate.hbs b/src/UI/AddSeries/Existing/AddExistingSeriesCollectionViewTemplate.hbs
deleted file mode 100644
index d613a52d4..000000000
--- a/src/UI/AddSeries/Existing/AddExistingSeriesCollectionViewTemplate.hbs
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- Loading search results from TheTVDB for your series, this may take a few minutes.
-
-
\ No newline at end of file
diff --git a/src/UI/AddSeries/Existing/UnmappedFolderCollection.js b/src/UI/AddSeries/Existing/UnmappedFolderCollection.js
deleted file mode 100644
index bd2a83f49..000000000
--- a/src/UI/AddSeries/Existing/UnmappedFolderCollection.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var Backbone = require('backbone');
-var UnmappedFolderModel = require('./UnmappedFolderModel');
-var _ = require('underscore');
-
-module.exports = Backbone.Collection.extend({
- model : UnmappedFolderModel,
-
- importItems : function(rootFolderModel) {
-
- this.reset();
- var rootFolder = rootFolderModel;
-
- _.each(rootFolderModel.get('unmappedFolders'), function(folder) {
- this.push(new UnmappedFolderModel({
- rootFolder : rootFolder,
- folder : folder
- }));
- }, this);
- }
-});
\ No newline at end of file
diff --git a/src/UI/AddSeries/Existing/UnmappedFolderModel.js b/src/UI/AddSeries/Existing/UnmappedFolderModel.js
deleted file mode 100644
index 3986a5948..000000000
--- a/src/UI/AddSeries/Existing/UnmappedFolderModel.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var Backbone = require('backbone');
-
-module.exports = Backbone.Model.extend({});
\ No newline at end of file
diff --git a/src/UI/AddSeries/MonitoringTooltipTemplate.hbs b/src/UI/AddSeries/MonitoringTooltipTemplate.hbs
deleted file mode 100644
index 5e295c281..000000000
--- a/src/UI/AddSeries/MonitoringTooltipTemplate.hbs
+++ /dev/null
@@ -1,18 +0,0 @@
-
- - All
- - Monitor all episodes except specials
- - Future
- - Monitor episodes that have not aired yet
- - Missing
- - Monitor episodes that do not have files or have not aired yet
- - Existing
- - Monitor episodes that have files or have not aired yet
- - First Season
- - Monitor all episodes of the first season. All other seasons will be ignored
- - Latest Season
- - Monitor all episodes of the latest season and future seasons
- - None
- - No episodes will be monitored.
- {{!--- Latest Season
-->
- - Monitor all episodes the latest season only, previous seasons will be ignored
--}}
-
diff --git a/src/UI/AddSeries/NotFoundView.js b/src/UI/AddSeries/NotFoundView.js
deleted file mode 100644
index 9dce2bf85..000000000
--- a/src/UI/AddSeries/NotFoundView.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var Marionette = require('marionette');
-
-module.exports = Marionette.CompositeView.extend({
- template : 'AddSeries/NotFoundViewTemplate',
-
- initialize : function(options) {
- this.options = options;
- },
-
- templateHelpers : function() {
- return this.options;
- }
-});
\ No newline at end of file
diff --git a/src/UI/AddSeries/NotFoundViewTemplate.hbs b/src/UI/AddSeries/NotFoundViewTemplate.hbs
deleted file mode 100644
index f203260e2..000000000
--- a/src/UI/AddSeries/NotFoundViewTemplate.hbs
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
- Sorry. We couldn't find any series matching '{{term}}'
-
-
Why can't I find my show?
-
-
diff --git a/src/UI/AddSeries/RootFolders/RootFolderCollection.js b/src/UI/AddSeries/RootFolders/RootFolderCollection.js
deleted file mode 100644
index 81050c19d..000000000
--- a/src/UI/AddSeries/RootFolders/RootFolderCollection.js
+++ /dev/null
@@ -1,10 +0,0 @@
-var Backbone = require('backbone');
-var RootFolderModel = require('./RootFolderModel');
-require('../../Mixins/backbone.signalr.mixin');
-
-var RootFolderCollection = Backbone.Collection.extend({
- url : window.NzbDrone.ApiRoot + '/rootfolder',
- model : RootFolderModel
-});
-
-module.exports = new RootFolderCollection();
\ No newline at end of file
diff --git a/src/UI/AddSeries/RootFolders/RootFolderCollectionView.js b/src/UI/AddSeries/RootFolders/RootFolderCollectionView.js
deleted file mode 100644
index f781f21d7..000000000
--- a/src/UI/AddSeries/RootFolders/RootFolderCollectionView.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var Marionette = require('marionette');
-var RootFolderItemView = require('./RootFolderItemView');
-
-module.exports = Marionette.CompositeView.extend({
- template : 'AddSeries/RootFolders/RootFolderCollectionViewTemplate',
- itemViewContainer : '.x-root-folders',
- itemView : RootFolderItemView
-});
\ No newline at end of file
diff --git a/src/UI/AddSeries/RootFolders/RootFolderCollectionViewTemplate.hbs b/src/UI/AddSeries/RootFolders/RootFolderCollectionViewTemplate.hbs
deleted file mode 100644
index 70755bbca..000000000
--- a/src/UI/AddSeries/RootFolders/RootFolderCollectionViewTemplate.hbs
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- Path
- |
-
- Free Space
- |
-
-
-
-
\ No newline at end of file
diff --git a/src/UI/AddSeries/RootFolders/RootFolderItemView.js b/src/UI/AddSeries/RootFolders/RootFolderItemView.js
deleted file mode 100644
index a0e98100b..000000000
--- a/src/UI/AddSeries/RootFolders/RootFolderItemView.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var Marionette = require('marionette');
-
-module.exports = Marionette.ItemView.extend({
- template : 'AddSeries/RootFolders/RootFolderItemViewTemplate',
- className : 'recent-folder',
- tagName : 'tr',
-
- initialize : function() {
- this.listenTo(this.model, 'change', this.render);
- },
-
- events : {
- 'click .x-delete' : 'removeFolder',
- 'click .x-folder' : 'folderSelected'
- },
-
- removeFolder : function() {
- var self = this;
-
- this.model.destroy().success(function() {
- self.close();
- });
- },
-
- folderSelected : function() {
- this.trigger('folderSelected', this.model);
- }
-});
\ No newline at end of file
diff --git a/src/UI/AddSeries/RootFolders/RootFolderItemViewTemplate.hbs b/src/UI/AddSeries/RootFolders/RootFolderItemViewTemplate.hbs
deleted file mode 100644
index 2203e1efd..000000000
--- a/src/UI/AddSeries/RootFolders/RootFolderItemViewTemplate.hbs
+++ /dev/null
@@ -1,9 +0,0 @@
-
- {{path}}
- |
-
- {{Bytes freeSpace}}
- |
-
-
- |
diff --git a/src/UI/AddSeries/RootFolders/RootFolderLayout.js b/src/UI/AddSeries/RootFolders/RootFolderLayout.js
deleted file mode 100644
index 6dae383d7..000000000
--- a/src/UI/AddSeries/RootFolders/RootFolderLayout.js
+++ /dev/null
@@ -1,77 +0,0 @@
-var Marionette = require('marionette');
-var RootFolderCollectionView = require('./RootFolderCollectionView');
-var RootFolderCollection = require('./RootFolderCollection');
-var RootFolderModel = require('./RootFolderModel');
-var LoadingView = require('../../Shared/LoadingView');
-var AsValidatedView = require('../../Mixins/AsValidatedView');
-require('../../Mixins/FileBrowser');
-
-var Layout = Marionette.Layout.extend({
- template : 'AddSeries/RootFolders/RootFolderLayoutTemplate',
-
- ui : {
- pathInput : '.x-path'
- },
-
- regions : {
- currentDirs : '#current-dirs'
- },
-
- events : {
- 'click .x-add' : '_addFolder',
- 'keydown .x-path input' : '_keydown'
- },
-
- initialize : function() {
- this.collection = RootFolderCollection;
- this.rootfolderListView = new RootFolderCollectionView({ collection : RootFolderCollection });
-
- this.listenTo(this.rootfolderListView, 'itemview:folderSelected', this._onFolderSelected);
- },
-
- onShow : function() {
- this.listenTo(RootFolderCollection, 'sync', this._showCurrentDirs);
- this.currentDirs.show(new LoadingView());
-
- if (RootFolderCollection.synced) {
- this._showCurrentDirs();
- }
-
- this.ui.pathInput.fileBrowser();
- },
-
- _onFolderSelected : function(options) {
- this.trigger('folderSelected', options);
- },
-
- _addFolder : function() {
- var self = this;
-
- var newDir = new RootFolderModel({
- Path : this.ui.pathInput.val()
- });
-
- this.bindToModelValidation(newDir);
-
- newDir.save().done(function() {
- RootFolderCollection.add(newDir);
- self.trigger('folderSelected', { model : newDir });
- });
- },
-
- _showCurrentDirs : function() {
- this.currentDirs.show(this.rootfolderListView);
- },
-
- _keydown : function(e) {
- if (e.keyCode !== 13) {
- return;
- }
-
- this._addFolder();
- }
-});
-
-var Layout = AsValidatedView.apply(Layout);
-
-module.exports = Layout;
\ No newline at end of file
diff --git a/src/UI/AddSeries/RootFolders/RootFolderLayoutTemplate.hbs b/src/UI/AddSeries/RootFolders/RootFolderLayoutTemplate.hbs
deleted file mode 100644
index 83cb9535d..000000000
--- a/src/UI/AddSeries/RootFolders/RootFolderLayoutTemplate.hbs
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
Enter the path that contains some or all of your TV series, you will be able to choose which series you want to import
-
-
-
-
-
- {{#if items}}
-
Recent Folders
- {{/if}}
-
-
-
-
-
-
diff --git a/src/UI/AddSeries/RootFolders/RootFolderModel.js b/src/UI/AddSeries/RootFolders/RootFolderModel.js
deleted file mode 100644
index 28681768b..000000000
--- a/src/UI/AddSeries/RootFolders/RootFolderModel.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var Backbone = require('backbone');
-
-module.exports = Backbone.Model.extend({
- urlRoot : window.NzbDrone.ApiRoot + '/rootfolder',
- defaults : {
- freeSpace : 0
- }
-});
\ No newline at end of file
diff --git a/src/UI/AddSeries/RootFolders/RootFolderSelectionPartial.hbs b/src/UI/AddSeries/RootFolders/RootFolderSelectionPartial.hbs
deleted file mode 100644
index 56729b0dd..000000000
--- a/src/UI/AddSeries/RootFolders/RootFolderSelectionPartial.hbs
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
diff --git a/src/UI/AddSeries/SearchResultCollectionView.js b/src/UI/AddSeries/SearchResultCollectionView.js
deleted file mode 100644
index e533085ac..000000000
--- a/src/UI/AddSeries/SearchResultCollectionView.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var Marionette = require('marionette');
-var SearchResultView = require('./SearchResultView');
-
-module.exports = Marionette.CollectionView.extend({
- itemView : SearchResultView,
-
- initialize : function(options) {
- this.isExisting = options.isExisting;
- this.showing = 1;
- },
-
- showAll : function() {
- this.showingAll = true;
- this.render();
- },
-
- showMore : function() {
- this.showing += 5;
- this.render();
-
- return this.showing >= this.collection.length;
- },
-
- appendHtml : function(collectionView, itemView, index) {
- if (!this.isExisting || index < this.showing || index === 0) {
- collectionView.$el.append(itemView.el);
- }
- }
-});
\ No newline at end of file
diff --git a/src/UI/AddSeries/SearchResultView.js b/src/UI/AddSeries/SearchResultView.js
deleted file mode 100644
index 817ab78ea..000000000
--- a/src/UI/AddSeries/SearchResultView.js
+++ /dev/null
@@ -1,288 +0,0 @@
-var _ = require('underscore');
-var vent = require('vent');
-var AppLayout = require('../AppLayout');
-var Backbone = require('backbone');
-var Marionette = require('marionette');
-var Profiles = require('../Profile/ProfileCollection');
-var RootFolders = require('./RootFolders/RootFolderCollection');
-var RootFolderLayout = require('./RootFolders/RootFolderLayout');
-var SeriesCollection = require('../Series/SeriesCollection');
-var Config = require('../Config');
-var Messenger = require('../Shared/Messenger');
-var AsValidatedView = require('../Mixins/AsValidatedView');
-
-require('jquery.dotdotdot');
-
-var view = Marionette.ItemView.extend({
-
- template : 'AddSeries/SearchResultViewTemplate',
-
- ui : {
- profile : '.x-profile',
- rootFolder : '.x-root-folder',
- seasonFolder : '.x-season-folder',
- seriesType : '.x-series-type',
- monitor : '.x-monitor',
- monitorTooltip : '.x-monitor-tooltip',
- addButton : '.x-add',
- addSearchButton : '.x-add-search',
- overview : '.x-overview'
- },
-
- events : {
- 'click .x-add' : '_addWithoutSearch',
- 'click .x-add-search' : '_addAndSearch',
- 'change .x-profile' : '_profileChanged',
- 'change .x-root-folder' : '_rootFolderChanged',
- 'change .x-season-folder' : '_seasonFolderChanged',
- 'change .x-series-type' : '_seriesTypeChanged',
- 'change .x-monitor' : '_monitorChanged'
- },
-
- initialize : function() {
-
- if (!this.model) {
- throw 'model is required';
- }
-
- this.templateHelpers = {};
- this._configureTemplateHelpers();
-
- this.listenTo(vent, Config.Events.ConfigUpdatedEvent, this._onConfigUpdated);
- this.listenTo(this.model, 'change', this.render);
- this.listenTo(RootFolders, 'all', this._rootFoldersUpdated);
- },
-
- onRender : function() {
-
- var defaultProfile = Config.getValue(Config.Keys.DefaultProfileId);
- var defaultRoot = Config.getValue(Config.Keys.DefaultRootFolderId);
- var useSeasonFolder = Config.getValueBoolean(Config.Keys.UseSeasonFolder, true);
- var defaultSeriesType = Config.getValue(Config.Keys.DefaultSeriesType, 'standard');
- var defaultMonitorEpisodes = Config.getValue(Config.Keys.MonitorEpisodes, 'missing');
-
- if (Profiles.get(defaultProfile)) {
- this.ui.profile.val(defaultProfile);
- }
-
- if (RootFolders.get(defaultRoot)) {
- this.ui.rootFolder.val(defaultRoot);
- }
-
- this.ui.seasonFolder.prop('checked', useSeasonFolder);
- this.ui.seriesType.val(defaultSeriesType);
- this.ui.monitor.val(defaultMonitorEpisodes);
-
- //TODO: make this work via onRender, FM?
- //works with onShow, but stops working after the first render
- this.ui.overview.dotdotdot({
- height : 120
- });
-
- this.templateFunction = Marionette.TemplateCache.get('AddSeries/MonitoringTooltipTemplate');
- var content = this.templateFunction();
-
- this.ui.monitorTooltip.popover({
- content : content,
- html : true,
- trigger : 'hover',
- title : 'Episode Monitoring Options',
- placement : 'right',
- container : this.$el
- });
- },
-
- _configureTemplateHelpers : function() {
- var existingSeries = SeriesCollection.where({ tvdbId : this.model.get('tvdbId') });
-
- if (existingSeries.length > 0) {
- this.templateHelpers.existing = existingSeries[0].toJSON();
- }
-
- this.templateHelpers.profiles = Profiles.toJSON();
-
- if (!this.model.get('isExisting')) {
- this.templateHelpers.rootFolders = RootFolders.toJSON();
- }
- },
-
- _onConfigUpdated : function(options) {
- if (options.key === Config.Keys.DefaultProfileId) {
- this.ui.profile.val(options.value);
- }
-
- else if (options.key === Config.Keys.DefaultRootFolderId) {
- this.ui.rootFolder.val(options.value);
- }
-
- 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);
- }
-
- else if (options.key === Config.Keys.MonitorEpisodes) {
- this.ui.monitor.val(options.value);
- }
- },
-
- _profileChanged : function() {
- Config.setValue(Config.Keys.DefaultProfileId, this.ui.profile.val());
- },
-
- _seasonFolderChanged : function() {
- Config.setValue(Config.Keys.UseSeasonFolder, this.ui.seasonFolder.prop('checked'));
- },
-
- _rootFolderChanged : function() {
- var rootFolderValue = this.ui.rootFolder.val();
- if (rootFolderValue === 'addNew') {
- var rootFolderLayout = new RootFolderLayout();
- this.listenToOnce(rootFolderLayout, 'folderSelected', this._setRootFolder);
- AppLayout.modalRegion.show(rootFolderLayout);
- } else {
- Config.setValue(Config.Keys.DefaultRootFolderId, rootFolderValue);
- }
- },
-
- _seriesTypeChanged : function() {
- Config.setValue(Config.Keys.DefaultSeriesType, this.ui.seriesType.val());
- },
-
- _monitorChanged : function() {
- Config.setValue(Config.Keys.MonitorEpisodes, this.ui.monitor.val());
- },
-
- _setRootFolder : function(options) {
- vent.trigger(vent.Commands.CloseModalCommand);
- this.ui.rootFolder.val(options.model.id);
- this._rootFolderChanged();
- },
-
- _addWithoutSearch : function() {
- this._addSeries(false);
- },
-
- _addAndSearch : function() {
- this._addSeries(true);
- },
-
- _addSeries : function(searchForMissingEpisodes) {
- var addButton = this.ui.addButton;
- var addSearchButton = this.ui.addSearchButton;
-
- addButton.addClass('disabled');
- addSearchButton.addClass('disabled');
-
- var profile = this.ui.profile.val();
- var rootFolderPath = this.ui.rootFolder.children(':selected').text();
- var seriesType = this.ui.seriesType.val();
- var seasonFolder = this.ui.seasonFolder.prop('checked');
-
- var options = this._getAddSeriesOptions();
- options.searchForMissingEpisodes = searchForMissingEpisodes;
-
- this.model.set({
- profileId : profile,
- rootFolderPath : rootFolderPath,
- seasonFolder : seasonFolder,
- seriesType : seriesType,
- addOptions : options,
- monitored : true
- }, { silent : true });
-
- var self = this;
- var promise = this.model.save();
-
- if (searchForMissingEpisodes) {
- this.ui.addSearchButton.spinForPromise(promise);
- }
-
- else {
- this.ui.addButton.spinForPromise(promise);
- }
-
- promise.always(function() {
- addButton.removeClass('disabled');
- addSearchButton.removeClass('disabled');
- });
-
- promise.done(function() {
- SeriesCollection.add(self.model);
-
- self.close();
-
- Messenger.show({
- message : 'Added: ' + self.model.get('title'),
- actions : {
- goToSeries : {
- label : 'Go to Series',
- action : function() {
- Backbone.history.navigate('/series/' + self.model.get('titleSlug'), { trigger : true });
- }
- }
- },
- hideAfter : 8,
- hideOnNavigate : true
- });
-
- vent.trigger(vent.Events.SeriesAdded, { series : self.model });
- });
- },
-
- _rootFoldersUpdated : function() {
- this._configureTemplateHelpers();
- this.render();
- },
-
- _getAddSeriesOptions : function() {
- var monitor = this.ui.monitor.val();
- var lastSeason = _.max(this.model.get('seasons'), 'seasonNumber');
- var firstSeason = _.min(_.reject(this.model.get('seasons'), { seasonNumber : 0 }), 'seasonNumber');
-
- this.model.setSeasonPass(firstSeason.seasonNumber);
-
- var options = {
- ignoreEpisodesWithFiles : false,
- ignoreEpisodesWithoutFiles : false
- };
-
- if (monitor === 'all') {
- return options;
- }
-
- else if (monitor === 'future') {
- options.ignoreEpisodesWithFiles = true;
- options.ignoreEpisodesWithoutFiles = true;
- }
-
- else if (monitor === 'latest') {
- this.model.setSeasonPass(lastSeason.seasonNumber);
- }
-
- else if (monitor === 'first') {
- this.model.setSeasonPass(lastSeason.seasonNumber + 1);
- this.model.setSeasonMonitored(firstSeason.seasonNumber);
- }
-
- else if (monitor === 'missing') {
- options.ignoreEpisodesWithFiles = true;
- }
-
- else if (monitor === 'existing') {
- options.ignoreEpisodesWithoutFiles = true;
- }
-
- else if (monitor === 'none') {
- this.model.setSeasonPass(lastSeason.seasonNumber + 1);
- }
-
- return options;
- }
-});
-
-AsValidatedView.apply(view);
-
-module.exports = view;
diff --git a/src/UI/AddSeries/SearchResultViewTemplate.hbs b/src/UI/AddSeries/SearchResultViewTemplate.hbs
deleted file mode 100644
index c6cd84799..000000000
--- a/src/UI/AddSeries/SearchResultViewTemplate.hbs
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
-
-
-
- {{titleWithYear}}
-
-
- {{network}}
- {{#unless_eq status compare="continuing"}}
- Ended
- {{/unless_eq}}
-
-
-
-
-
-
- {{#unless existing}}
- {{#unless path}}
-
-
- {{> RootFolderSelectionPartial rootFolders}}
-
- {{/unless}}
-
-
-
-
-
-
-
-
- {{> ProfileSelectionPartial profiles}}
-
-
-
-
- {{> SeriesTypeSelectionPartial}}
-
-
-
- {{/unless}}
-
-
- {{#unless existing}}
- {{#if title}}
-
- {{else}}
-
-
-
- {{/if}}
- {{else}}
-
- {{/unless}}
-
-
-
-
diff --git a/src/UI/AddSeries/SeriesTypeSelectionPartial.hbs b/src/UI/AddSeries/SeriesTypeSelectionPartial.hbs
deleted file mode 100644
index ec2990640..000000000
--- a/src/UI/AddSeries/SeriesTypeSelectionPartial.hbs
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/src/UI/AddSeries/StartingSeasonSelectionPartial.hbs b/src/UI/AddSeries/StartingSeasonSelectionPartial.hbs
deleted file mode 100644
index e5623e33a..000000000
--- a/src/UI/AddSeries/StartingSeasonSelectionPartial.hbs
+++ /dev/null
@@ -1,13 +0,0 @@
-
diff --git a/src/UI/AddSeries/addSeries.less b/src/UI/AddSeries/addSeries.less
deleted file mode 100644
index 820f64af1..000000000
--- a/src/UI/AddSeries/addSeries.less
+++ /dev/null
@@ -1,173 +0,0 @@
-@import "../Shared/Styles/card.less";
-@import "../Shared/Styles/clickable.less";
-
-#add-series-screen {
- .existing-series {
-
- .card();
- margin : 30px 0;
-
- .unmapped-folder-path {
- padding: 20px;
- margin-left : 0;
- font-weight : 100;
- font-size : 25px;
- text-align : center;
- }
-
- .new-series-loadmore {
- font-size : 30px;
- font-weight : 300;
- padding-top : 10px;
- padding-bottom : 10px;
- }
- }
-
- .new-series {
- .search-item {
- .card();
- margin : 40px 0;
- }
- }
-
- .add-series-search {
- margin-top : 20px;
- margin-bottom : 20px;
- }
-
- .search-item {
-
- padding-bottom : 20px;
-
- .series-title {
- margin-top : 5px;
-
- .labels {
- margin-left : 10px;
-
- .label {
- font-size : 12px;
- vertical-align : middle;
- }
- }
-
- .year {
- font-style : italic;
- color : #aaaaaa;
- }
- }
-
- .new-series-overview {
- overflow : hidden;
- height : 103px;
-
- .overview-internal {
- overflow : hidden;
- height : 80px;
- }
- }
-
- .series-poster {
- min-width : 138px;
- min-height : 203px;
- max-width : 138px;
- max-height : 203px;
- margin : 10px;
- }
-
- a {
- color : #343434;
- }
-
- a:hover {
- text-decoration : none;
- }
-
- select {
- font-size : 14px;
- }
-
- .checkbox {
- margin-top : 0;
- }
-
- .add {
- i {
- &:before {
- color : #ffffff;
- }
- }
- }
-
- .monitor-tooltip {
- margin-left : 5px;
- }
- }
-
- .loading-folders {
- margin : 30px 0;
- text-align: center;
- }
-
- .hint {
- color : #999999;
- font-style : italic;
- }
-
- .monitor-tooltip-contents {
- padding-bottom : 0;
-
- dd {
- padding-bottom : 8px;
- }
- }
-}
-
-li.add-new {
- .clickable;
-
- display: block;
- padding: 3px 20px;
- clear: both;
- font-weight: normal;
- line-height: 20px;
- color: rgb(51, 51, 51);
- white-space: nowrap;
-}
-
-li.add-new:hover {
- text-decoration: none;
- color: rgb(255, 255, 255);
- background-color: rgb(0, 129, 194);
-}
-
-.root-folders-modal {
- overflow : visible;
-
- .root-folders-list {
- overflow-y : auto;
- max-height : 300px;
-
- i {
- .clickable();
- }
- }
-
- .validation-errors {
- display : none;
- }
-
- .input-group {
- .form-control {
- background-color : white;
- }
- }
-
- .root-folders {
- margin-top : 20px;
- }
-
- .recent-folder {
- .clickable();
- }
-}
diff --git a/src/UI/Content/theme.less b/src/UI/Content/theme.less
index 29ebf6ece..5e528f196 100644
--- a/src/UI/Content/theme.less
+++ b/src/UI/Content/theme.less
@@ -20,7 +20,6 @@
@import "../Shared/FileBrowser/filebrowser";
@import "badges";
@import "../ManualImport/manualimport";
-@import "../SeasonPass/seasonpass";
.main-region {
@media (min-width : @screen-lg-min) {
diff --git a/src/UI/Controller.js b/src/UI/Controller.js
index 49d57c7be..f95a92e1b 100644
--- a/src/UI/Controller.js
+++ b/src/UI/Controller.js
@@ -3,22 +3,14 @@ var AppLayout = require('./AppLayout');
var Marionette = require('marionette');
var ActivityLayout = require('./Activity/ActivityLayout');
var SettingsLayout = require('./Settings/SettingsLayout');
-var AddSeriesLayout = require('./AddSeries/AddSeriesLayout');
var AddMoviesLayout = require('./AddMovies/AddMoviesLayout');
var WantedLayout = require('./Wanted/WantedLayout');
var CalendarLayout = require('./Calendar/CalendarLayout');
var ReleaseLayout = require('./Release/ReleaseLayout');
var SystemLayout = require('./System/SystemLayout');
-var SeasonPassLayout = require('./SeasonPass/SeasonPassLayout');
-var SeriesEditorLayout = require('./Series/Editor/SeriesEditorLayout');
var MovieEditorLayout = require('./Movies/Editor/MovieEditorLayout');
module.exports = NzbDroneController.extend({
- addSeries : function(action) {
- this.setTitle('Add Movie');
- this.showMainRegion(new AddSeriesLayout({ action : action }));
- },
-
addMovies : function(action, query) {
this.setTitle("Add Movie");
this.showMainRegion(new AddMoviesLayout({ action : action, query : query }));
@@ -54,16 +46,6 @@ module.exports = NzbDroneController.extend({
this.showMainRegion(new SystemLayout({ action : action }));
},
- seasonPass : function() {
- this.setTitle('Season Pass');
- this.showMainRegion(new SeasonPassLayout());
- },
-
- seriesEditor : function() {
- this.setTitle('Series Editor');
- this.showMainRegion(new SeriesEditorLayout());
- },
-
movieEditor : function() {
this.setTitle('Movie Editor');
this.showMainRegion(new MovieEditorLayout());
diff --git a/src/UI/Episode/EpisodeDetailsLayout.js b/src/UI/Episode/EpisodeDetailsLayout.js
deleted file mode 100644
index 8bdf13525..000000000
--- a/src/UI/Episode/EpisodeDetailsLayout.js
+++ /dev/null
@@ -1,130 +0,0 @@
-var Marionette = require('marionette');
-var SummaryLayout = require('./Summary/EpisodeSummaryLayout');
-var SearchLayout = require('./Search/EpisodeSearchLayout');
-var EpisodeHistoryLayout = require('./History/EpisodeHistoryLayout');
-var SeriesCollection = require('../Series/SeriesCollection');
-var Messenger = require('../Shared/Messenger');
-
-module.exports = Marionette.Layout.extend({
- className : 'modal-lg',
- template : 'Episode/EpisodeDetailsLayoutTemplate',
-
- regions : {
- summary : '#episode-summary',
- history : '#episode-history',
- search : '#episode-search'
- },
-
- ui : {
- summary : '.x-episode-summary',
- history : '.x-episode-history',
- search : '.x-episode-search',
- monitored : '.x-episode-monitored'
- },
-
- events : {
-
- 'click .x-episode-summary' : '_showSummary',
- 'click .x-episode-history' : '_showHistory',
- 'click .x-episode-search' : '_showSearch',
- 'click .x-episode-monitored' : '_toggleMonitored'
- },
-
- templateHelpers : {},
-
- initialize : function(options) {
- this.templateHelpers.hideSeriesLink = options.hideSeriesLink;
-
- this.series = SeriesCollection.get(this.model.get('seriesId'));
- this.templateHelpers.series = this.series.toJSON();
- this.openingTab = options.openingTab || 'summary';
-
- this.listenTo(this.model, 'sync', this._setMonitoredState);
- },
-
- onShow : function() {
- this.searchLayout = new SearchLayout({ model : this.model });
-
- if (this.openingTab === 'search') {
- this.searchLayout.startManualSearch = true;
- this._showSearch();
- }
-
- else {
- this._showSummary();
- }
-
- this._setMonitoredState();
-
- if (this.series.get('monitored')) {
- this.$el.removeClass('series-not-monitored');
- }
-
- else {
- this.$el.addClass('series-not-monitored');
- }
- },
-
- _showSummary : function(e) {
- if (e) {
- e.preventDefault();
- }
-
- this.ui.summary.tab('show');
- this.summary.show(new SummaryLayout({
- model : this.model,
- series : this.series
- }));
- },
-
- _showHistory : function(e) {
- if (e) {
- e.preventDefault();
- }
-
- this.ui.history.tab('show');
- this.history.show(new EpisodeHistoryLayout({
- model : this.model,
- series : this.series
- }));
- },
-
- _showSearch : function(e) {
- if (e) {
- e.preventDefault();
- }
-
- this.ui.search.tab('show');
- this.search.show(this.searchLayout);
- },
-
- _toggleMonitored : function() {
- if (!this.series.get('monitored')) {
-
- Messenger.show({
- message : 'Unable to change monitored state when series is not monitored',
- type : 'error'
- });
-
- return;
- }
-
- var name = 'monitored';
- this.model.set(name, !this.model.get(name), { silent : true });
-
- this.ui.monitored.addClass('icon-sonarr-spinner fa-spin');
- this.model.save();
- },
-
- _setMonitoredState : function() {
- this.ui.monitored.removeClass('fa-spin icon-sonarr-spinner');
-
- if (this.model.get('monitored')) {
- this.ui.monitored.addClass('icon-sonarr-monitored');
- this.ui.monitored.removeClass('icon-sonarr-unmonitored');
- } else {
- this.ui.monitored.addClass('icon-sonarr-unmonitored');
- this.ui.monitored.removeClass('icon-sonarr-monitored');
- }
- }
-});
diff --git a/src/UI/Episode/EpisodeDetailsLayoutTemplate.hbs b/src/UI/Episode/EpisodeDetailsLayoutTemplate.hbs
deleted file mode 100644
index bac2e4559..000000000
--- a/src/UI/Episode/EpisodeDetailsLayoutTemplate.hbs
+++ /dev/null
@@ -1,35 +0,0 @@
-
diff --git a/src/UI/Episode/History/EpisodeHistoryActionsCell.js b/src/UI/Episode/History/EpisodeHistoryActionsCell.js
deleted file mode 100644
index c8c352aab..000000000
--- a/src/UI/Episode/History/EpisodeHistoryActionsCell.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var $ = require('jquery');
-var vent = require('vent');
-var Marionette = require('marionette');
-var NzbDroneCell = require('../../Cells/NzbDroneCell');
-
-module.exports = NzbDroneCell.extend({
- className : 'episode-actions-cell',
-
- events : {
- 'click .x-failed' : '_markAsFailed'
- },
-
- render : function() {
- this.$el.empty();
-
- if (this.model.get('eventType') === 'grabbed') {
- this.$el.html('');
- }
-
- return this;
- },
-
- _markAsFailed : function() {
- var url = window.NzbDrone.ApiRoot + '/history/failed';
- var data = {
- id : this.model.get('id')
- };
-
- $.ajax({
- url : url,
- type : 'POST',
- data : data
- });
- }
-});
\ No newline at end of file
diff --git a/src/UI/Episode/History/EpisodeHistoryDetailsCell.js b/src/UI/Episode/History/EpisodeHistoryDetailsCell.js
deleted file mode 100644
index 366a25040..000000000
--- a/src/UI/Episode/History/EpisodeHistoryDetailsCell.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var $ = require('jquery');
-var vent = require('vent');
-var Marionette = require('marionette');
-var NzbDroneCell = require('../../Cells/NzbDroneCell');
-var HistoryDetailsView = require('../../Activity/History/Details/HistoryDetailsView');
-require('bootstrap');
-
-module.exports = NzbDroneCell.extend({
- className : 'episode-history-details-cell',
-
- render : function() {
- this.$el.empty();
- this.$el.html('');
-
- var html = new HistoryDetailsView({ model : this.model }).render().$el;
-
- this.$el.popover({
- content : html,
- html : true,
- trigger : 'hover',
- title : 'Details',
- placement : 'left',
- container : this.$el
- });
-
- return this;
- }
-});
\ No newline at end of file
diff --git a/src/UI/Episode/History/EpisodeHistoryLayout.js b/src/UI/Episode/History/EpisodeHistoryLayout.js
deleted file mode 100644
index f474f4566..000000000
--- a/src/UI/Episode/History/EpisodeHistoryLayout.js
+++ /dev/null
@@ -1,84 +0,0 @@
-var Marionette = require('marionette');
-var Backgrid = require('backgrid');
-var HistoryCollection = require('../../Activity/History/HistoryCollection');
-var EventTypeCell = require('../../Cells/EventTypeCell');
-var QualityCell = require('../../Cells/QualityCell');
-var RelativeDateCell = require('../../Cells/RelativeDateCell');
-var EpisodeHistoryActionsCell = require('./EpisodeHistoryActionsCell');
-var EpisodeHistoryDetailsCell = require('./EpisodeHistoryDetailsCell');
-var NoHistoryView = require('./NoHistoryView');
-var LoadingView = require('../../Shared/LoadingView');
-
-module.exports = Marionette.Layout.extend({
- template : 'Episode/History/EpisodeHistoryLayoutTemplate',
-
- regions : {
- historyTable : '.history-table'
- },
-
- columns : [
- {
- name : 'eventType',
- label : '',
- cell : EventTypeCell,
- cellValue : 'this'
- },
- {
- name : 'sourceTitle',
- label : 'Source Title',
- cell : 'string'
- },
- {
- name : 'quality',
- label : 'Quality',
- cell : QualityCell
- },
- {
- name : 'date',
- label : 'Date',
- cell : RelativeDateCell
- },
- {
- name : 'this',
- label : '',
- cell : EpisodeHistoryDetailsCell,
- sortable : false
- },
- {
- name : 'this',
- label : '',
- cell : EpisodeHistoryActionsCell,
- sortable : false
- }
- ],
-
- initialize : function(options) {
- this.model = options.model;
- this.series = options.series;
-
- this.collection = new HistoryCollection({
- episodeId : this.model.id,
- tableName : 'episodeHistory'
- });
- this.collection.fetch();
- this.listenTo(this.collection, 'sync', this._showTable);
- },
-
- onRender : function() {
- this.historyTable.show(new LoadingView());
- },
-
- _showTable : function() {
- if (this.collection.any()) {
- this.historyTable.show(new Backgrid.Grid({
- collection : this.collection,
- columns : this.columns,
- className : 'table table-hover table-condensed'
- }));
- }
-
- else {
- this.historyTable.show(new NoHistoryView());
- }
- }
-});
\ No newline at end of file
diff --git a/src/UI/Episode/History/EpisodeHistoryLayoutTemplate.hbs b/src/UI/Episode/History/EpisodeHistoryLayoutTemplate.hbs
deleted file mode 100644
index 54fb50522..000000000
--- a/src/UI/Episode/History/EpisodeHistoryLayoutTemplate.hbs
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/UI/Episode/History/NoHistoryView.js b/src/UI/Episode/History/NoHistoryView.js
deleted file mode 100644
index 883b5dfdc..000000000
--- a/src/UI/Episode/History/NoHistoryView.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Marionette = require('marionette');
-
-module.exports = Marionette.ItemView.extend({
- template : 'Episode/History/NoHistoryViewTemplate'
-});
\ No newline at end of file
diff --git a/src/UI/Episode/History/NoHistoryViewTemplate.hbs b/src/UI/Episode/History/NoHistoryViewTemplate.hbs
deleted file mode 100644
index 561e84d59..000000000
--- a/src/UI/Episode/History/NoHistoryViewTemplate.hbs
+++ /dev/null
@@ -1,3 +0,0 @@
-
- No history for this episode.
-
\ No newline at end of file
diff --git a/src/UI/Episode/Search/ButtonsView.js b/src/UI/Episode/Search/ButtonsView.js
deleted file mode 100644
index 6972f1201..000000000
--- a/src/UI/Episode/Search/ButtonsView.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Marionette = require('marionette');
-
-module.exports = Marionette.ItemView.extend({
- template : 'Episode/Search/ButtonsViewTemplate'
-});
\ No newline at end of file
diff --git a/src/UI/Episode/Search/ButtonsViewTemplate.hbs b/src/UI/Episode/Search/ButtonsViewTemplate.hbs
deleted file mode 100644
index 6ad9474d5..000000000
--- a/src/UI/Episode/Search/ButtonsViewTemplate.hbs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/UI/Episode/Search/EpisodeSearchLayout.js b/src/UI/Episode/Search/EpisodeSearchLayout.js
deleted file mode 100644
index 14ee5ca42..000000000
--- a/src/UI/Episode/Search/EpisodeSearchLayout.js
+++ /dev/null
@@ -1,82 +0,0 @@
-var vent = require('vent');
-var Marionette = require('marionette');
-var ButtonsView = require('./ButtonsView');
-var ManualSearchLayout = require('./ManualLayout');
-var ReleaseCollection = require('../../Release/ReleaseCollection');
-var CommandController = require('../../Commands/CommandController');
-var LoadingView = require('../../Shared/LoadingView');
-var NoResultsView = require('./NoResultsView');
-
-module.exports = Marionette.Layout.extend({
- template : 'Episode/Search/EpisodeSearchLayoutTemplate',
-
- regions : {
- main : '#episode-search-region'
- },
-
- events : {
- 'click .x-search-auto' : '_searchAuto',
- 'click .x-search-manual' : '_searchManual',
- 'click .x-search-back' : '_showButtons'
- },
-
- initialize : function() {
- this.mainView = new ButtonsView();
- this.releaseCollection = new ReleaseCollection();
-
- this.listenTo(this.releaseCollection, 'sync', this._showSearchResults);
- },
-
- onShow : function() {
- if (this.startManualSearch) {
- this._searchManual();
- }
-
- else {
- this._showMainView();
- }
- },
-
- _searchAuto : function(e) {
- if (e) {
- e.preventDefault();
- }
-
- CommandController.Execute('episodeSearch', {
- episodeIds : [this.model.get('id')]
- });
-
- vent.trigger(vent.Commands.CloseModalCommand);
- },
-
- _searchManual : function(e) {
- if (e) {
- e.preventDefault();
- }
-
- this.mainView = new LoadingView();
- this._showMainView();
- this.releaseCollection.fetchEpisodeReleases(this.model.id);
- },
-
- _showMainView : function() {
- this.main.show(this.mainView);
- },
-
- _showButtons : function() {
- this.mainView = new ButtonsView();
- this._showMainView();
- },
-
- _showSearchResults : function() {
- if (this.releaseCollection.length === 0) {
- this.mainView = new NoResultsView();
- }
-
- else {
- this.mainView = new ManualSearchLayout({ collection : this.releaseCollection });
- }
-
- this._showMainView();
- }
-});
\ No newline at end of file
diff --git a/src/UI/Episode/Search/EpisodeSearchLayoutTemplate.hbs b/src/UI/Episode/Search/EpisodeSearchLayoutTemplate.hbs
deleted file mode 100644
index 879e0b356..000000000
--- a/src/UI/Episode/Search/EpisodeSearchLayoutTemplate.hbs
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/UI/Episode/Search/ManualLayout.js b/src/UI/Episode/Search/ManualLayout.js
deleted file mode 100644
index 3b7463e19..000000000
--- a/src/UI/Episode/Search/ManualLayout.js
+++ /dev/null
@@ -1,93 +0,0 @@
-var Marionette = require('marionette');
-var Backgrid = require('backgrid');
-var ReleaseTitleCell = require('../../Cells/ReleaseTitleCell');
-var FileSizeCell = require('../../Cells/FileSizeCell');
-var QualityCell = require('../../Cells/QualityCell');
-var ApprovalStatusCell = require('../../Cells/ApprovalStatusCell');
-var DownloadReportCell = require('../../Release/DownloadReportCell');
-var AgeCell = require('../../Release/AgeCell');
-var ProtocolCell = require('../../Release/ProtocolCell');
-var PeersCell = require('../../Release/PeersCell');
-var EditionCell = require('../../Cells/EditionCell');
-
-module.exports = Marionette.Layout.extend({
- template : 'Episode/Search/ManualLayoutTemplate',
-
- regions : {
- grid : '#episode-release-grid'
- },
-
- columns : [
- {
- name : 'protocol',
- label : 'Source',
- cell : ProtocolCell
- },
- {
- name : 'age',
- label : 'Age',
- cell : AgeCell
- },
- {
- name : 'title',
- label : 'Title',
- cell : ReleaseTitleCell
- },
- {
- name : 'edition',
- label : 'Edition',
- cell : EditionCell,
- title : "Edition"
- },
- {
- name : 'indexer',
- label : 'Indexer',
- cell : Backgrid.StringCell
- },
- {
- name : 'size',
- label : 'Size',
- cell : FileSizeCell
- },
- {
- name : 'seeders',
- label : 'Peers',
- cell : PeersCell
- },
- {
- name : 'quality',
- label : 'Quality',
- cell : QualityCell
- },
- {
- name : 'rejections',
- label : '',
- tooltip : 'Rejections',
- cell : ApprovalStatusCell,
- sortable : true,
- sortType : 'fixed',
- direction : 'ascending',
- title : 'Release Rejected'
- },
- {
- name : 'download',
- label : '',
- tooltip : 'Auto-Search Prioritization',
- cell : DownloadReportCell,
- sortable : true,
- sortType : 'fixed',
- direction : 'ascending'
- }
- ],
-
- onShow : function() {
- if (!this.isClosed) {
- this.grid.show(new Backgrid.Grid({
- row : Backgrid.Row,
- columns : this.columns,
- collection : this.collection,
- className : 'table table-hover'
- }));
- }
- }
-});
diff --git a/src/UI/Episode/Search/ManualLayoutTemplate.hbs b/src/UI/Episode/Search/ManualLayoutTemplate.hbs
deleted file mode 100644
index 1797eb289..000000000
--- a/src/UI/Episode/Search/ManualLayoutTemplate.hbs
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/src/UI/Episode/Search/NoResultsView.js b/src/UI/Episode/Search/NoResultsView.js
deleted file mode 100644
index a1a68c4fa..000000000
--- a/src/UI/Episode/Search/NoResultsView.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Marionette = require('marionette');
-
-module.exports = Marionette.ItemView.extend({
- template : 'Episode/Search/NoResultsViewTemplate'
-});
\ No newline at end of file
diff --git a/src/UI/Episode/Search/NoResultsViewTemplate.hbs b/src/UI/Episode/Search/NoResultsViewTemplate.hbs
deleted file mode 100644
index 7904e5520..000000000
--- a/src/UI/Episode/Search/NoResultsViewTemplate.hbs
+++ /dev/null
@@ -1 +0,0 @@
-No results found
\ No newline at end of file
diff --git a/src/UI/Episode/Summary/EpisodeSummaryLayout.js b/src/UI/Episode/Summary/EpisodeSummaryLayout.js
deleted file mode 100644
index 29eaad626..000000000
--- a/src/UI/Episode/Summary/EpisodeSummaryLayout.js
+++ /dev/null
@@ -1,119 +0,0 @@
-var reqres = require('../../reqres');
-var Marionette = require('marionette');
-var Backgrid = require('backgrid');
-var EpisodeFileModel = require('../../Series/EpisodeFileModel');
-var EpisodeFileCollection = require('../../Series/EpisodeFileCollection');
-var FileSizeCell = require('../../Cells/FileSizeCell');
-var QualityCell = require('../../Cells/QualityCell');
-var DeleteEpisodeFileCell = require('../../Cells/DeleteEpisodeFileCell');
-var NoFileView = require('./NoFileView');
-var LoadingView = require('../../Shared/LoadingView');
-
-module.exports = Marionette.Layout.extend({
- template : 'Episode/Summary/EpisodeSummaryLayoutTemplate',
-
- regions : {
- overview : '.episode-overview',
- activity : '.episode-file-info'
- },
-
- columns : [
- {
- name : 'path',
- label : 'Path',
- cell : 'string',
- sortable : false
- },
- {
- name : 'size',
- label : 'Size',
- cell : FileSizeCell,
- sortable : false
- },
- {
- name : 'quality',
- label : 'Quality',
- cell : QualityCell,
- sortable : false,
- editable : true
- },
- {
- name : 'this',
- label : '',
- cell : DeleteEpisodeFileCell,
- sortable : false
- }
- ],
-
- templateHelpers : {},
-
- initialize : function(options) {
- if (!this.model.series) {
- this.templateHelpers.series = options.series.toJSON();
- }
- },
-
- onShow : function() {
- if (this.model.get('hasFile')) {
- var episodeFileId = this.model.get('episodeFileId');
-
- if (reqres.hasHandler(reqres.Requests.GetEpisodeFileById)) {
- var episodeFile = reqres.request(reqres.Requests.GetEpisodeFileById, episodeFileId);
- this.episodeFileCollection = new EpisodeFileCollection(episodeFile, { seriesId : this.model.get('seriesId') });
- this.listenTo(episodeFile, 'destroy', this._episodeFileDeleted);
-
- this._showTable();
- }
-
- else {
- this.activity.show(new LoadingView());
-
- var self = this;
- var newEpisodeFile = new EpisodeFileModel({ id : episodeFileId });
- this.episodeFileCollection = new EpisodeFileCollection(newEpisodeFile, { seriesId : this.model.get('seriesId') });
- var promise = newEpisodeFile.fetch();
- this.listenTo(newEpisodeFile, 'destroy', this._episodeFileDeleted);
-
- promise.done(function() {
- self._showTable();
- });
- }
-
- this.listenTo(this.episodeFileCollection, 'add remove', this._collectionChanged);
- }
-
- else {
- this._showNoFileView();
- }
- },
-
- _showTable : function() {
- this.activity.show(new Backgrid.Grid({
- collection : this.episodeFileCollection,
- columns : this.columns,
- className : 'table table-bordered',
- emptyText : 'Nothing to see here!'
- }));
- },
-
- _showNoFileView : function() {
- this.activity.show(new NoFileView());
- },
-
- _collectionChanged : function() {
- if (!this.episodeFileCollection.any()) {
- this._showNoFileView();
- }
-
- else {
- this._showTable();
- }
- },
-
- _episodeFileDeleted : function() {
- this.model.set({
- episodeFileId : 0,
- hasFile : false
- });
- }
-});
\ No newline at end of file
diff --git a/src/UI/Episode/Summary/EpisodeSummaryLayoutTemplate.hbs b/src/UI/Episode/Summary/EpisodeSummaryLayoutTemplate.hbs
deleted file mode 100644
index 9cfeca2da..000000000
--- a/src/UI/Episode/Summary/EpisodeSummaryLayoutTemplate.hbs
+++ /dev/null
@@ -1,14 +0,0 @@
-
- {{#with series}}
- {{profile profileId}}
- {{network}}
- {{/with}}
- {{StartTime airDateUtc}}
- {{RelativeDate airDateUtc}}
-
-
-
- {{overview}}
-
-
-
diff --git a/src/UI/Episode/Summary/NoFileView.js b/src/UI/Episode/Summary/NoFileView.js
deleted file mode 100644
index 07aabc810..000000000
--- a/src/UI/Episode/Summary/NoFileView.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Marionette = require('marionette');
-
-module.exports = Marionette.ItemView.extend({
- template : 'Episode/Summary/NoFileViewTemplate'
-});
\ No newline at end of file
diff --git a/src/UI/Episode/Summary/NoFileViewTemplate.hbs b/src/UI/Episode/Summary/NoFileViewTemplate.hbs
deleted file mode 100644
index 0f923737d..000000000
--- a/src/UI/Episode/Summary/NoFileViewTemplate.hbs
+++ /dev/null
@@ -1,3 +0,0 @@
-
- No file available for this episode.
-
\ No newline at end of file
diff --git a/src/UI/EpisodeFile/Editor/EmptyView.js b/src/UI/EpisodeFile/Editor/EmptyView.js
deleted file mode 100644
index e84453524..000000000
--- a/src/UI/EpisodeFile/Editor/EmptyView.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Marionette = require('marionette');
-
-module.exports = Marionette.CompositeView.extend({
- template : 'EpisodeFile/Editor/EmptyViewTemplate'
-});
\ No newline at end of file
diff --git a/src/UI/EpisodeFile/Editor/EmptyViewTemplate.hbs b/src/UI/EpisodeFile/Editor/EmptyViewTemplate.hbs
deleted file mode 100644
index 0a51692de..000000000
--- a/src/UI/EpisodeFile/Editor/EmptyViewTemplate.hbs
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/src/UI/EpisodeFile/Editor/EpisodeFileEditorLayout.js b/src/UI/EpisodeFile/Editor/EpisodeFileEditorLayout.js
deleted file mode 100644
index a974c8f7c..000000000
--- a/src/UI/EpisodeFile/Editor/EpisodeFileEditorLayout.js
+++ /dev/null
@@ -1,200 +0,0 @@
-var _ = require('underscore');
-var reqres = require('../../reqres');
-var Marionette = require('marionette');
-var Backgrid = require('backgrid');
-var FormatHelpers = require('../../Shared/FormatHelpers');
-var SelectAllCell = require('../../Cells/SelectAllCell');
-var EpisodeNumberCell = require('../../Series/Details/EpisodeNumberCell');
-var SeasonEpisodeNumberCell = require('../../Cells/EpisodeNumberCell');
-var EpisodeFilePathCell = require('../../Cells/EpisodeFilePathCell');
-var EpisodeStatusCell = require('../../Cells/EpisodeStatusCell');
-var RelativeDateCell = require('../../Cells/RelativeDateCell');
-var EpisodeCollection = require('../../Series/EpisodeCollection');
-var ProfileSchemaCollection = require('../../Settings/Profile/ProfileSchemaCollection');
-var QualitySelectView = require('./QualitySelectView');
-var EmptyView = require('./EmptyView');
-
-module.exports = Marionette.Layout.extend({
- className : 'modal-lg',
- template : 'EpisodeFile/Editor/EpisodeFileEditorLayoutTemplate',
-
- regions : {
- episodeGrid : '.x-episode-list',
- quality : '.x-quality'
- },
-
- ui : {
- seasonMonitored : '.x-season-monitored'
- },
-
- events : {
- 'click .x-season-monitored' : '_seasonMonitored',
- 'click .x-delete-files' : '_deleteFiles'
- },
-
- initialize : function(options) {
- if (!options.series) {
- throw 'series is required';
- }
-
- if (!options.episodeCollection) {
- throw 'episodeCollection is required';
- }
-
- var filtered = options.episodeCollection.filter(function(episode) {
- return episode.get('episodeFileId') > 0;
- });
-
- this.series = options.series;
- this.episodeCollection = options.episodeCollection;
- this.filteredEpisodes = new EpisodeCollection(filtered);
-
- this.templateHelpers = {};
- this.templateHelpers.series = this.series.toJSON();
-
- this._getColumns();
- },
-
- onRender : function() {
- this._getQualities();
- this._showEpisodes();
- },
-
- _getColumns : function () {
- var episodeCell = {};
-
- if (this.model) {
- episodeCell.name = 'episodeNumber';
- episodeCell.label = '#';
- episodeCell.cell = EpisodeNumberCell;
- }
-
- else {
- episodeCell.name = 'seasonEpisode';
- episodeCell.cellValue = 'this';
- episodeCell.label = 'Episode';
- episodeCell.cell = SeasonEpisodeNumberCell;
- episodeCell.sortValue = this._seasonEpisodeSorter;
- }
-
- this.columns = [
- {
- name : '',
- cell : SelectAllCell,
- headerCell : 'select-all',
- sortable : false
- },
- episodeCell,
- {
- name : 'episodeNumber',
- label : 'Relative Path',
- cell : EpisodeFilePathCell,
- sortable : false
- },
- {
- name : 'airDateUtc',
- label : 'Air Date',
- cell : RelativeDateCell
- },
- {
- name : 'status',
- label : 'Quality',
- cell : EpisodeStatusCell,
- sortable : false
- }
- ];
- },
-
- _showEpisodes : function() {
- if (this.filteredEpisodes.length === 0) {
- this.episodeGrid.show(new EmptyView());
- return;
- }
-
- this._setInitialSort();
-
- this.episodeGridView = new Backgrid.Grid({
- columns : this.columns,
- collection : this.filteredEpisodes,
- className : 'table table-hover season-grid'
- });
-
- this.episodeGrid.show(this.episodeGridView);
- },
-
- _setInitialSort : function () {
- if (!this.model) {
- this.filteredEpisodes.setSorting('seasonEpisode', 1, { sortValue: this._seasonEpisodeSorter });
- this.filteredEpisodes.fullCollection.sort();
- }
- },
-
- _getQualities : function() {
- var self = this;
-
- var profileSchemaCollection = new ProfileSchemaCollection();
- var promise = profileSchemaCollection.fetch();
-
- promise.done(function() {
- var profile = profileSchemaCollection.first();
-
- self.qualitySelectView = new QualitySelectView({ qualities: _.map(profile.get('items'), 'quality') });
- self.listenTo(self.qualitySelectView, 'seasonedit:quality', self._changeQuality);
-
- self.quality.show(self.qualitySelectView);
- });
- },
-
- _changeQuality : function(options) {
- var newQuality = {
- quality : options.selected,
- revision : {
- version : 1,
- real : 0
- }
- };
-
- var selected = this._getSelectedEpisodeFileIds();
-
- _.each(selected, function(episodeFileId) {
- if (reqres.hasHandler(reqres.Requests.GetEpisodeFileById)) {
- var episodeFile = reqres.request(reqres.Requests.GetEpisodeFileById, episodeFileId);
- episodeFile.set('quality', newQuality);
- episodeFile.save();
- }
- });
- },
-
- _deleteFiles : function() {
- if (!window.confirm('Are you sure you want to delete the episode files for the selected episodes?')) {
- return;
- }
-
- var selected = this._getSelectedEpisodeFileIds();
-
- _.each(selected, function(episodeFileId) {
- if (reqres.hasHandler(reqres.Requests.GetEpisodeFileById)) {
- var episodeFile = reqres.request(reqres.Requests.GetEpisodeFileById, episodeFileId);
-
- episodeFile.destroy();
- }
- });
-
- _.each(this.episodeGridView.getSelectedModels(), function(episode) {
- this.episodeGridView.removeRow(episode);
- }, this);
- },
-
- _getSelectedEpisodeFileIds: function () {
- return _.uniq(_.map(this.episodeGridView.getSelectedModels(), function (episode) {
- return episode.get('episodeFileId');
- }));
- },
-
- _seasonEpisodeSorter : function (model, attr) {
- var seasonNumber = FormatHelpers.pad(model.get('seasonNumber'), 4, 0);
- var episodeNumber = FormatHelpers.pad(model.get('episodeNumber'), 4, 0);
-
- return seasonNumber + episodeNumber;
- }
-});
diff --git a/src/UI/EpisodeFile/Editor/EpisodeFileEditorLayoutTemplate.hbs b/src/UI/EpisodeFile/Editor/EpisodeFileEditorLayoutTemplate.hbs
deleted file mode 100644
index 6f7e84109..000000000
--- a/src/UI/EpisodeFile/Editor/EpisodeFileEditorLayoutTemplate.hbs
+++ /dev/null
@@ -1,28 +0,0 @@
-
diff --git a/src/UI/EpisodeFile/Editor/QualitySelectView.js b/src/UI/EpisodeFile/Editor/QualitySelectView.js
deleted file mode 100644
index beac4f304..000000000
--- a/src/UI/EpisodeFile/Editor/QualitySelectView.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var _ = require('underscore');
-var Marionette = require('marionette');
-
-module.exports = Marionette.ItemView.extend({
- template : 'EpisodeFile/Editor/QualitySelectViewTemplate',
-
- ui : {
- select : '.x-select'
- },
-
- events : {
- 'change .x-select' : '_changeSelect'
- },
-
- initialize : function (options) {
- this.qualities = options.qualities;
-
- this.templateHelpers = {
- qualities : this.qualities
- };
- },
-
- _changeSelect : function () {
- var value = this.ui.select.val();
-
- if (value === 'choose') {
- return;
- }
-
- var quality = _.find(this.qualities, { 'id': parseInt(value) });
-
- this.trigger('seasonedit:quality', { selected : quality });
- this.ui.select.val('choose');
- }
-});
\ No newline at end of file
diff --git a/src/UI/EpisodeFile/Editor/QualitySelectViewTemplate.hbs b/src/UI/EpisodeFile/Editor/QualitySelectViewTemplate.hbs
deleted file mode 100644
index 4ab83c931..000000000
--- a/src/UI/EpisodeFile/Editor/QualitySelectViewTemplate.hbs
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
diff --git a/src/UI/ManualImport/Cells/EpisodesCell.js b/src/UI/ManualImport/Cells/EpisodesCell.js
deleted file mode 100644
index 68c4b5166..000000000
--- a/src/UI/ManualImport/Cells/EpisodesCell.js
+++ /dev/null
@@ -1,46 +0,0 @@
-var _ = require('underscore');
-var vent = require('../../vent');
-var NzbDroneCell = require('../../Cells/NzbDroneCell');
-var SelectEpisodeLayout = require('../Episode/SelectEpisodeLayout');
-
-module.exports = NzbDroneCell.extend({
- className : 'episodes-cell',
-
- events : {
- 'click' : '_onClick'
- },
-
- render : function() {
- this.$el.empty();
-
- var episodes = this.model.get('episodes');
-
- if (episodes)
- {
- var episodeNumbers = _.map(episodes, 'episodeNumber');
-
- this.$el.html(episodeNumbers.join(', '));
- }
-
- return this;
- },
-
- _onClick : function () {
- var series = this.model.get('series');
- var seasonNumber = this.model.get('seasonNumber');
-
- if (series === undefined || seasonNumber === undefined) {
- return;
- }
-
- var view = new SelectEpisodeLayout({ series: series, seasonNumber: seasonNumber });
-
- this.listenTo(view, 'manualimport:selected:episodes', this._setEpisodes);
-
- vent.trigger(vent.Commands.OpenModal2Command, view);
- },
-
- _setEpisodes : function (e) {
- this.model.set('episodes', e.episodes);
- }
-});
\ No newline at end of file
diff --git a/src/UI/ManualImport/Cells/SeasonCell.js b/src/UI/ManualImport/Cells/SeasonCell.js
deleted file mode 100644
index 6120055ea..000000000
--- a/src/UI/ManualImport/Cells/SeasonCell.js
+++ /dev/null
@@ -1,47 +0,0 @@
-var vent = require('../../vent');
-var NzbDroneCell = require('../../Cells/NzbDroneCell');
-var SelectSeasonLayout = require('../Season/SelectSeasonLayout');
-
-module.exports = NzbDroneCell.extend({
- className : 'season-cell',
-
- events : {
- 'click' : '_onClick'
- },
-
- render : function() {
- this.$el.empty();
-
- if (this.model.has('seasonNumber')) {
- this.$el.html(this.model.get('seasonNumber'));
- }
-
- this.delegateEvents();
- return this;
- },
-
- _onClick : function () {
- var series = this.model.get('series');
-
- if (!series) {
- return;
- }
-
- var view = new SelectSeasonLayout({ seasons: series.seasons });
-
- this.listenTo(view, 'manualimport:selected:season', this._setSeason);
-
- vent.trigger(vent.Commands.OpenModal2Command, view);
- },
-
- _setSeason : function (e) {
- if (this.model.has('seasonNumber') && e.seasonNumber === this.model.get('seasonNumber')) {
- return;
- }
-
- this.model.set({
- seasonNumber : e.seasonNumber,
- episodes : []
- });
- }
-});
\ No newline at end of file
diff --git a/src/UI/ManualImport/Cells/SeriesCell.js b/src/UI/ManualImport/Cells/SeriesCell.js
deleted file mode 100644
index cb66f6826..000000000
--- a/src/UI/ManualImport/Cells/SeriesCell.js
+++ /dev/null
@@ -1,45 +0,0 @@
-var vent = require('../../vent');
-var NzbDroneCell = require('../../Cells/NzbDroneCell');
-var SelectSeriesLayout = require('../Series/SelectSeriesLayout');
-
-module.exports = NzbDroneCell.extend({
- className : 'series-title-cell editable',
-
- events : {
- 'click' : '_onClick'
- },
-
- render : function() {
- this.$el.empty();
-
- var series = this.model.get('series');
-
- if (series)
- {
- this.$el.html(series.title);
- }
-
- this.delegateEvents();
- return this;
- },
-
- _onClick : function () {
- var view = new SelectSeriesLayout();
-
- this.listenTo(view, 'manualimport:selected:series', this._setSeries);
-
- vent.trigger(vent.Commands.OpenModal2Command, view);
- },
-
- _setSeries : function (e) {
- if (this.model.has('series') && e.model.id === this.model.get('series').id) {
- return;
- }
-
- this.model.set({
- series : e.model.toJSON(),
- seasonNumber : undefined,
- episodes : []
- });
- }
-});
\ No newline at end of file
diff --git a/src/UI/ManualImport/Episode/SelectEpisodeLayout.js b/src/UI/ManualImport/Episode/SelectEpisodeLayout.js
deleted file mode 100644
index 04617a0bc..000000000
--- a/src/UI/ManualImport/Episode/SelectEpisodeLayout.js
+++ /dev/null
@@ -1,81 +0,0 @@
-var _ = require('underscore');
-var vent = require('vent');
-var Marionette = require('marionette');
-var Backgrid = require('backgrid');
-var EpisodeCollection = require('../../Series/EpisodeCollection');
-var LoadingView = require('../../Shared/LoadingView');
-var SelectAllCell = require('../../Cells/SelectAllCell');
-var EpisodeNumberCell = require('../../Series/Details/EpisodeNumberCell');
-var RelativeDateCell = require('../../Cells/RelativeDateCell');
-var SelectEpisodeRow = require('./SelectEpisodeRow');
-
-module.exports = Marionette.Layout.extend({
- template : 'ManualImport/Episode/SelectEpisodeLayoutTemplate',
-
- regions : {
- episodes : '.x-episodes'
- },
-
- events : {
- 'click .x-select' : '_selectEpisodes'
- },
-
- columns : [
- {
- name : '',
- cell : SelectAllCell,
- headerCell : 'select-all',
- sortable : false
- },
- {
- name : 'episodeNumber',
- label : '#',
- cell : EpisodeNumberCell
- },
- {
- name : 'title',
- label : 'Title',
- hideSeriesLink : true,
- cell : 'string',
- sortable : false
- },
- {
- name : 'airDateUtc',
- label : 'Air Date',
- cell : RelativeDateCell
- }
- ],
-
- initialize : function(options) {
- this.series = options.series;
- this.seasonNumber = options.seasonNumber;
- },
-
- onRender : function() {
- this.episodes.show(new LoadingView());
-
- this.episodeCollection = new EpisodeCollection({ seriesId : this.series.id });
- this.episodeCollection.fetch();
-
- this.listenToOnce(this.episodeCollection, 'sync', function () {
-
- this.episodeView = new Backgrid.Grid({
- columns : this.columns,
- collection : this.episodeCollection.bySeason(this.seasonNumber),
- className : 'table table-hover season-grid',
- row : SelectEpisodeRow
- });
-
- this.episodes.show(this.episodeView);
- });
- },
-
- _selectEpisodes : function () {
- var episodes = _.map(this.episodeView.getSelectedModels(), function (episode) {
- return episode.toJSON();
- });
-
- this.trigger('manualimport:selected:episodes', { episodes: episodes });
- vent.trigger(vent.Commands.CloseModal2Command);
- }
-});
diff --git a/src/UI/ManualImport/Episode/SelectEpisodeLayoutTemplate.hbs b/src/UI/ManualImport/Episode/SelectEpisodeLayoutTemplate.hbs
deleted file mode 100644
index 68a9af81a..000000000
--- a/src/UI/ManualImport/Episode/SelectEpisodeLayoutTemplate.hbs
+++ /dev/null
@@ -1,21 +0,0 @@
-
diff --git a/src/UI/ManualImport/Episode/SelectEpisodeRow.js b/src/UI/ManualImport/Episode/SelectEpisodeRow.js
deleted file mode 100644
index 6dc90fc99..000000000
--- a/src/UI/ManualImport/Episode/SelectEpisodeRow.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var Backgrid = require('backgrid');
-
-module.exports = Backgrid.Row.extend({
- className : 'select-episode-row',
-
- events : {
- 'click' : '_toggle'
- },
-
- _toggle : function(e) {
-
- if (e.target.type === 'checkbox') {
- return;
- }
-
- var checked = this.$el.find('.select-row-cell :checkbox').prop('checked');
-
- this.model.trigger('backgrid:select', this.model, !checked);
- }
-});
\ No newline at end of file
diff --git a/src/UI/ManualImport/ManualImportLayout.js b/src/UI/ManualImport/ManualImportLayout.js
index 8ce8221d8..2872636bb 100644
--- a/src/UI/ManualImport/ManualImportLayout.js
+++ b/src/UI/ManualImport/ManualImportLayout.js
@@ -9,9 +9,6 @@ var LoadingView = require('../Shared/LoadingView');
var ManualImportRow = require('./ManualImportRow');
var SelectAllCell = require('../Cells/SelectAllCell');
var PathCell = require('./Cells/PathCell');
-var SeriesCell = require('./Cells/SeriesCell');
-var SeasonCell = require('./Cells/SeasonCell');
-var EpisodesCell = require('./Cells/EpisodesCell');
var QualityCell = require('./Cells/QualityCell');
var FileSizeCell = require('../Cells/FileSizeCell');
var ApprovalStatusCell = require('../Cells/ApprovalStatusCell');
@@ -55,24 +52,6 @@ module.exports = Marionette.Layout.extend({
cell : MovieCell,
sortable : true
},
- // {
- // name : 'series',
- // label : 'Series',
- // cell : SeriesCell,
- // sortable : true
- // },
- // {
- // name : 'seasonNumber',
- // label : 'Season',
- // cell : SeasonCell,
- // sortable : true
- // },
- // {
- // name : 'episodes',
- // label : 'Episode(s)',
- // cell : EpisodesCell,
- // sortable : false
- // },
{
name : 'quality',
label : 'Quality',
@@ -190,30 +169,6 @@ module.exports = Marionette.Layout.extend({
return;
}
- // if (_.any(selected, function (model) {
- // return !model.has('series');
- // })) {
-
- // this._showErrorMessage('Series must be chosen for each selected file');
- // return;
- // }
-
- // if (_.any(selected, function (model) {
- // return !model.has('seasonNumber');
- // })) {
-
- // this._showErrorMessage('Season must be chosen for each selected file');
- // return;
- // }
-
- // if (_.any(selected, function (model) {
- // return !model.has('episodes') || model.get('episodes').length === 0;
- // })) {
-
- // this._showErrorMessage('One or more episodes must be chosen for each selected file');
- // return;
- // }
-
var importMode = this.ui.importMode.val();
CommandController.Execute('manualImport', {
@@ -222,8 +177,6 @@ module.exports = Marionette.Layout.extend({
return {
path : file.get('path'),
movieId : file.get('movie').id,
- // seriesId : file.get('series').id,
- // episodeIds : _.map(file.get('episodes'), 'id'),
quality : file.get('quality'),
downloadId : file.get('downloadId')
};
diff --git a/src/UI/ManualImport/ManualImportRow.js b/src/UI/ManualImport/ManualImportRow.js
index de549beb4..2ef95a3da 100644
--- a/src/UI/ManualImport/ManualImportRow.js
+++ b/src/UI/ManualImport/ManualImportRow.js
@@ -34,6 +34,5 @@ module.exports = Backgrid.Row.extend({
_setClasses : function () {
this.$el.toggleClass('has-movie', this.model.has('movie'));
- //this.$el.toggleClass('has-season', this.model.has('seasonNumber'));
}
});
diff --git a/src/UI/ManualImport/Season/SelectSeasonLayout.js b/src/UI/ManualImport/Season/SelectSeasonLayout.js
deleted file mode 100644
index 6f46f9cd9..000000000
--- a/src/UI/ManualImport/Season/SelectSeasonLayout.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var vent = require('vent');
-var Marionette = require('marionette');
-
-module.exports = Marionette.Layout.extend({
- template : 'ManualImport/Season/SelectSeasonLayoutTemplate',
-
- events : {
- 'change .x-select-season' : '_selectSeason'
- },
-
- initialize : function(options) {
-
- this.templateHelpers = {
- seasons : options.seasons
- };
- },
-
- _selectSeason : function (e) {
- var seasonNumber = parseInt(e.target.value, 10);
-
- if (seasonNumber === -1) {
- return;
- }
-
- this.trigger('manualimport:selected:season', { seasonNumber: seasonNumber });
- vent.trigger(vent.Commands.CloseModal2Command);
- }
-});
\ No newline at end of file
diff --git a/src/UI/ManualImport/Season/SelectSeasonLayoutTemplate.hbs b/src/UI/ManualImport/Season/SelectSeasonLayoutTemplate.hbs
deleted file mode 100644
index b459c6bf5..000000000
--- a/src/UI/ManualImport/Season/SelectSeasonLayoutTemplate.hbs
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/UI/ManualImport/Series/SelectSeriesLayout.js b/src/UI/ManualImport/Series/SelectSeriesLayout.js
deleted file mode 100644
index 2d0ea1487..000000000
--- a/src/UI/ManualImport/Series/SelectSeriesLayout.js
+++ /dev/null
@@ -1,101 +0,0 @@
-var _ = require('underscore');
-var vent = require('vent');
-var Marionette = require('marionette');
-var Backgrid = require('backgrid');
-var SeriesCollection = require('../../Series/SeriesCollection');
-var SelectRow = require('./SelectSeriesRow');
-
-module.exports = Marionette.Layout.extend({
- template : 'ManualImport/Series/SelectSeriesLayoutTemplate',
-
- regions : {
- series : '.x-series'
- },
-
- ui : {
- filter : '.x-filter'
- },
-
- columns : [
- {
- name : 'title',
- label : 'Title',
- cell : 'String',
- sortValue : 'sortTitle'
- }
- ],
-
- initialize : function() {
- this.seriesCollection = SeriesCollection.clone();
- this._setModelCollection();
-
- this.listenTo(this.seriesCollection, 'row:selected', this._onSelected);
- this.listenTo(this, 'modal:afterShow', this._setFocus);
- },
-
- onRender : function() {
- this.seriesView = new Backgrid.Grid({
- columns : this.columns,
- collection : this.seriesCollection,
- className : 'table table-hover season-grid',
- row : SelectRow
- });
-
- this.series.show(this.seriesView);
- this._setupFilter();
- },
-
- _setupFilter : function () {
- var self = this;
-
- //TODO: This should be a mixin (same as Add Series searching)
- this.ui.filter.keyup(function(e) {
- if (_.contains([
- 9,
- 16,
- 17,
- 18,
- 19,
- 20,
- 33,
- 34,
- 35,
- 36,
- 37,
- 38,
- 39,
- 40,
- 91,
- 92,
- 93
- ], e.keyCode)) {
- return;
- }
-
- self._filter(self.ui.filter.val());
- });
- },
-
- _filter : function (term) {
- this.seriesCollection.setFilter(['title', term, 'contains']);
- this._setModelCollection();
- },
-
- _onSelected : function (e) {
- this.trigger('manualimport:selected:series', { model: e.model });
-
- vent.trigger(vent.Commands.CloseModal2Command);
- },
-
- _setFocus : function () {
- this.ui.filter.focus();
- },
-
- _setModelCollection: function () {
- var self = this;
-
- _.each(this.seriesCollection.models, function (model) {
- model.collection = self.seriesCollection;
- });
- }
-});
diff --git a/src/UI/ManualImport/Series/SelectSeriesLayoutTemplate.hbs b/src/UI/ManualImport/Series/SelectSeriesLayoutTemplate.hbs
deleted file mode 100644
index 0db951d99..000000000
--- a/src/UI/ManualImport/Series/SelectSeriesLayoutTemplate.hbs
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
diff --git a/src/UI/ManualImport/Series/SelectSeriesRow.js b/src/UI/ManualImport/Series/SelectSeriesRow.js
deleted file mode 100644
index 38a2d5ca6..000000000
--- a/src/UI/ManualImport/Series/SelectSeriesRow.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var Backgrid = require('backgrid');
-
-module.exports = Backgrid.Row.extend({
- className : 'select-row select-series-row',
-
- events : {
- 'click' : '_onClick'
- },
-
- _onClick : function() {
- this.model.collection.trigger('row:selected', { model: this.model });
- }
-});
\ No newline at end of file
diff --git a/src/UI/ManualImport/Summary/ManualImportSummaryView.js b/src/UI/ManualImport/Summary/ManualImportSummaryView.js
index 141f2ca26..9d483d1d8 100644
--- a/src/UI/ManualImport/Summary/ManualImportSummaryView.js
+++ b/src/UI/ManualImport/Summary/ManualImportSummaryView.js
@@ -4,20 +4,6 @@ var Marionette = require('marionette');
module.exports = Marionette.ItemView.extend({
template : 'ManualImport/Summary/ManualImportSummaryViewTemplate',
- // initialize : function (options) {
- // var episodes = _.map(options.episodes, function (episode) {
- // return episode.toJSON();
- // });
-
- // this.templateHelpers = {
- // file : options.file,
- // series : options.series,
- // season : options.season,
- // episodes : episodes,
- // quality : options.quality
- // };
- // }
-
initialize : function (options) {
this.templateHelpers = {
diff --git a/src/UI/Movies/Details/MoviesDetailsLayout.js b/src/UI/Movies/Details/MoviesDetailsLayout.js
index 3fdb85bec..403f15cd6 100644
--- a/src/UI/Movies/Details/MoviesDetailsLayout.js
+++ b/src/UI/Movies/Details/MoviesDetailsLayout.js
@@ -8,7 +8,7 @@ var MoviesCollection = require('../MoviesCollection');
var InfoView = require('./InfoView');
var CommandController = require('../../Commands/CommandController');
var LoadingView = require('../../Shared/LoadingView');
-var EpisodeFileEditorLayout = require('../../EpisodeFile/Editor/EpisodeFileEditorLayout');
+// var EpisodeFileEditorLayout = require('../../EpisodeFile/Editor/EpisodeFileEditorLayout');
var HistoryLayout = require('../History/MovieHistoryLayout');
var SearchLayout = require('../Search/MovieSearchLayout');
var AllFilesLayout = require("../Files/AllFilesLayout");
@@ -251,14 +251,14 @@ module.exports = Marionette.Layout.extend({
this._showInfo();
},
- _openEpisodeFileEditor : function() {
- var view = new EpisodeFileEditorLayout({
- movies : this.model,
- episodeCollection : this.episodeCollection
- });
+ // _openEpisodeFileEditor : function() {
+ // var view = new EpisodeFileEditorLayout({
+ // movies : this.model,
+ // episodeCollection : this.episodeCollection
+ // });
- vent.trigger(vent.Commands.OpenModalCommand, view);
- },
+ // vent.trigger(vent.Commands.OpenModalCommand, view);
+ // },
_updateImages : function () {
var poster = this._getImage('poster');
diff --git a/src/UI/Movies/Index/Posters/SeriesPostersCollectionView.js b/src/UI/Movies/Index/Posters/SeriesPostersCollectionView.js
index 0d6094f1c..d5a0abd06 100644
--- a/src/UI/Movies/Index/Posters/SeriesPostersCollectionView.js
+++ b/src/UI/Movies/Index/Posters/SeriesPostersCollectionView.js
@@ -4,5 +4,5 @@ var PosterItemView = require('./SeriesPostersItemView');
module.exports = Marionette.CompositeView.extend({
itemView : PosterItemView,
itemViewContainer : '#x-series-posters',
- template : 'Series/Index/Posters/SeriesPostersCollectionViewTemplate'
+ template : 'Movies/Index/Posters/SeriesPostersCollectionViewTemplate'
});
\ No newline at end of file
diff --git a/src/UI/Router.js b/src/UI/Router.js
index c04492dba..d2de4d529 100644
--- a/src/UI/Router.js
+++ b/src/UI/Router.js
@@ -4,8 +4,6 @@ var Controller = require('./Controller');
module.exports = Marionette.AppRouter.extend({
controller : new Controller(),
appRoutes : {
- 'addseries' : 'addSeries',
- 'addseries/:action(/:query)' : 'addSeries',
'addmovies' : 'addMovies',
'addmovies/:action(/:query)' : 'addMovies',
'calendar' : 'calendar',
@@ -20,7 +18,6 @@ module.exports = Marionette.AppRouter.extend({
'rss' : 'rss',
'system' : 'system',
'system/:action' : 'system',
- 'seasonpass' : 'seasonPass',
'movieeditor' : 'movieEditor',
':whatever' : 'showNotFound'
}
diff --git a/src/UI/SeasonPass/SeasonPassFooterView.js b/src/UI/SeasonPass/SeasonPassFooterView.js
deleted file mode 100644
index 64a2c8916..000000000
--- a/src/UI/SeasonPass/SeasonPassFooterView.js
+++ /dev/null
@@ -1,139 +0,0 @@
-var _ = require('underscore');
-var $ = require('jquery');
-var Marionette = require('marionette');
-var vent = require('vent');
-var RootFolders = require('../AddSeries/RootFolders/RootFolderCollection');
-
-module.exports = Marionette.ItemView.extend({
- template : 'SeasonPass/SeasonPassFooterViewTemplate',
-
- ui : {
- seriesMonitored : '.x-series-monitored',
- monitor : '.x-monitor',
- selectedCount : '.x-selected-count',
- container : '.series-editor-footer',
- actions : '.x-action',
- indicator : '.x-indicator',
- indicatorIcon : '.x-indicator-icon'
- },
-
- events : {
- 'click .x-update' : '_update'
- },
-
- initialize : function(options) {
- this.seriesCollection = options.collection;
-
- RootFolders.fetch().done(function() {
- RootFolders.synced = true;
- });
-
- this.editorGrid = options.editorGrid;
- this.listenTo(this.seriesCollection, 'backgrid:selected', this._updateInfo);
- },
-
- onRender : function() {
- this._updateInfo();
- },
-
- _update : function() {
- var self = this;
- var selected = this.editorGrid.getSelectedModels();
- var seriesMonitored = this.ui.seriesMonitored.val();
- var monitoringOptions;
-
- _.each(selected, function(model) {
- if (seriesMonitored === 'true') {
- model.set('monitored', true);
- } else if (seriesMonitored === 'false') {
- model.set('monitored', false);
- }
-
- monitoringOptions = self._getMonitoringOptions(model);
- model.set('addOptions', monitoringOptions);
- });
-
- var promise = $.ajax({
- url : window.NzbDrone.ApiRoot + '/seasonpass',
- type : 'POST',
- data : JSON.stringify({
- series : _.map(selected, function (model) {
- return model.toJSON();
- }),
- monitoringOptions : monitoringOptions
- })
- });
-
- this.ui.indicator.show();
-
- promise.always(function () {
- self.ui.indicator.hide();
- });
-
- promise.done(function () {
- self.seriesCollection.trigger('seasonpass:saved');
- });
- },
-
- _updateInfo : function() {
- var selected = this.editorGrid.getSelectedModels();
- var selectedCount = selected.length;
-
- this.ui.selectedCount.html('{0} series selected'.format(selectedCount));
-
- if (selectedCount === 0) {
- this.ui.actions.attr('disabled', 'disabled');
- } else {
- this.ui.actions.removeAttr('disabled');
- }
- },
-
- _getMonitoringOptions : function(model) {
- var monitor = this.ui.monitor.val();
- var lastSeason = _.max(model.get('seasons'), 'seasonNumber');
- var firstSeason = _.min(_.reject(model.get('seasons'), { seasonNumber : 0 }), 'seasonNumber');
-
- if (monitor === 'noChange') {
- return null;
- }
-
- model.setSeasonPass(firstSeason.seasonNumber);
-
- var options = {
- ignoreEpisodesWithFiles : false,
- ignoreEpisodesWithoutFiles : false
- };
-
- if (monitor === 'all') {
- return options;
- }
-
- else if (monitor === 'future') {
- options.ignoreEpisodesWithFiles = true;
- options.ignoreEpisodesWithoutFiles = true;
- }
-
- else if (monitor === 'latest') {
- model.setSeasonPass(lastSeason.seasonNumber);
- }
-
- else if (monitor === 'first') {
- model.setSeasonPass(lastSeason.seasonNumber + 1);
- model.setSeasonMonitored(firstSeason.seasonNumber);
- }
-
- else if (monitor === 'missing') {
- options.ignoreEpisodesWithFiles = true;
- }
-
- else if (monitor === 'existing') {
- options.ignoreEpisodesWithoutFiles = true;
- }
-
- else if (monitor === 'none') {
- model.setSeasonPass(lastSeason.seasonNumber + 1);
- }
-
- return options;
- }
-});
\ No newline at end of file
diff --git a/src/UI/SeasonPass/SeasonPassFooterViewTemplate.hbs b/src/UI/SeasonPass/SeasonPassFooterViewTemplate.hbs
deleted file mode 100644
index 522b85745..000000000
--- a/src/UI/SeasonPass/SeasonPassFooterViewTemplate.hbs
+++ /dev/null
@@ -1,36 +0,0 @@
-
diff --git a/src/UI/SeasonPass/SeasonPassLayout.js b/src/UI/SeasonPass/SeasonPassLayout.js
deleted file mode 100644
index 5330fcf77..000000000
--- a/src/UI/SeasonPass/SeasonPassLayout.js
+++ /dev/null
@@ -1,152 +0,0 @@
-var _ = require('underscore');
-var vent = require('vent');
-var Backgrid = require('backgrid');
-var Marionette = require('marionette');
-var EmptyView = require('../Series/Index/EmptyView');
-var SeriesCollection = require('../Series/SeriesCollection');
-var ToolbarLayout = require('../Shared/Toolbar/ToolbarLayout');
-var FooterView = require('./SeasonPassFooterView');
-var SelectAllCell = require('../Cells/SelectAllCell');
-var SeriesStatusCell = require('../Cells/SeriesStatusCell');
-var SeriesTitleCell = require('../Cells/SeriesTitleCell');
-var SeriesMonitoredCell = require('../Cells/ToggleCell');
-var SeasonsCell = require('./SeasonsCell');
-require('../Mixins/backbone.signalr.mixin');
-
-module.exports = Marionette.Layout.extend({
- template : 'SeasonPass/SeasonPassLayoutTemplate',
-
- regions : {
- toolbar : '#x-toolbar',
- series : '#x-series'
- },
-
- columns : [
- {
- name : '',
- cell : SelectAllCell,
- headerCell : 'select-all',
- sortable : false
- },
- {
- name : 'statusWeight',
- label : '',
- cell : SeriesStatusCell
- },
- {
- name : 'title',
- label : 'Title',
- cell : SeriesTitleCell,
- cellValue : 'this'
- },
- {
- name : 'monitored',
- label : '',
- cell : SeriesMonitoredCell,
- trueClass : 'icon-sonarr-monitored',
- falseClass : 'icon-sonarr-unmonitored',
- tooltip : 'Toggle series monitored status',
- sortable : false
- },
- {
- name : 'seasons',
- label : 'Seasons',
- cell : SeasonsCell,
- cellValue : 'this'
- }
- ],
-
- initialize : function() {
- this.seriesCollection = SeriesCollection.clone();
- this.seriesCollection.shadowCollection.bindSignalR();
-
-// this.listenTo(this.seriesCollection, 'sync', this.render);
- this.listenTo(this.seriesCollection, 'seasonpass:saved', this.render);
-
- this.filteringOptions = {
- type : 'radio',
- storeState : true,
- menuKey : 'seasonpass.filterMode',
- defaultAction : 'all',
- items : [
- {
- key : 'all',
- title : '',
- tooltip : 'All',
- icon : 'icon-sonarr-all',
- callback : this._setFilter
- },
- {
- key : 'monitored',
- title : '',
- 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
- }
- ]
- };
- },
-
- onRender : function() {
- this._showTable();
- this._showToolbar();
- this._showFooter();
- },
-
- onClose : function() {
- vent.trigger(vent.Commands.CloseControlPanelCommand);
- },
-
- _showToolbar : function() {
- this.toolbar.show(new ToolbarLayout({
- right : [this.filteringOptions],
- context : this
- }));
- },
-
- _showTable : function() {
- if (this.seriesCollection.shadowCollection.length === 0) {
- this.series.show(new EmptyView());
- this.toolbar.close();
- return;
- }
-
- this.columns[0].sortedCollection = this.seriesCollection;
-
- this.editorGrid = new Backgrid.Grid({
- collection : this.seriesCollection,
- columns : this.columns,
- className : 'table table-hover'
- });
-
- this.series.show(this.editorGrid);
- this._showFooter();
- },
-
- _showFooter : function() {
- vent.trigger(vent.Commands.OpenControlPanelCommand, new FooterView({
- editorGrid : this.editorGrid,
- collection : this.seriesCollection
- }));
- },
-
- _setFilter : function(buttonContext) {
- var mode = buttonContext.model.get('key');
-
- this.seriesCollection.setFilterMode(mode);
- }
-});
\ No newline at end of file
diff --git a/src/UI/SeasonPass/SeasonPassLayoutTemplate.hbs b/src/UI/SeasonPass/SeasonPassLayoutTemplate.hbs
deleted file mode 100644
index 3365f018d..000000000
--- a/src/UI/SeasonPass/SeasonPassLayoutTemplate.hbs
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
Season Pass allows you to quickly change the monitored status of seasons for all your series in one place
-
-
-
-
\ No newline at end of file
diff --git a/src/UI/SeasonPass/SeasonsCell.js b/src/UI/SeasonPass/SeasonsCell.js
deleted file mode 100644
index 81af02d1b..000000000
--- a/src/UI/SeasonPass/SeasonsCell.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var _ = require('underscore');
-var TemplatedCell = require('../Cells/TemplatedCell');
-//require('../Handlebars/Helpers/Numbers');
-
-module.exports = TemplatedCell.extend({
- className : 'seasons-cell',
- template : 'SeasonPass/SeasonsCellTemplate',
-
- events : {
- 'click .x-season-monitored' : '_toggleSeasonMonitored'
- },
-
- _toggleSeasonMonitored : function(e) {
- var target = this.$(e.target).closest('.x-season-monitored');
- var seasonNumber = parseInt(this.$(target).data('season-number'), 10);
- var icon = this.$(target).children('.x-season-monitored-icon');
-
- this.model.setSeasonMonitored(seasonNumber);
-
- //TODO: unbounce the save so we don't multiple to the server at the same time
- var savePromise = this.model.save();
-
- icon.spinForPromise(savePromise);
- savePromise.always(this.render.bind(this));
- }
-});
\ No newline at end of file
diff --git a/src/UI/SeasonPass/SeasonsCellTemplate.hbs b/src/UI/SeasonPass/SeasonsCellTemplate.hbs
deleted file mode 100644
index d9966aec8..000000000
--- a/src/UI/SeasonPass/SeasonsCellTemplate.hbs
+++ /dev/null
@@ -1,37 +0,0 @@
-{{#each seasons}}
- {{debug}}
- {{#if_eq statistics.totalEpisodeCount compare=0}}
-
- {{else}}
- {{#if_eq statistics.percentOfEpisodes compare=100}}
-
- {{else}}
-
- {{/if_eq}}
- {{/if_eq}}
-
-
-
-
- {{#if_eq seasonNumber compare="0"}}
- Specials
- {{else}}
- S{{Pad2 seasonNumber}}
- {{/if_eq}}
-
- {{#with statistics}}
- {{#if_eq totalEpisodeCount compare=0}}
-
- {{else}}
- {{#if_eq percentOfEpisodes compare=100}}
- {{episodeFileCount}}/{{totalEpisodeCount}}
- {{else}}
- {{episodeFileCount}}/{{totalEpisodeCount}}
- {{/if_eq}}
- {{/if_eq}}
- {{else}}
-
- {{/with}}
-
-
-{{/each}}
\ No newline at end of file
diff --git a/src/UI/SeasonPass/seasonpass.less b/src/UI/SeasonPass/seasonpass.less
deleted file mode 100644
index 1188eb6d4..000000000
--- a/src/UI/SeasonPass/seasonpass.less
+++ /dev/null
@@ -1,54 +0,0 @@
-@import "../Content/badges.less";
-@import "../Shared/Styles/clickable.less";
-
-.season {
- display : inline-block;
- margin-bottom : 4px;
-
- .label {
- .badge-inverse();
-
- display : inline-block;
- padding : 4px;
-
- font-size : 14px;
- height : 25px;
- }
-
- .label:first-child {
- border-right : 0;
- border-top-right-radius : 0.0em;
- border-bottom-right-radius : 0.0em;
- color : #777;
- background-color : #eee;
- }
-
- .label:last-child {
- border-left : 0;
- border-top-left-radius : 0.0em;
- border-bottom-left-radius : 0.0em;
- color : #999;
- background-color : #f7f7f7;
- }
-
- &.season-all .label:last-child {
- background-color : #e0ffe0;
- }
-
- .season-monitored {
- width : 16px;
-
- i {
- .clickable();
- }
- }
-
- .season-number {
- font-size : 12px;
- }
-
- .season-status {
- display : inline-block;
- vertical-align : baseline !important;
- }
-}
diff --git a/src/UI/Series/Delete/DeleteSeriesTemplate.hbs b/src/UI/Series/Delete/DeleteSeriesTemplate.hbs
deleted file mode 100644
index 7ff12ad0b..000000000
--- a/src/UI/Series/Delete/DeleteSeriesTemplate.hbs
+++ /dev/null
@@ -1,50 +0,0 @@
-
diff --git a/src/UI/Series/Delete/DeleteSeriesView.js b/src/UI/Series/Delete/DeleteSeriesView.js
deleted file mode 100644
index de6640b5e..000000000
--- a/src/UI/Series/Delete/DeleteSeriesView.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var vent = require('vent');
-var Marionette = require('marionette');
-
-module.exports = Marionette.ItemView.extend({
- template : 'Series/Delete/DeleteSeriesTemplate',
-
- events : {
- 'click .x-confirm-delete' : 'removeSeries',
- 'change .x-delete-files' : 'changeDeletedFiles'
- },
-
- ui : {
- deleteFiles : '.x-delete-files',
- deleteFilesInfo : '.x-delete-files-info',
- indicator : '.x-indicator'
- },
-
- removeSeries : function() {
- var self = this;
- var deleteFiles = this.ui.deleteFiles.prop('checked');
- this.ui.indicator.show();
-
- this.model.destroy({
- data : { 'deleteFiles' : deleteFiles },
- wait : true
- }).done(function() {
- vent.trigger(vent.Events.SeriesDeleted, { series : self.model });
- vent.trigger(vent.Commands.CloseModalCommand);
- });
- },
-
- changeDeletedFiles : function() {
- var deleteFiles = this.ui.deleteFiles.prop('checked');
-
- if (deleteFiles) {
- this.ui.deleteFilesInfo.show();
- } else {
- this.ui.deleteFilesInfo.hide();
- }
- }
-});
\ No newline at end of file
diff --git a/src/UI/Series/Details/EpisodeNumberCell.js b/src/UI/Series/Details/EpisodeNumberCell.js
deleted file mode 100644
index 9a84e644e..000000000
--- a/src/UI/Series/Details/EpisodeNumberCell.js
+++ /dev/null
@@ -1,47 +0,0 @@
-var Marionette = require('marionette');
-var NzbDroneCell = require('../../Cells/NzbDroneCell');
-var reqres = require('../../reqres');
-var SeriesCollection = require('../SeriesCollection');
-
-module.exports = NzbDroneCell.extend({
- className : 'episode-number-cell',
- template : 'Series/Details/EpisodeNumberCellTemplate',
-
- render : function() {
- this.$el.empty();
- this.$el.html(this.model.get('episodeNumber'));
-
- var series = SeriesCollection.get(this.model.get('seriesId'));
-
- if (series.get('seriesType') === 'anime' && this.model.has('absoluteEpisodeNumber')) {
- this.$el.html('{0} ({1})'.format(this.model.get('episodeNumber'), this.model.get('absoluteEpisodeNumber')));
- }
-
- var alternateTitles = [];
-
- if (reqres.hasHandler(reqres.Requests.GetAlternateNameBySeasonNumber)) {
- alternateTitles = reqres.request(reqres.Requests.GetAlternateNameBySeasonNumber, this.model.get('seriesId'), this.model.get('seasonNumber'), this.model.get('sceneSeasonNumber'));
- }
-
- if (this.model.get('sceneSeasonNumber') > 0 || this.model.get('sceneEpisodeNumber') > 0 || this.model.has('sceneAbsoluteEpisodeNumber') || alternateTitles.length > 0) {
- this.templateFunction = Marionette.TemplateCache.get(this.template);
-
- var json = this.model.toJSON();
- json.alternateTitles = alternateTitles;
-
- var html = this.templateFunction(json);
-
- this.$el.popover({
- content : html,
- html : true,
- trigger : 'hover',
- title : 'Scene Information',
- placement : 'right',
- container : this.$el
- });
- }
-
- this.delegateEvents();
- return this;
- }
-});
\ No newline at end of file
diff --git a/src/UI/Series/Details/EpisodeNumberCellTemplate.hbs b/src/UI/Series/Details/EpisodeNumberCellTemplate.hbs
deleted file mode 100644
index a9028a423..000000000
--- a/src/UI/Series/Details/EpisodeNumberCellTemplate.hbs
+++ /dev/null
@@ -1,39 +0,0 @@
-
- {{#if sceneSeasonNumber}}
-
-
Season
-
{{sceneSeasonNumber}}
-
- {{/if}}
-
- {{#if sceneEpisodeNumber}}
-
-
Episode
-
{{sceneEpisodeNumber}}
-
- {{/if}}
-
- {{#if sceneAbsoluteEpisodeNumber}}
-
-
Absolute
-
{{sceneAbsoluteEpisodeNumber}}
-
- {{/if}}
-
- {{#if alternateTitles}}
-
- {{#if_gt alternateTitles.length compare="1"}}
-
Titles
- {{else}}
-
Title
- {{/if_gt}}
-
-
- {{#each alternateTitles}}
- - {{title}}
- {{/each}}
-
-
-
- {{/if}}
-
\ No newline at end of file
diff --git a/src/UI/Series/Details/EpisodeWarningCell.js b/src/UI/Series/Details/EpisodeWarningCell.js
deleted file mode 100644
index c9befe7a1..000000000
--- a/src/UI/Series/Details/EpisodeWarningCell.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var NzbDroneCell = require('../../Cells/NzbDroneCell');
-var SeriesCollection = require('../SeriesCollection');
-
-module.exports = NzbDroneCell.extend({
- className : 'episode-warning-cell',
-
- render : function() {
- this.$el.empty();
-
- if (this.model.get('unverifiedSceneNumbering')) {
- this.$el.html('');
- }
-
- else if (SeriesCollection.get(this.model.get('seriesId')).get('seriesType') === 'anime' && this.model.get('seasonNumber') > 0 && !this.model.has('absoluteEpisodeNumber')) {
- this.$el.html('');
- }
-
- this.delegateEvents();
- return this;
- }
-});
\ No newline at end of file
diff --git a/src/UI/Series/Details/InfoView.js b/src/UI/Series/Details/InfoView.js
deleted file mode 100644
index c7fab9fc4..000000000
--- a/src/UI/Series/Details/InfoView.js
+++ /dev/null
@@ -1,18 +0,0 @@
-var Marionette = require('marionette');
-
-module.exports = Marionette.ItemView.extend({
- template : 'Series/Details/InfoViewTemplate',
-
- initialize : function(options) {
- this.episodeFileCollection = options.episodeFileCollection;
-
- this.listenTo(this.model, 'change', this.render);
- this.listenTo(this.episodeFileCollection, 'sync', this.render);
- },
-
- templateHelpers : function() {
- return {
- fileCount : this.episodeFileCollection.length
- };
- }
-});
\ No newline at end of file
diff --git a/src/UI/Series/Details/InfoViewTemplate.hbs b/src/UI/Series/Details/InfoViewTemplate.hbs
deleted file mode 100644
index c76c5c139..000000000
--- a/src/UI/Series/Details/InfoViewTemplate.hbs
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
- {{profile profileId}}
-
- {{#if network}}
- {{network}}
- {{/if}}
-
- {{runtime}} minutes
- {{path}}
-
- {{#if ratings}}
- {{ratings.value}}
- {{/if}}
-
- {{Bytes sizeOnDisk}}
-
- {{#if_eq fileCount compare="1"}}
- 1 file
- {{else}}
- {{fileCount}} files
- {{/if_eq}}
-
- {{#if_eq status compare="continuing"}}
- Continuing
- {{else}}
- Ended
- {{/if_eq}}
-
-
-
- {{!--
- Trakt
- The TVDB
- --}}
- {{#if imdbId}}
- IMDB
- {{/if}}
-
- {{#if tvRageId}}
- TV Rage
- {{/if}}
-
- {{#if tvMazeId}}
- TV Maze
- {{/if}}
-
-
-
-
-{{#if alternateTitles}}
-
-
- {{#each alternateTitles}}
- {{#if_eq seasonNumber compare="-1"}}
- {{title}}
- {{/if_eq}}
-
- {{#if_eq sceneSeasonNumber compare="-1"}}
- {{title}}
- {{/if_eq}}
- {{/each}}
-
-
-{{/if}}
-
-{{#if tags}}
-
-
- {{tagDisplay tags}}
-
-
-{{/if}}
diff --git a/src/UI/Series/Details/SeasonCollectionView.js b/src/UI/Series/Details/SeasonCollectionView.js
deleted file mode 100644
index 24da6171c..000000000
--- a/src/UI/Series/Details/SeasonCollectionView.js
+++ /dev/null
@@ -1,44 +0,0 @@
-var _ = require('underscore');
-var Marionette = require('marionette');
-var SeasonLayout = require('./SeasonLayout');
-var AsSortedCollectionView = require('../../Mixins/AsSortedCollectionView');
-
-var view = Marionette.CollectionView.extend({
-
- itemView : SeasonLayout,
-
- initialize : function(options) {
- if (!options.episodeCollection) {
- throw 'episodeCollection is needed';
- }
-
- this.episodeCollection = options.episodeCollection;
- this.series = options.series;
- },
-
- itemViewOptions : function() {
- return {
- episodeCollection : this.episodeCollection,
- series : this.series
- };
- },
-
- onEpisodeGrabbed : function(message) {
- if (message.episode.series.id !== this.episodeCollection.seriesId) {
- return;
- }
-
- var self = this;
-
- _.each(message.episode.episodes, function(episode) {
- var ep = self.episodeCollection.get(episode.id);
- ep.set('downloading', true);
- });
-
- this.render();
- }
-});
-
-AsSortedCollectionView.call(view);
-
-module.exports = view;
\ No newline at end of file
diff --git a/src/UI/Series/Details/SeasonLayout.js b/src/UI/Series/Details/SeasonLayout.js
deleted file mode 100644
index 231810647..000000000
--- a/src/UI/Series/Details/SeasonLayout.js
+++ /dev/null
@@ -1,301 +0,0 @@
-var vent = require('vent');
-var Marionette = require('marionette');
-var Backgrid = require('backgrid');
-var ToggleCell = require('../../Cells/EpisodeMonitoredCell');
-var EpisodeTitleCell = require('../../Cells/EpisodeTitleCell');
-var RelativeDateCell = require('../../Cells/RelativeDateCell');
-var EpisodeStatusCell = require('../../Cells/EpisodeStatusCell');
-var EpisodeActionsCell = require('../../Cells/EpisodeActionsCell');
-var EpisodeNumberCell = require('./EpisodeNumberCell');
-var EpisodeWarningCell = require('./EpisodeWarningCell');
-var CommandController = require('../../Commands/CommandController');
-var EpisodeFileEditorLayout = require('../../EpisodeFile/Editor/EpisodeFileEditorLayout');
-var moment = require('moment');
-var _ = require('underscore');
-var Messenger = require('../../Shared/Messenger');
-
-module.exports = Marionette.Layout.extend({
- template : 'Series/Details/SeasonLayoutTemplate',
-
- ui : {
- seasonSearch : '.x-season-search',
- seasonMonitored : '.x-season-monitored',
- seasonRename : '.x-season-rename'
- },
-
- events : {
- 'click .x-season-episode-file-editor' : '_openEpisodeFileEditor',
- 'click .x-season-monitored' : '_seasonMonitored',
- 'click .x-season-search' : '_seasonSearch',
- 'click .x-season-rename' : '_seasonRename',
- 'click .x-show-hide-episodes' : '_showHideEpisodes',
- 'dblclick .series-season h2' : '_showHideEpisodes'
- },
-
- regions : {
- episodeGrid : '.x-episode-grid'
- },
-
- columns : [
- {
- name : 'monitored',
- label : '',
- cell : ToggleCell,
- trueClass : 'icon-sonarr-monitored',
- falseClass : 'icon-sonarr-unmonitored',
- tooltip : 'Toggle monitored status',
- sortable : false
- },
- {
- name : 'episodeNumber',
- label : '#',
- cell : EpisodeNumberCell
- },
- {
- name : 'this',
- label : '',
- cell : EpisodeWarningCell,
- sortable : false,
- className : 'episode-warning-cell'
- },
- {
- name : 'this',
- label : 'Title',
- hideSeriesLink : true,
- cell : EpisodeTitleCell,
- sortable : false
- },
- {
- name : 'airDateUtc',
- label : 'Air Date',
- cell : RelativeDateCell
- },
- {
- name : 'status',
- label : 'Status',
- cell : EpisodeStatusCell,
- sortable : false
- },
- {
- name : 'this',
- label : '',
- cell : EpisodeActionsCell,
- sortable : false
- }
- ],
-
- templateHelpers : function() {
- var episodeCount = this.episodeCollection.filter(function(episode) {
- return episode.get('hasFile') || episode.get('monitored') && moment(episode.get('airDateUtc')).isBefore(moment());
- }).length;
-
- var episodeFileCount = this.episodeCollection.where({ hasFile : true }).length;
- var percentOfEpisodes = 100;
-
- if (episodeCount > 0) {
- percentOfEpisodes = episodeFileCount / episodeCount * 100;
- }
-
- return {
- showingEpisodes : this.showingEpisodes,
- episodeCount : episodeCount,
- episodeFileCount : episodeFileCount,
- percentOfEpisodes : percentOfEpisodes
- };
- },
-
- initialize : function(options) {
- if (!options.episodeCollection) {
- throw 'episodeCollection is required';
- }
-
- this.series = options.series;
- this.fullEpisodeCollection = options.episodeCollection;
- this.episodeCollection = this.fullEpisodeCollection.bySeason(this.model.get('seasonNumber'));
- this._updateEpisodeCollection();
-
- this.showingEpisodes = this._shouldShowEpisodes();
-
- this.listenTo(this.model, 'sync', this._afterSeasonMonitored);
- this.listenTo(this.episodeCollection, 'sync', this.render);
-
- this.listenTo(this.fullEpisodeCollection, 'sync', this._refreshEpisodes);
- },
-
- onRender : function() {
- if (this.showingEpisodes) {
- this._showEpisodes();
- }
-
- this._setSeasonMonitoredState();
-
- CommandController.bindToCommand({
- element : this.ui.seasonSearch,
- command : {
- name : 'seasonSearch',
- seriesId : this.series.id,
- seasonNumber : this.model.get('seasonNumber')
- }
- });
-
- CommandController.bindToCommand({
- element : this.ui.seasonRename,
- command : {
- name : 'renameFiles',
- seriesId : this.series.id,
- seasonNumber : this.model.get('seasonNumber')
- }
- });
- },
-
- _seasonSearch : function() {
- CommandController.Execute('seasonSearch', {
- name : 'seasonSearch',
- seriesId : this.series.id,
- seasonNumber : this.model.get('seasonNumber')
- });
- },
-
- _seasonRename : function() {
- vent.trigger(vent.Commands.ShowRenamePreview, {
- series : this.series,
- seasonNumber : this.model.get('seasonNumber')
- });
- },
-
- _seasonMonitored : function() {
- if (!this.series.get('monitored')) {
-
- Messenger.show({
- message : 'Unable to change monitored state when series is not monitored',
- type : 'error'
- });
-
- return;
- }
-
- var name = 'monitored';
- this.model.set(name, !this.model.get(name));
- this.series.setSeasonMonitored(this.model.get('seasonNumber'));
-
- var savePromise = this.series.save().always(this._afterSeasonMonitored.bind(this));
-
- this.ui.seasonMonitored.spinForPromise(savePromise);
- },
-
- _afterSeasonMonitored : function() {
- var self = this;
-
- _.each(this.episodeCollection.models, function(episode) {
- episode.set({ monitored : self.model.get('monitored') });
- });
-
- this.render();
- },
-
- _setSeasonMonitoredState : function() {
- this.ui.seasonMonitored.removeClass('icon-sonarr-spinner fa-spin');
-
- if (this.model.get('monitored')) {
- this.ui.seasonMonitored.addClass('icon-sonarr-monitored');
- this.ui.seasonMonitored.removeClass('icon-sonarr-unmonitored');
- } else {
- this.ui.seasonMonitored.addClass('icon-sonarr-unmonitored');
- this.ui.seasonMonitored.removeClass('icon-sonarr-monitored');
- }
- },
-
- _showEpisodes : function() {
- this.episodeGrid.show(new Backgrid.Grid({
- columns : this.columns,
- collection : this.episodeCollection,
- className : 'table table-hover season-grid'
- }));
- },
-
- _shouldShowEpisodes : function() {
- var startDate = moment().add(-1, 'month');
- var endDate = moment().add(1, 'year');
-
- return this.episodeCollection.some(function(episode) {
- var airDate = episode.get('airDateUtc');
-
- if (airDate) {
- var airDateMoment = moment(airDate);
-
- if (airDateMoment.isAfter(startDate) && airDateMoment.isBefore(endDate)) {
- return true;
- }
- }
-
- return false;
- });
- },
-
- _showHideEpisodes : function() {
- if (this.showingEpisodes) {
- this.showingEpisodes = false;
- this.episodeGrid.close();
- } else {
- this.showingEpisodes = true;
- this._showEpisodes();
- }
-
- this.templateHelpers.showingEpisodes = this.showingEpisodes;
- this.render();
- },
-
- _episodeMonitoredToggled : function(options) {
- var model = options.model;
- var shiftKey = options.shiftKey;
-
- if (!this.episodeCollection.get(model.get('id'))) {
- return;
- }
-
- if (!shiftKey) {
- return;
- }
-
- var lastToggled = this.episodeCollection.lastToggled;
-
- if (!lastToggled) {
- return;
- }
-
- var currentIndex = this.episodeCollection.indexOf(model);
- var lastIndex = this.episodeCollection.indexOf(lastToggled);
-
- var low = Math.min(currentIndex, lastIndex);
- var high = Math.max(currentIndex, lastIndex);
- var range = _.range(low + 1, high);
-
- this.episodeCollection.lastToggled = model;
- },
-
- _updateEpisodeCollection : function() {
- var self = this;
-
- this.episodeCollection.add(this.fullEpisodeCollection.bySeason(this.model.get('seasonNumber')).models, { merge : true });
-
- this.episodeCollection.each(function(model) {
- model.episodeCollection = self.episodeCollection;
- });
- },
-
- _refreshEpisodes : function() {
- this._updateEpisodeCollection();
- this.episodeCollection.fullCollection.sort();
- this.render();
- },
-
- _openEpisodeFileEditor : function() {
- var view = new EpisodeFileEditorLayout({
- model : this.model,
- series : this.series,
- episodeCollection : this.episodeCollection
- });
-
- vent.trigger(vent.Commands.OpenModalCommand, view);
- }
-});
diff --git a/src/UI/Series/Details/SeasonLayoutTemplate.hbs b/src/UI/Series/Details/SeasonLayoutTemplate.hbs
deleted file mode 100644
index 06034f19d..000000000
--- a/src/UI/Series/Details/SeasonLayoutTemplate.hbs
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
- {{#if seasonNumber}}
- Season {{seasonNumber}}
- {{else}}
- Specials
- {{/if}}
-
-
- {{#if_eq episodeCount compare=0}}
- {{#if monitored}}
-
- {{else}}
-
- {{/if}}
- {{else}}
- {{#if_eq percentOfEpisodes compare=100}}
- {{episodeFileCount}} / {{episodeCount}}
- {{else}}
- {{episodeFileCount}} / {{episodeCount}}
- {{/if_eq}}
- {{/if_eq}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{#if showingEpisodes}}
-
- Hide Episodes
- {{else}}
-
- Show Episodes
- {{/if}}
-
-
-
-
diff --git a/src/UI/Series/Details/SeriesDetailsLayout.js b/src/UI/Series/Details/SeriesDetailsLayout.js
deleted file mode 100644
index ca906970b..000000000
--- a/src/UI/Series/Details/SeriesDetailsLayout.js
+++ /dev/null
@@ -1,272 +0,0 @@
-var $ = require('jquery');
-var _ = require('underscore');
-var vent = require('vent');
-var reqres = require('../../reqres');
-var Marionette = require('marionette');
-var Backbone = require('backbone');
-var SeriesCollection = require('../SeriesCollection');
-var EpisodeCollection = require('../EpisodeCollection');
-var EpisodeFileCollection = require('../EpisodeFileCollection');
-var SeasonCollection = require('../SeasonCollection');
-var SeasonCollectionView = require('./SeasonCollectionView');
-var InfoView = require('./InfoView');
-var CommandController = require('../../Commands/CommandController');
-var LoadingView = require('../../Shared/LoadingView');
-var EpisodeFileEditorLayout = require('../../EpisodeFile/Editor/EpisodeFileEditorLayout');
-require('backstrech');
-require('../../Mixins/backbone.signalr.mixin');
-
-module.exports = Marionette.Layout.extend({
- itemViewContainer : '.x-series-seasons',
- template : 'Series/Details/SeriesDetailsTemplate',
-
- regions : {
- seasons : '#seasons',
- info : '#info'
- },
-
- ui : {
- header : '.x-header',
- monitored : '.x-monitored',
- edit : '.x-edit',
- refresh : '.x-refresh',
- rename : '.x-rename',
- search : '.x-search',
- poster : '.x-series-poster',
- manualSearch : '.x-manual-search'
- },
-
- events : {
- 'click .x-episode-file-editor' : '_openEpisodeFileEditor',
- 'click .x-monitored' : '_toggleMonitored',
- 'click .x-edit' : '_editSeries',
- 'click .x-refresh' : '_refreshSeries',
- 'click .x-rename' : '_renameSeries',
- 'click .x-search' : '_seriesSearch',
- 'click .x-manual-search' : '_manualSearchM'
- },
-
- initialize : function() {
- this.seriesCollection = SeriesCollection.clone();
- this.seriesCollection.shadowCollection.bindSignalR();
-
- this.listenTo(this.model, 'change:monitored', this._setMonitoredState);
- this.listenTo(this.model, 'remove', this._seriesRemoved);
- this.listenTo(vent, vent.Events.CommandComplete, this._commandComplete);
-
- this.listenTo(this.model, 'change', function(model, options) {
- if (options && options.changeSource === 'signalr') {
- this._refresh();
- }
- });
-
- this.listenTo(this.model, 'change:images', this._updateImages);
- },
-
- onShow : function() {
- this._showBackdrop();
- this._showSeasons();
- this._setMonitoredState();
- this._showInfo();
- },
-
- onRender : function() {
- CommandController.bindToCommand({
- element : this.ui.refresh,
- command : {
- name : 'refreshSeries'
- }
- });
- CommandController.bindToCommand({
- element : this.ui.search,
- command : {
- name : 'seriesSearch'
- }
- });
-
- CommandController.bindToCommand({
- element : this.ui.rename,
- command : {
- name : 'renameFiles',
- seriesId : this.model.id,
- seasonNumber : -1
- }
- });
- },
-
- onClose : function() {
- if (this._backstrech) {
- this._backstrech.destroy();
- delete this._backstrech;
- }
-
- $('body').removeClass('backdrop');
- reqres.removeHandler(reqres.Requests.GetEpisodeFileById);
- },
-
- _getImage : function(type) {
- var image = _.where(this.model.get('images'), { coverType : type });
-
- if (image && image[0]) {
- return image[0].url;
- }
-
- return undefined;
- },
-
- _toggleMonitored : function() {
- var savePromise = this.model.save('monitored', !this.model.get('monitored'), { wait : true });
-
- this.ui.monitored.spinForPromise(savePromise);
- },
-
- _setMonitoredState : function() {
- var monitored = this.model.get('monitored');
-
- this.ui.monitored.removeAttr('data-idle-icon');
- this.ui.monitored.removeClass('fa-spin icon-sonarr-spinner');
-
- if (monitored) {
- this.ui.monitored.addClass('icon-sonarr-monitored');
- this.ui.monitored.removeClass('icon-sonarr-unmonitored');
- this.$el.removeClass('series-not-monitored');
- } else {
- this.ui.monitored.addClass('icon-sonarr-unmonitored');
- this.ui.monitored.removeClass('icon-sonarr-monitored');
- this.$el.addClass('series-not-monitored');
- }
- },
-
- _editSeries : function() {
- vent.trigger(vent.Commands.EditSeriesCommand, { series : this.model });
- },
-
- _refreshSeries : function() {
- CommandController.Execute('refreshSeries', {
- name : 'refreshSeries',
- seriesId : this.model.id
- });
- },
-
- _seriesRemoved : function() {
- Backbone.history.navigate('/', { trigger : true });
- },
-
- _renameSeries : function() {
- vent.trigger(vent.Commands.ShowRenamePreview, { series : this.model });
- },
-
- _seriesSearch : function() {
- CommandController.Execute('seriesSearch', {
- name : 'seriesSearch',
- seriesId : this.model.id
- });
- },
-
- _showSeasons : function() {
- var self = this;
-
- this.seasons.show(new LoadingView());
-
- this.seasonCollection = new SeasonCollection(this.model.get('seasons'));
- this.episodeCollection = new EpisodeCollection({ seriesId : this.model.id }).bindSignalR();
- this.episodeFileCollection = new EpisodeFileCollection({ seriesId : this.model.id }).bindSignalR();
-
- reqres.setHandler(reqres.Requests.GetEpisodeFileById, function(episodeFileId) {
- return self.episodeFileCollection.get(episodeFileId);
- });
-
- reqres.setHandler(reqres.Requests.GetAlternateNameBySeasonNumber, function(seriesId, seasonNumber, sceneSeasonNumber) {
- if (self.model.get('id') !== seriesId) {
- return [];
- }
-
- if (sceneSeasonNumber === undefined) {
- sceneSeasonNumber = seasonNumber;
- }
-
- return _.where(self.model.get('alternateTitles'),
- function(alt) {
- return alt.sceneSeasonNumber === sceneSeasonNumber || alt.seasonNumber === seasonNumber;
- });
- });
-
- $.when(this.episodeCollection.fetch(), this.episodeFileCollection.fetch()).done(function() {
- var seasonCollectionView = new SeasonCollectionView({
- collection : self.seasonCollection,
- episodeCollection : self.episodeCollection,
- series : self.model
- });
-
- if (!self.isClosed) {
- self.seasons.show(seasonCollectionView);
- }
- });
- },
-
- _showInfo : function() {
- this.info.show(new InfoView({
- model : this.model,
- episodeFileCollection : this.episodeFileCollection
- }));
- },
-
- _commandComplete : function(options) {
- if (options.command.get('name') === 'renamefiles') {
- if (options.command.get('seriesId') === this.model.get('id')) {
- this._refresh();
- }
- }
- },
-
- _refresh : function() {
- this.seasonCollection.add(this.model.get('seasons'), { merge : true });
- this.episodeCollection.fetch();
- this.episodeFileCollection.fetch();
-
- this._setMonitoredState();
- this._showInfo();
- },
-
- _openEpisodeFileEditor : function() {
- var view = new EpisodeFileEditorLayout({
- series : this.model,
- episodeCollection : this.episodeCollection
- });
-
- vent.trigger(vent.Commands.OpenModalCommand, view);
- },
-
- _updateImages : function () {
- var poster = this._getImage('poster');
-
- if (poster) {
- this.ui.poster.attr('src', poster);
- }
-
- this._showBackdrop();
- },
-
- _showBackdrop : function () {
- $('body').addClass('backdrop');
- var fanArt = this._getImage('fanart');
-
- if (fanArt) {
- this._backstrech = $.backstretch(fanArt);
- } else {
- $('body').removeClass('backdrop');
- }
- },
-
- _manualSearchM : function() {
- console.warn("Manual Search started");
- console.warn(this.model.get("seriesId"));
- console.warn(this.model);
- console.warn(this.episodeCollection);
- vent.trigger(vent.Commands.ShowEpisodeDetails, {
- episode : this.episodeCollection.models[0],
- hideSeriesLink : true,
- openingTab : 'search'
- });
- }
-});
diff --git a/src/UI/Series/Details/SeriesDetailsTemplate.hbs b/src/UI/Series/Details/SeriesDetailsTemplate.hbs
deleted file mode 100644
index 04978e3d4..000000000
--- a/src/UI/Series/Details/SeriesDetailsTemplate.hbs
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
diff --git a/src/UI/Series/Edit/EditSeriesView.js b/src/UI/Series/Edit/EditSeriesView.js
deleted file mode 100644
index 3f8c789e8..000000000
--- a/src/UI/Series/Edit/EditSeriesView.js
+++ /dev/null
@@ -1,54 +0,0 @@
-var vent = require('vent');
-var Marionette = require('marionette');
-var Profiles = require('../../Profile/ProfileCollection');
-var AsModelBoundView = require('../../Mixins/AsModelBoundView');
-var AsValidatedView = require('../../Mixins/AsValidatedView');
-var AsEditModalView = require('../../Mixins/AsEditModalView');
-require('../../Mixins/TagInput');
-require('../../Mixins/FileBrowser');
-
-var view = Marionette.ItemView.extend({
- template : 'Series/Edit/EditSeriesViewTemplate',
-
- ui : {
- profile : '.x-profile',
- path : '.x-path',
- tags : '.x-tags'
- },
-
- events : {
- 'click .x-remove' : '_removeSeries'
- },
-
- initialize : function() {
- this.model.set('profiles', Profiles);
- },
-
- onRender : function() {
- this.ui.path.fileBrowser();
- this.ui.tags.tagInput({
- model : this.model,
- property : 'tags'
- });
- },
-
- _onBeforeSave : function() {
- var profileId = this.ui.profile.val();
- this.model.set({ profileId : profileId });
- },
-
- _onAfterSave : function() {
- this.trigger('saved');
- vent.trigger(vent.Commands.CloseModalCommand);
- },
-
- _removeSeries : function() {
- vent.trigger(vent.Commands.DeleteSeriesCommand, { series : this.model });
- }
-});
-
-AsModelBoundView.call(view);
-AsValidatedView.call(view);
-AsEditModalView.call(view);
-
-module.exports = view;
\ No newline at end of file
diff --git a/src/UI/Series/Edit/EditSeriesViewTemplate.hbs b/src/UI/Series/Edit/EditSeriesViewTemplate.hbs
deleted file mode 100644
index baeab579b..000000000
--- a/src/UI/Series/Edit/EditSeriesViewTemplate.hbs
+++ /dev/null
@@ -1,104 +0,0 @@
-
diff --git a/src/UI/Series/Editor/Organize/OrganizeFilesView.js b/src/UI/Series/Editor/Organize/OrganizeFilesView.js
deleted file mode 100644
index 25534fb21..000000000
--- a/src/UI/Series/Editor/Organize/OrganizeFilesView.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var _ = require('underscore');
-var vent = require('vent');
-var Backbone = require('backbone');
-var Marionette = require('marionette');
-var CommandController = require('../../../Commands/CommandController');
-
-module.exports = Marionette.ItemView.extend({
- template : 'Series/Editor/Organize/OrganizeFilesViewTemplate',
-
- events : {
- 'click .x-confirm-organize' : '_organize'
- },
-
- initialize : function(options) {
- this.series = options.series;
- this.templateHelpers = {
- numberOfSeries : this.series.length,
- series : new Backbone.Collection(this.series).toJSON()
- };
- },
-
- _organize : function() {
- var seriesIds = _.pluck(this.series, 'id');
-
- CommandController.Execute('renameSeries', {
- name : 'renameSeries',
- seriesIds : seriesIds
- });
-
- this.trigger('organizingFiles');
- vent.trigger(vent.Commands.CloseModalCommand);
- }
-});
\ No newline at end of file
diff --git a/src/UI/Series/Editor/Organize/OrganizeFilesViewTemplate.hbs b/src/UI/Series/Editor/Organize/OrganizeFilesViewTemplate.hbs
deleted file mode 100644
index 312c8b6e2..000000000
--- a/src/UI/Series/Editor/Organize/OrganizeFilesViewTemplate.hbs
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
- Tip: To preview a rename... select "Cancel" then any series title and use the
-
-
- Are you sure you want to update all files in the {{numberOfSeries}} selected series?
-
- {{debug}}
-
- {{#each series}}
- - {{title}}
- {{/each}}
-
-
-
-
diff --git a/src/UI/Series/Editor/SeriesEditorFooterView.js b/src/UI/Series/Editor/SeriesEditorFooterView.js
deleted file mode 100644
index 6f4f83a6c..000000000
--- a/src/UI/Series/Editor/SeriesEditorFooterView.js
+++ /dev/null
@@ -1,126 +0,0 @@
-var _ = require('underscore');
-var Marionette = require('marionette');
-var vent = require('vent');
-var Profiles = require('../../Profile/ProfileCollection');
-var RootFolders = require('../../AddSeries/RootFolders/RootFolderCollection');
-var RootFolderLayout = require('../../AddSeries/RootFolders/RootFolderLayout');
-var UpdateFilesSeriesView = require('./Organize/OrganizeFilesView');
-var Config = require('../../Config');
-
-module.exports = Marionette.ItemView.extend({
- template : 'Series/Editor/SeriesEditorFooterViewTemplate',
-
- ui : {
- monitored : '.x-monitored',
- profile : '.x-profiles',
- seasonFolder : '.x-season-folder',
- rootFolder : '.x-root-folder',
- selectedCount : '.x-selected-count',
- container : '.series-editor-footer',
- actions : '.x-action'
- },
-
- events : {
- 'click .x-save' : '_updateAndSave',
- 'change .x-root-folder' : '_rootFolderChanged',
- 'click .x-organize-files' : '_organizeFiles'
- },
-
- templateHelpers : function() {
- return {
- profiles : Profiles,
- rootFolders : RootFolders.toJSON()
- };
- },
-
- initialize : function(options) {
- this.seriesCollection = options.collection;
-
- RootFolders.fetch().done(function() {
- RootFolders.synced = true;
- });
-
- this.editorGrid = options.editorGrid;
- this.listenTo(this.seriesCollection, 'backgrid:selected', this._updateInfo);
- this.listenTo(RootFolders, 'all', this.render);
- },
-
- onRender : function() {
- this._updateInfo();
- },
-
- _updateAndSave : function() {
- var selected = this.editorGrid.getSelectedModels();
-
- var monitored = this.ui.monitored.val();
- var profile = this.ui.profile.val();
- var seasonFolder = this.ui.seasonFolder.val();
- var rootFolder = this.ui.rootFolder.val();
-
- _.each(selected, function(model) {
- if (monitored === 'true') {
- model.set('monitored', true);
- } else if (monitored === 'false') {
- model.set('monitored', false);
- }
-
- if (profile !== 'noChange') {
- model.set('profileId', parseInt(profile, 10));
- }
-
- if (seasonFolder === 'true') {
- model.set('seasonFolder', true);
- } else if (seasonFolder === 'false') {
- model.set('seasonFolder', false);
- }
-
- if (rootFolder !== 'noChange') {
- var rootFolderPath = RootFolders.get(parseInt(rootFolder, 10));
-
- model.set('rootFolderPath', rootFolderPath.get('path'));
- }
-
- model.edited = true;
- });
-
- this.seriesCollection.save();
- },
-
- _updateInfo : function() {
- var selected = this.editorGrid.getSelectedModels();
- var selectedCount = selected.length;
-
- this.ui.selectedCount.html('{0} series selected'.format(selectedCount));
-
- if (selectedCount === 0) {
- this.ui.actions.attr('disabled', 'disabled');
- } else {
- this.ui.actions.removeAttr('disabled');
- }
- },
-
- _rootFolderChanged : function() {
- var rootFolderValue = this.ui.rootFolder.val();
- if (rootFolderValue === 'addNew') {
- var rootFolderLayout = new RootFolderLayout();
- this.listenToOnce(rootFolderLayout, 'folderSelected', this._setRootFolder);
- vent.trigger(vent.Commands.OpenModalCommand, rootFolderLayout);
- } else {
- Config.setValue(Config.Keys.DefaultRootFolderId, rootFolderValue);
- }
- },
-
- _setRootFolder : function(options) {
- vent.trigger(vent.Commands.CloseModalCommand);
- this.ui.rootFolder.val(options.model.id);
- this._rootFolderChanged();
- },
-
- _organizeFiles : function() {
- var selected = this.editorGrid.getSelectedModels();
- var updateFilesSeriesView = new UpdateFilesSeriesView({ series : selected });
- this.listenToOnce(updateFilesSeriesView, 'updatingFiles', this._afterSave);
-
- vent.trigger(vent.Commands.OpenModalCommand, updateFilesSeriesView);
- }
-});
\ No newline at end of file
diff --git a/src/UI/Series/Editor/SeriesEditorFooterViewTemplate.hbs b/src/UI/Series/Editor/SeriesEditorFooterViewTemplate.hbs
deleted file mode 100644
index c47b3c50a..000000000
--- a/src/UI/Series/Editor/SeriesEditorFooterViewTemplate.hbs
+++ /dev/null
@@ -1,54 +0,0 @@
-
diff --git a/src/UI/Series/Editor/SeriesEditorLayout.js b/src/UI/Series/Editor/SeriesEditorLayout.js
deleted file mode 100644
index 2dd7dc3f0..000000000
--- a/src/UI/Series/Editor/SeriesEditorLayout.js
+++ /dev/null
@@ -1,184 +0,0 @@
-var vent = require('vent');
-var Marionette = require('marionette');
-var Backgrid = require('backgrid');
-var EmptyView = require('../Index/EmptyView');
-var SeriesCollection = require('../SeriesCollection');
-var SeriesTitleCell = require('../../Cells/SeriesTitleCell');
-var ProfileCell = require('../../Cells/ProfileCell');
-var SeriesStatusCell = require('../../Cells/SeriesStatusCell');
-var SeasonFolderCell = require('../../Cells/SeasonFolderCell');
-var SelectAllCell = require('../../Cells/SelectAllCell');
-var ToolbarLayout = require('../../Shared/Toolbar/ToolbarLayout');
-var FooterView = require('./SeriesEditorFooterView');
-require('../../Mixins/backbone.signalr.mixin');
-
-module.exports = Marionette.Layout.extend({
- template : 'Series/Editor/SeriesEditorLayoutTemplate',
-
- regions : {
- seriesRegion : '#x-series-editor',
- toolbar : '#x-toolbar'
- },
-
- ui : {
- monitored : '.x-monitored',
- profiles : '.x-profiles',
- rootFolder : '.x-root-folder',
- selectedCount : '.x-selected-count'
- },
-
- events : {
- 'click .x-save' : '_updateAndSave',
- 'change .x-root-folder' : '_rootFolderChanged'
- },
-
- columns : [
- {
- name : '',
- cell : SelectAllCell,
- headerCell : 'select-all',
- sortable : false
- },
- {
- name : 'statusWeight',
- label : '',
- cell : SeriesStatusCell
- },
- {
- name : 'title',
- label : 'Title',
- cell : SeriesTitleCell,
- cellValue : 'this'
- },
- {
- name : 'profileId',
- label : 'Profile',
- cell : ProfileCell
- },
- {
- name : 'seasonFolder',
- label : 'Season Folder',
- cell : SeasonFolderCell
- },
- {
- name : 'path',
- label : 'Path',
- cell : 'string'
- }
- ],
-
- leftSideButtons : {
- type : 'default',
- storeState : false,
- items : [
- {
- title : 'Season Pass',
- icon : 'icon-sonarr-monitored',
- route : 'seasonpass'
- },
- {
- title : 'Update Library',
- icon : 'icon-sonarr-refresh',
- command : 'refreshseries',
- successMessage : 'Library was updated!',
- errorMessage : 'Library update failed!'
- }
- ]
- },
-
- initialize : function() {
- this.seriesCollection = SeriesCollection.clone();
- this.seriesCollection.shadowCollection.bindSignalR();
- this.listenTo(this.seriesCollection, 'save', this.render);
-
- this.filteringOptions = {
- type : 'radio',
- storeState : true,
- menuKey : 'serieseditor.filterMode',
- defaultAction : 'all',
- items : [
- {
- key : 'all',
- title : '',
- tooltip : 'All',
- icon : 'icon-sonarr-all',
- callback : this._setFilter
- },
- {
- key : 'monitored',
- title : '',
- 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
- }
- ]
- };
- },
-
- onRender : function() {
- this._showToolbar();
- this._showTable();
- },
-
- onClose : function() {
- vent.trigger(vent.Commands.CloseControlPanelCommand);
- },
-
- _showTable : function() {
- if (this.seriesCollection.shadowCollection.length === 0) {
- this.seriesRegion.show(new EmptyView());
- this.toolbar.close();
- return;
- }
-
- this.columns[0].sortedCollection = this.seriesCollection;
-
- this.editorGrid = new Backgrid.Grid({
- collection : this.seriesCollection,
- columns : this.columns,
- className : 'table table-hover'
- });
-
- this.seriesRegion.show(this.editorGrid);
- this._showFooter();
- },
-
- _showToolbar : function() {
- this.toolbar.show(new ToolbarLayout({
- left : [
- this.leftSideButtons
- ],
- right : [
- this.filteringOptions
- ],
- context : this
- }));
- },
-
- _showFooter : function() {
- vent.trigger(vent.Commands.OpenControlPanelCommand, new FooterView({
- editorGrid : this.editorGrid,
- collection : this.seriesCollection
- }));
- },
-
- _setFilter : function(buttonContext) {
- var mode = buttonContext.model.get('key');
-
- this.seriesCollection.setFilterMode(mode);
- }
-});
\ No newline at end of file
diff --git a/src/UI/Series/Editor/SeriesEditorLayoutTemplate.hbs b/src/UI/Series/Editor/SeriesEditorLayoutTemplate.hbs
deleted file mode 100644
index 1d0519894..000000000
--- a/src/UI/Series/Editor/SeriesEditorLayoutTemplate.hbs
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/src/UI/Series/EpisodeCollection.js b/src/UI/Series/EpisodeCollection.js
deleted file mode 100644
index a6794394b..000000000
--- a/src/UI/Series/EpisodeCollection.js
+++ /dev/null
@@ -1,62 +0,0 @@
-var Backbone = require('backbone');
-var PageableCollection = require('backbone.pageable');
-var EpisodeModel = require('./EpisodeModel');
-require('./EpisodeCollection');
-
-module.exports = PageableCollection.extend({
- url : window.NzbDrone.ApiRoot + '/episode',
- model : EpisodeModel,
-
- state : {
- sortKey : 'episodeNumber',
- order : 1,
- pageSize : 100000
- },
-
- mode : 'client',
-
- originalFetch : Backbone.Collection.prototype.fetch,
-
- initialize : function(options) {
- this.seriesId = options.seriesId;
- },
-
- bySeason : function(season) {
- var filtered = this.filter(function(episode) {
- return episode.get('seasonNumber') === season;
- });
-
- var EpisodeCollection = require('./EpisodeCollection');
-
- return new EpisodeCollection(filtered);
- },
-
- comparator : function(model1, model2) {
- var episode1 = model1.get('episodeNumber');
- var episode2 = model2.get('episodeNumber');
-
- if (episode1 < episode2) {
- return 1;
- }
-
- if (episode1 > episode2) {
- return -1;
- }
-
- return 0;
- },
-
- fetch : function(options) {
- if (!this.seriesId) {
- throw 'seriesId is required';
- }
-
- if (!options) {
- options = {};
- }
-
- options.data = { seriesId : this.seriesId };
-
- return this.originalFetch.call(this, options);
- }
-});
\ No newline at end of file
diff --git a/src/UI/Series/EpisodeFileCollection.js b/src/UI/Series/EpisodeFileCollection.js
deleted file mode 100644
index dff988512..000000000
--- a/src/UI/Series/EpisodeFileCollection.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var Backbone = require('backbone');
-var EpisodeFileModel = require('./EpisodeFileModel');
-
-module.exports = Backbone.Collection.extend({
- url : window.NzbDrone.ApiRoot + '/episodefile',
- model : EpisodeFileModel,
-
- originalFetch : Backbone.Collection.prototype.fetch,
-
- initialize : function(options) {
- this.seriesId = options.seriesId;
- this.models = [];
- },
-
- fetch : function(options) {
- if (!this.seriesId) {
- throw 'seriesId is required';
- }
-
- if (!options) {
- options = {};
- }
-
- options.data = { seriesId : this.seriesId };
-
- return this.originalFetch.call(this, options);
- }
-});
\ No newline at end of file
diff --git a/src/UI/Series/EpisodeFileModel.js b/src/UI/Series/EpisodeFileModel.js
deleted file mode 100644
index 3986a5948..000000000
--- a/src/UI/Series/EpisodeFileModel.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var Backbone = require('backbone');
-
-module.exports = Backbone.Model.extend({});
\ No newline at end of file
diff --git a/src/UI/Series/EpisodeModel.js b/src/UI/Series/EpisodeModel.js
deleted file mode 100644
index ebb72cf29..000000000
--- a/src/UI/Series/EpisodeModel.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var Backbone = require('backbone');
-
-module.exports = Backbone.Model.extend({
- defaults : {
- seasonNumber : 0,
- status : 0
- },
-
- methodUrls : {
- 'update' : window.NzbDrone.ApiRoot + '/episode'
- },
-
- sync : function(method, model, options) {
- if (model.methodUrls && model.methodUrls[method.toLowerCase()]) {
- options = options || {};
- options.url = model.methodUrls[method.toLowerCase()];
- }
- return Backbone.sync(method, model, options);
- }
-});
\ No newline at end of file
diff --git a/src/UI/Series/Index/EmptyTemplate.hbs b/src/UI/Series/Index/EmptyTemplate.hbs
deleted file mode 100644
index 06fb40fe5..000000000
--- a/src/UI/Series/Index/EmptyTemplate.hbs
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- You must be new around here, You should add some series.
-
-
-
-
diff --git a/src/UI/Series/Index/EmptyView.js b/src/UI/Series/Index/EmptyView.js
deleted file mode 100644
index 01dcc07a4..000000000
--- a/src/UI/Series/Index/EmptyView.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Marionette = require('marionette');
-
-module.exports = Marionette.CompositeView.extend({
- template : 'Series/Index/EmptyTemplate'
-});
\ No newline at end of file
diff --git a/src/UI/Series/Index/EpisodeProgressPartial.hbs b/src/UI/Series/Index/EpisodeProgressPartial.hbs
deleted file mode 100644
index db5c49a2b..000000000
--- a/src/UI/Series/Index/EpisodeProgressPartial.hbs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
{{episodeFileCount}} / {{episodeCount}}
-
{{episodeFileCount}} / {{episodeCount}}
-
\ No newline at end of file
diff --git a/src/UI/Series/Index/FooterModel.js b/src/UI/Series/Index/FooterModel.js
deleted file mode 100644
index 235552061..000000000
--- a/src/UI/Series/Index/FooterModel.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var Backbone = require('backbone');
-var _ = require('underscore');
-
-module.exports = Backbone.Model.extend({});
\ No newline at end of file
diff --git a/src/UI/Series/Index/FooterView.js b/src/UI/Series/Index/FooterView.js
deleted file mode 100644
index 1d31cc404..000000000
--- a/src/UI/Series/Index/FooterView.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var Marionette = require('marionette');
-
-module.exports = Marionette.CompositeView.extend({
- template : 'Series/Index/FooterViewTemplate'
-});
\ No newline at end of file
diff --git a/src/UI/Series/Index/FooterViewTemplate.hbs b/src/UI/Series/Index/FooterViewTemplate.hbs
deleted file mode 100644
index 1b45fa747..000000000
--- a/src/UI/Series/Index/FooterViewTemplate.hbs
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
- - Continuing (All episodes downloaded)
- - Ended (All episodes downloaded)
- - Missing Episodes (Series monitored)
- - Missing Episodes (Series not monitored)
-
-
-
-
-
-
- - Series
- - {{series}}
-
- - Ended
- - {{ended}}
-
- - Continuing
- - {{continuing}}
-
-
-
-
-
- - Monitored
- - {{monitored}}
-
- - Unmonitored
- - {{unmonitored}}
-
-
-
-
-
- - Episodes
- - {{episodes}}
-
- - Files
- - {{episodeFiles}}
-
-
-
-
-
diff --git a/src/UI/Series/Index/Overview/SeriesOverviewCollectionView.js b/src/UI/Series/Index/Overview/SeriesOverviewCollectionView.js
deleted file mode 100644
index 7db4b76f0..000000000
--- a/src/UI/Series/Index/Overview/SeriesOverviewCollectionView.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var Marionette = require('marionette');
-var ListItemView = require('./SeriesOverviewItemView');
-
-module.exports = Marionette.CompositeView.extend({
- itemView : ListItemView,
- itemViewContainer : '#x-series-list',
- template : 'Series/Index/Overview/SeriesOverviewCollectionViewTemplate'
-});
\ No newline at end of file
diff --git a/src/UI/Series/Index/Overview/SeriesOverviewCollectionViewTemplate.hbs b/src/UI/Series/Index/Overview/SeriesOverviewCollectionViewTemplate.hbs
deleted file mode 100644
index 046bb3348..000000000
--- a/src/UI/Series/Index/Overview/SeriesOverviewCollectionViewTemplate.hbs
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/src/UI/Series/Index/Overview/SeriesOverviewItemView.js b/src/UI/Series/Index/Overview/SeriesOverviewItemView.js
deleted file mode 100644
index bb780480b..000000000
--- a/src/UI/Series/Index/Overview/SeriesOverviewItemView.js
+++ /dev/null
@@ -1,7 +0,0 @@
-var vent = require('vent');
-var Marionette = require('marionette');
-var SeriesIndexItemView = require('../SeriesIndexItemView');
-
-module.exports = SeriesIndexItemView.extend({
- template : 'Series/Index/Overview/SeriesOverviewItemViewTemplate'
-});
\ No newline at end of file
diff --git a/src/UI/Series/Index/Overview/SeriesOverviewItemViewTemplate.hbs b/src/UI/Series/Index/Overview/SeriesOverviewItemViewTemplate.hbs
deleted file mode 100644
index ee6ddddee..000000000
--- a/src/UI/Series/Index/Overview/SeriesOverviewItemViewTemplate.hbs
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
-
-
-
-
- {{#if_eq status compare="ended"}}
- Ended
- {{/if_eq}}
-
- {{#if nextAiring}}
- {{RelativeDate nextAiring}}
- {{/if}}
-
- {{seasonCountHelper}}
-
- {{profile profileId}}
-
-
- {{> EpisodeProgressPartial }}
-
-
-
-
-
diff --git a/src/UI/Series/Index/Posters/SeriesPostersCollectionView.js b/src/UI/Series/Index/Posters/SeriesPostersCollectionView.js
deleted file mode 100644
index 0d6094f1c..000000000
--- a/src/UI/Series/Index/Posters/SeriesPostersCollectionView.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var Marionette = require('marionette');
-var PosterItemView = require('./SeriesPostersItemView');
-
-module.exports = Marionette.CompositeView.extend({
- itemView : PosterItemView,
- itemViewContainer : '#x-series-posters',
- template : 'Series/Index/Posters/SeriesPostersCollectionViewTemplate'
-});
\ No newline at end of file
diff --git a/src/UI/Series/Index/Posters/SeriesPostersCollectionViewTemplate.hbs b/src/UI/Series/Index/Posters/SeriesPostersCollectionViewTemplate.hbs
deleted file mode 100644
index 11b8e8ac7..000000000
--- a/src/UI/Series/Index/Posters/SeriesPostersCollectionViewTemplate.hbs
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/UI/Series/Index/Posters/SeriesPostersItemView.js b/src/UI/Series/Index/Posters/SeriesPostersItemView.js
deleted file mode 100644
index 9a42b4655..000000000
--- a/src/UI/Series/Index/Posters/SeriesPostersItemView.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var SeriesIndexItemView = require('../SeriesIndexItemView');
-
-module.exports = SeriesIndexItemView.extend({
- tagName : 'li',
- template : 'Series/Index/Posters/SeriesPostersItemViewTemplate',
-
- initialize : function() {
- this.events['mouseenter .x-series-poster-container'] = 'posterHoverAction';
- this.events['mouseleave .x-series-poster-container'] = 'posterHoverAction';
-
- this.ui.controls = '.x-series-controls';
- this.ui.title = '.x-title';
- },
-
- posterHoverAction : function() {
- this.ui.controls.slideToggle();
- this.ui.title.slideToggle();
- }
-});
\ No newline at end of file
diff --git a/src/UI/Series/Index/Posters/SeriesPostersItemViewTemplate.hbs b/src/UI/Series/Index/Posters/SeriesPostersItemViewTemplate.hbs
deleted file mode 100644
index fba301c4f..000000000
--- a/src/UI/Series/Index/Posters/SeriesPostersItemViewTemplate.hbs
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
- {{> EpisodeProgressPartial }}
-
- {{#if nextAiring}}
- {{RelativeDate nextAiring}}
- {{/if}}
-
-
-
diff --git a/src/UI/Series/Index/SeriesIndexItemView.js b/src/UI/Series/Index/SeriesIndexItemView.js
deleted file mode 100644
index 427fe489e..000000000
--- a/src/UI/Series/Index/SeriesIndexItemView.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var vent = require('vent');
-var Marionette = require('marionette');
-var CommandController = require('../../Commands/CommandController');
-
-module.exports = Marionette.ItemView.extend({
- ui : {
- refresh : '.x-refresh'
- },
-
- events : {
- 'click .x-edit' : '_editSeries',
- 'click .x-refresh' : '_refreshSeries'
- },
-
- onRender : function() {
- CommandController.bindToCommand({
- element : this.ui.refresh,
- command : {
- name : 'refreshSeries',
- seriesId : this.model.get('id')
- }
- });
- },
-
- _editSeries : function() {
- vent.trigger(vent.Commands.EditSeriesCommand, { series : this.model });
- },
-
- _refreshSeries : function() {
- CommandController.Execute('refreshSeries', {
- name : 'refreshSeries',
- seriesId : this.model.id
- });
- }
-});
\ No newline at end of file
diff --git a/src/UI/Series/Index/SeriesIndexLayout.js b/src/UI/Series/Index/SeriesIndexLayout.js
deleted file mode 100644
index 77f31aac4..000000000
--- a/src/UI/Series/Index/SeriesIndexLayout.js
+++ /dev/null
@@ -1,354 +0,0 @@
-var _ = require('underscore');
-var Marionette = require('marionette');
-var Backgrid = require('backgrid');
-var PosterCollectionView = require('./Posters/SeriesPostersCollectionView');
-var ListCollectionView = require('./Overview/SeriesOverviewCollectionView');
-var EmptyView = require('./EmptyView');
-var SeriesCollection = require('../SeriesCollection');
-var RelativeDateCell = require('../../Cells/RelativeDateCell');
-var SeriesTitleCell = require('../../Cells/SeriesTitleCell');
-var TemplatedCell = require('../../Cells/TemplatedCell');
-var ProfileCell = require('../../Cells/ProfileCell');
-var EpisodeProgressCell = require('../../Cells/EpisodeProgressCell');
-var SeriesActionsCell = require('../../Cells/SeriesActionsCell');
-var SeriesStatusCell = require('../../Cells/SeriesStatusCell');
-var FooterView = require('./FooterView');
-var FooterModel = require('./FooterModel');
-var ToolbarLayout = require('../../Shared/Toolbar/ToolbarLayout');
-require('../../Mixins/backbone.signalr.mixin');
-
-module.exports = Marionette.Layout.extend({
- template : 'Series/Index/SeriesIndexLayoutTemplate',
-
- regions : {
- seriesRegion : '#x-series',
- toolbar : '#x-toolbar',
- toolbar2 : '#x-toolbar2',
- footer : '#x-series-footer'
- },
-
- columns : [
- {
- name : 'statusWeight',
- label : '',
- cell : SeriesStatusCell
- },
- {
- name : 'title',
- label : 'Title',
- cell : SeriesTitleCell,
- cellValue : 'this',
- sortValue : 'sortTitle'
- },
- {
- name : 'seasonCount',
- label : 'Seasons',
- cell : 'integer'
- },
- {
- name : 'profileId',
- label : 'Profile',
- cell : ProfileCell
- },
- {
- name : 'network',
- label : 'Network',
- cell : 'string'
- },
- {
- name : 'nextAiring',
- label : 'Next Airing',
- cell : RelativeDateCell
- },
- {
- name : 'percentOfEpisodes',
- label : 'Episodes',
- cell : EpisodeProgressCell,
- className : 'episode-progress-cell'
- },
- {
- name : 'this',
- label : '',
- sortable : false,
- cell : SeriesActionsCell
- }
- ],
-
- leftSideButtons : {
- type : 'default',
- storeState : false,
- collapse : true,
- items : [
- {
- title : 'Add Movie',
- icon : 'icon-sonarr-add',
- route : 'addmovies'
- },
- {
- title : 'Season Pass',
- icon : 'icon-sonarr-monitored',
- route : 'seasonpass'
- },
- {
- title : 'Series Editor',
- icon : 'icon-sonarr-edit',
- route : 'serieseditor'
- },
- {
- title : 'RSS Sync',
- icon : 'icon-sonarr-rss',
- command : 'rsssync',
- errorMessage : 'RSS Sync Failed!'
- },
- {
- title : 'Update Library',
- icon : 'icon-sonarr-refresh',
- command : 'refreshseries',
- successMessage : 'Library was updated!',
- errorMessage : 'Library update failed!'
- }
- ]
- },
-
- initialize : function() {
- this.seriesCollection = SeriesCollection.clone();
- this.seriesCollection.shadowCollection.bindSignalR();
-
- this.listenTo(this.seriesCollection.shadowCollection, 'sync', function(model, collection, options) {
- this.seriesCollection.fullCollection.resetFiltered();
- this._renderView();
- });
-
- this.listenTo(this.seriesCollection.shadowCollection, 'add', function(model, collection, options) {
- this.seriesCollection.fullCollection.resetFiltered();
- this._renderView();
- });
-
- this.listenTo(this.seriesCollection.shadowCollection, 'remove', function(model, collection, options) {
- this.seriesCollection.fullCollection.resetFiltered();
- this._renderView();
- });
-
- this.sortingOptions = {
- type : 'sorting',
- storeState : false,
- viewCollection : this.seriesCollection,
- items : [
- {
- title : 'Title',
- name : 'title'
- },
- {
- title : 'Seasons',
- name : 'seasonCount'
- },
- {
- title : 'Quality',
- name : 'profileId'
- },
- {
- title : 'Network',
- name : 'network'
- },
- {
- title : 'Next Airing',
- name : 'nextAiring'
- },
- {
- title : 'Episodes',
- name : 'percentOfEpisodes'
- }
- ]
- };
-
- this.filteringOptions = {
- type : 'radio',
- storeState : true,
- menuKey : 'series.filterMode',
- defaultAction : 'all',
- items : [
- {
- key : 'all',
- title : '',
- tooltip : 'All',
- icon : 'icon-sonarr-all',
- callback : this._setFilter
- },
- {
- key : 'monitored',
- title : '',
- 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
- }
- ]
- };
-
- this.viewButtons = {
- type : 'radio',
- storeState : true,
- menuKey : 'seriesViewMode',
- defaultAction : 'listView',
- items : [
- {
- key : 'posterView',
- title : '',
- tooltip : 'Posters',
- icon : 'icon-sonarr-view-poster',
- callback : this._showPosters
- },
- {
- key : 'listView',
- title : '',
- tooltip : 'Overview List',
- icon : 'icon-sonarr-view-list',
- callback : this._showList
- },
- {
- key : 'tableView',
- title : '',
- tooltip : 'Table',
- icon : 'icon-sonarr-view-table',
- callback : this._showTable
- }
- ]
- };
- },
-
- onShow : function() {
- this._showToolbar();
- this._fetchCollection();
- },
-
- _showTable : function() {
- this.currentView = new Backgrid.Grid({
- collection : this.seriesCollection,
- columns : this.columns,
- className : 'table table-hover'
- });
-
- this._renderView();
- },
-
- _showList : function() {
- this.currentView = new ListCollectionView({
- collection : this.seriesCollection
- });
-
- this._renderView();
- },
-
- _showPosters : function() {
- this.currentView = new PosterCollectionView({
- collection : this.seriesCollection
- });
-
- this._renderView();
- },
-
- _renderView : function() {
- if (SeriesCollection.length === 0) {
- this.seriesRegion.show(new EmptyView());
-
- this.toolbar.close();
- this.toolbar2.close();
- } else {
- this.seriesRegion.show(this.currentView);
-
- this._showToolbar();
- this._showFooter();
- }
- },
-
- _fetchCollection : function() {
- this.seriesCollection.fetch();
- },
-
- _setFilter : function(buttonContext) {
- var mode = buttonContext.model.get('key');
-
- this.seriesCollection.setFilterMode(mode);
- },
-
- _showToolbar : function() {
- if (this.toolbar.currentView) {
- return;
- }
-
- this.toolbar2.show(new ToolbarLayout({
- right : [
- this.filteringOptions
- ],
- context : this
- }));
-
- this.toolbar.show(new ToolbarLayout({
- right : [
- this.sortingOptions,
- this.viewButtons
- ],
- left : [
- this.leftSideButtons
- ],
- context : this
- }));
- },
-
- _showFooter : function() {
- var footerModel = new FooterModel();
- var series = SeriesCollection.models.length;
- var episodes = 0;
- var episodeFiles = 0;
- var ended = 0;
- var continuing = 0;
- var monitored = 0;
-
- _.each(SeriesCollection.models, function(model) {
- episodes += model.get('episodeCount');
- episodeFiles += model.get('episodeFileCount');
-
- if (model.get('status').toLowerCase() === 'ended') {
- ended++;
- } else {
- continuing++;
- }
-
- if (model.get('monitored')) {
- monitored++;
- }
- });
-
- footerModel.set({
- series : series,
- ended : ended,
- continuing : continuing,
- monitored : monitored,
- unmonitored : series - monitored,
- episodes : episodes,
- episodeFiles : episodeFiles
- });
-
- this.footer.show(new FooterView({ model : footerModel }));
- }
-});
diff --git a/src/UI/Series/Index/SeriesIndexLayoutTemplate.hbs b/src/UI/Series/Index/SeriesIndexLayoutTemplate.hbs
deleted file mode 100644
index d9e6b3263..000000000
--- a/src/UI/Series/Index/SeriesIndexLayoutTemplate.hbs
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/src/UI/Series/SeasonCollection.js b/src/UI/Series/SeasonCollection.js
deleted file mode 100644
index ed661af2b..000000000
--- a/src/UI/Series/SeasonCollection.js
+++ /dev/null
@@ -1,10 +0,0 @@
-var Backbone = require('backbone');
-var SeasonModel = require('./SeasonModel');
-
-module.exports = Backbone.Collection.extend({
- model : SeasonModel,
-
- comparator : function(season) {
- return -season.get('seasonNumber');
- }
-});
\ No newline at end of file
diff --git a/src/UI/Series/SeasonModel.js b/src/UI/Series/SeasonModel.js
deleted file mode 100644
index 1ba049eb6..000000000
--- a/src/UI/Series/SeasonModel.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var Backbone = require('backbone');
-
-module.exports = Backbone.Model.extend({
- defaults : {
- seasonNumber : 0
- },
-
- initialize : function() {
- this.set('id', this.get('seasonNumber'));
- }
-});
\ No newline at end of file
diff --git a/src/UI/Series/SeriesCollection.js b/src/UI/Series/SeriesCollection.js
deleted file mode 100644
index bef8fe338..000000000
--- a/src/UI/Series/SeriesCollection.js
+++ /dev/null
@@ -1,120 +0,0 @@
-var _ = require('underscore');
-var Backbone = require('backbone');
-var PageableCollection = require('backbone.pageable');
-var SeriesModel = require('./SeriesModel');
-var ApiData = require('../Shared/ApiData');
-var AsFilteredCollection = require('../Mixins/AsFilteredCollection');
-var AsSortedCollection = require('../Mixins/AsSortedCollection');
-var AsPersistedStateCollection = require('../Mixins/AsPersistedStateCollection');
-var moment = require('moment');
-require('../Mixins/backbone.signalr.mixin');
-
-var Collection = PageableCollection.extend({
- url : window.NzbDrone.ApiRoot + '/series',
- model : SeriesModel,
- tableName : 'series',
-
- state : {
- sortKey : 'sortTitle',
- order : -1,
- pageSize : 100000,
- secondarySortKey : 'sortTitle',
- secondarySortOrder : -1
- },
-
- mode : 'client',
-
- save : function() {
- var self = this;
-
- var proxy = _.extend(new Backbone.Model(), {
- id : '',
-
- url : self.url + '/editor',
-
- toJSON : function() {
- return self.filter(function(model) {
- return model.edited;
- });
- }
- });
-
- this.listenTo(proxy, 'sync', function(proxyModel, models) {
- this.add(models, { merge : true });
- this.trigger('save', this);
- });
-
- return proxy.save();
- },
-
- filterModes : {
- 'all' : [
- null,
- null
- ],
- 'continuing' : [
- 'status',
- 'continuing'
- ],
- 'ended' : [
- 'status',
- 'ended'
- ],
- 'monitored' : [
- 'monitored',
- true
- ],
- 'missing' : [
- null,
- null,
- function(model) { return model.get('episodeCount') !== model.get('episodeFileCount'); }
- ]
- },
-
- sortMappings : {
- title : {
- sortKey : 'sortTitle'
- },
-
- nextAiring : {
- sortValue : function(model, attr, order) {
- var nextAiring = model.get(attr);
-
- if (nextAiring) {
- return moment(nextAiring).unix();
- }
-
- if (order === 1) {
- return 0;
- }
-
- return Number.MAX_VALUE;
- }
- },
-
- percentOfEpisodes : {
- sortValue : function(model, attr) {
- var percentOfEpisodes = model.get(attr);
- var episodeCount = model.get('episodeCount');
-
- return percentOfEpisodes + episodeCount / 1000000;
- }
- },
-
- path : {
- sortValue : function(model) {
- var path = model.get('path');
-
- return path.toLowerCase();
- }
- }
- }
-});
-
-Collection = AsFilteredCollection.call(Collection);
-Collection = AsSortedCollection.call(Collection);
-Collection = AsPersistedStateCollection.call(Collection);
-
-var data = ApiData.get('series');
-
-module.exports = new Collection(data, { full : true }).bindSignalR();
diff --git a/src/UI/Series/SeriesController.js b/src/UI/Series/SeriesController.js
deleted file mode 100644
index 183670626..000000000
--- a/src/UI/Series/SeriesController.js
+++ /dev/null
@@ -1,37 +0,0 @@
-var NzbDroneController = require('../Shared/NzbDroneController');
-var AppLayout = require('../AppLayout');
-var SeriesCollection = require('./SeriesCollection');
-var SeriesIndexLayout = require('./Index/SeriesIndexLayout');
-var SeriesDetailsLayout = require('./Details/SeriesDetailsLayout');
-
-module.exports = NzbDroneController.extend({
- _originalInit : NzbDroneController.prototype.initialize,
-
- initialize : function() {
- //this.route('', this.series);
- this.route('series', this.series);
- this.route('series/:query', this.seriesDetails);
-
- this._originalInit.apply(this, arguments);
- },
-
- series : function() {
- this.setTitle('Radarr');
- this.showMainRegion(new SeriesIndexLayout());
- },
-
- seriesDetails : function(query) {
- console.warn(AppLayout.mainRegion);
-
- var series = SeriesCollection.where({ titleSlug : query });
-
- if (series.length !== 0) {
- var targetSeries = series[0];
-
- this.setTitle(targetSeries.get('title'));
- this.showMainRegion(new SeriesDetailsLayout({ model : targetSeries }));
- } else {
- this.showNotFound();
- }
- }
-});
diff --git a/src/UI/Series/SeriesModel.js b/src/UI/Series/SeriesModel.js
deleted file mode 100644
index 9d154fa7d..000000000
--- a/src/UI/Series/SeriesModel.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var Backbone = require('backbone');
-var _ = require('underscore');
-
-module.exports = Backbone.Model.extend({
- urlRoot : window.NzbDrone.ApiRoot + '/series',
-
- defaults : {
- episodeFileCount : 0,
- episodeCount : 0,
- isExisting : false,
- status : 0
- },
-
- setSeasonMonitored : function(seasonNumber) {
- _.each(this.get('seasons'), function(season) {
- if (season.seasonNumber === seasonNumber) {
- season.monitored = !season.monitored;
- }
- });
- },
-
- setSeasonPass : function(seasonNumber) {
- _.each(this.get('seasons'), function(season) {
- if (season.seasonNumber >= seasonNumber) {
- season.monitored = true;
- } else {
- season.monitored = false;
- }
- });
- }
-});
\ No newline at end of file
diff --git a/src/UI/Series/series.less b/src/UI/Series/series.less
deleted file mode 100644
index e3c845598..000000000
--- a/src/UI/Series/series.less
+++ /dev/null
@@ -1,472 +0,0 @@
-@import "../Content/Bootstrap/variables";
-@import "../Shared/Styles/card.less";
-@import "../Shared/Styles/clickable.less";
-@import "../Content/prefixer";
-
-.series-poster {
- min-width: 56px;
- max-width: 100%;
-}
-
-.edit-series-modal, .delete-series-modal {
- overflow : visible;
-
- .series-poster {
- padding-left : 20px;
- width : 168px;
- }
-
- .form-horizontal {
- margin-top : 10px;
- }
-
- .twitter-typeahead {
- .form-control[disabled] {
- background-color: #ffffff;
- }
- }
-}
-
-.delete-series-modal {
- .path {
- margin-left : 30px;
- }
-
- .delete-files-info {
- margin: 10px 0;
- display: none;
- float:none;
- }
-}
-
-.series-item {
- padding-bottom : 30px;
-
- :hover {
- text-decoration : none;
- }
-
- h2 {
- margin-top : 0;
- }
-
- a {
- color : #000000;
- }
-}
-
-.series-page-header {
- .card(black);
- .opacity(0.9);
- background : #000000;
- color : #ffffff;
- padding : 30px 15px;
- margin : 50px 10px;
-
- .poster {
- margin-top : 4px;
- }
-
- .header-text {
- margin-top : 0;
- }
-}
-
-.series-season {
- .card;
- .opacity(0.9);
- margin : 30px 10px;
- padding : 10px 25px;
-
- .show-hide-episodes {
- .clickable();
- text-align : center;
-
- i {
- .clickable();
- }
- }
-}
-
-.series-posters {
- list-style-type: none;
-
- @media (max-width: @screen-xs-max) {
- padding : 0;
- }
-
- li {
- display : inline-block;
- vertical-align : top;
- }
-
- .series-posters-item {
-
- .card;
- .clickable;
- margin-bottom : 20px;
- height : 315px;
-
- .center {
- display : block;
- margin-left : auto;
- margin-right : auto;
- text-align : center;
-
- .progress {
- text-align : left;
- margin-top : 5px;
- left : 0;
- width : 170px;
-
- .progressbar-front-text, .progressbar-back-text {
- width : 170px;
- }
- }
- }
-
- .labels {
- display : inline-block;
- .opacity(0.75);
- width : 170px;
-
- :hover {
- cursor : default;
- }
-
- .label {
- margin-top : 3px;
- display : block;
- }
-
- .tooltip {
- .opacity(1);
- }
- }
-
- @media (max-width: @screen-xs-max) {
- height : 235px;
- margin : 5px;
- padding : 6px 5px;
-
- .center {
- .progress {
- width : 125px;
-
- .progressbar-front-text, .progressbar-back-text {
- width : 125px
- }
- }
- }
-
- .labels {
- width: 125px;
- }
- }
- }
-
- .series-poster-container {
- position : relative;
- overflow : hidden;
- display : inline-block;
-
- .placeholder-image ~ .title {
- opacity: 1.0;
- }
-
- .title {
- position : absolute;
- top : 25px;
- color : #f5f5f5;
- width : 100%;
- font-size : 22px;
- line-height: 24px;
- opacity : 0.0;
- font-weight: 100;
- }
-
- .ended-banner {
- color : #eeeeee;
- background-color : #b94a48;
- .box-shadow(2px 2px 20px #888888);
- -moz-transform-origin : 50% 50%;
- -webkit-transform-origin : 50% 50%;
- position : absolute;
- width : 320px;
- top : 200px;
- left : -122px;
- text-align : center;
- .opacity(0.9);
-
- .transform(rotate(45deg));
- }
-
- .series-controls {
- position : absolute;;
- top : 0;
- overflow : hidden;
- background-color : #eeeeee;
- width : 100%;
- text-align : right;
- padding-right : 10px;
- display : none;
- .opacity(0.8);
-
- i {
- .clickable();
- }
- }
-
- .hidden-title {
- position : absolute;;
- bottom : 0;
- overflow : hidden;
- background-color : #eeeeee;
- width : 100%;
- text-align : center;
- .opacity(0.8);
- display : none;
- }
-
- .series-poster {
- width : 168px;
- height : 247px;
- display : block;
- font-size : 34px;
- line-height : 34px;
- }
-
- @media (max-width: @screen-xs-max) {
- .series-poster {
- width : 120px;
- height : 176px;
- }
-
- .ended-banner {
- top : 145px;
- left : -137px;
- }
- }
- }
-}
-
-.series-detail-overview {
- margin-bottom : 50px;
-}
-
-.series-season {
-
- .episode-number-cell {
- width : 40px;
- white-space: nowrap;
- }
- .episode-air-date-cell {
- width : 150px;
- }
-
- .episode-status-cell {
- width : 100px;
- }
-
- .episode-title-cell {
- cursor : pointer;
- }
-}
-
-.episode-detail-modal {
-
- .episode-info {
- margin-bottom : 10px;
- }
-
- .episode-overview {
- font-style : italic;
- }
-
- .episode-file-info {
- margin-top : 30px;
- font-size : 12px;
- }
-
- .episode-history-details-cell .popover {
- max-width: 800px;
- }
-
- .hidden-series-title {
- display : none;
- }
-}
-
-.season-grid {
- .toggle-cell {
- width : 28px;
- text-align : center;
- padding-left : 0;
- padding-right : 0;
- }
-
- .toggle-cell {
- i {
- .clickable;
- }
- }
-}
-
-.season-actions {
- width: 100px;
-}
-
-.season-actions, .series-actions {
-
- div {
- display : inline-block
- }
-
- text-transform : none;
-
- i {
- .clickable();
- font-size : 24px;
- margin-left : 5px;
- }
-}
-
-.series-stats {
- font-size : 11px;
-}
-
-.series-legend {
- padding-top : 5px;
-}
-
-.seasonpass-series {
- .card;
- margin : 20px 0;
-
- .title {
- font-weight : 300;
- font-size : 24px;
- line-height : 30px;
- margin-left : 5px;
- }
-
- .season-select {
- margin-bottom : 0;
- }
-
- .expander {
- .clickable;
- line-height : 30px;
- margin-left : 8px;
- width : 16px;
- }
-
- .season-grid {
- margin-top : 10px;
- }
-
- .season-pass-button {
- display : inline-block;
- }
-
- .series-monitor-toggle {
- font-size : 24px;
- margin-top : 3px;
- }
-
- .help-inline {
- margin-top : 7px;
- display : inline-block;
- }
-}
-
-.season-status {
- font-size : 11px;
- vertical-align : middle !important;
-}
-
-//Overview List
-.series-overview-list-actions {
- min-width: 56px;
- max-width: 56px;
-
- i {
- .clickable();
- }
-}
-
-//Editor
-
-.series-editor-footer {
- max-width: 1160px;
- color: #f5f5f5;
- margin-left: auto;
- margin-right: auto;
-
- .form-group {
- padding-top: 0;
- }
-}
-
-.update-files-series-modal {
- .selected-series {
- margin-top: 15px;
- }
-}
-
-//Series Details
-
-.series-not-monitored {
- .season-monitored, .episode-monitored {
- color: #888888;
- cursor: not-allowed;
-
- i {
- cursor: not-allowed;
- }
- }
-}
-
-.series-info {
- .row {
- margin-bottom : 3px;
-
- .label {
- display : inline-block;
- margin-bottom : 2px;
- padding : 4px 6px 3px 6px;
- max-width : 100%;
- white-space : normal;
- word-wrap : break-word;
- }
- }
-
- .series-info-links {
- @media (max-width: @screen-sm-max) {
- display : inline-block;
- margin-top : 5px;
- }
- }
-}
-
-.scene-info {
- .key, .value {
- display : inline-block;
- }
-
- .key {
- width : 80px;
- margin-left : 10px;
- vertical-align : top;
- }
-
- .value {
- margin-right : 10px;
- max-width : 170px;
- }
-
- ul {
- padding-left : 0;
- list-style-type : none;
- }
-}
diff --git a/src/UI/Shared/Modal/ModalController.js b/src/UI/Shared/Modal/ModalController.js
index f2d0c34c1..b72c8412b 100644
--- a/src/UI/Shared/Modal/ModalController.js
+++ b/src/UI/Shared/Modal/ModalController.js
@@ -1,10 +1,8 @@
var vent = require('vent');
var AppLayout = require('../../AppLayout');
var Marionette = require('marionette');
-var EditSeriesView = require('../../Series/Edit/EditSeriesView');
var EditMovieView = require('../../Movies/Edit/EditMovieView');
var DeleteMovieView = require('../../Movies/Delete/DeleteMovieView');
-var EpisodeDetailsLayout = require('../../Episode/EpisodeDetailsLayout');
var HistoryDetailsLayout = require('../../Activity/History/Details/HistoryDetailsLayout');
var LogDetailsView = require('../../System/Logs/Table/Details/LogDetailsView');
var RenamePreviewLayout = require('../../Rename/RenamePreviewLayout');
@@ -19,11 +17,9 @@ module.exports = Marionette.AppRouter.extend({
vent.on(vent.Commands.CloseModalCommand, this._closeModal, this);
vent.on(vent.Commands.OpenModal2Command, this._openModal2, this);
vent.on(vent.Commands.CloseModal2Command, this._closeModal2, this);
- vent.on(vent.Commands.EditSeriesCommand, this._editSeries, this);
vent.on(vent.Commands.EditMovieCommand, this._editMovie, this);
vent.on(vent.Commands.EditFileCommand, this._editFile, this);
vent.on(vent.Commands.DeleteMovieCommand, this._deleteMovie, this);
- vent.on(vent.Commands.ShowEpisodeDetails, this._showEpisode, this);
vent.on(vent.Commands.ShowMovieDetails, this._showMovie, this);
vent.on(vent.Commands.ShowHistoryDetails, this._showHistory, this);
vent.on(vent.Commands.ShowLogDetails, this._showLogDetails, this);
@@ -49,11 +45,6 @@ module.exports = Marionette.AppRouter.extend({
AppLayout.modalRegion2.closeModal();
},
- _editSeries : function(options) {
- var view = new EditSeriesView({ model : options.series });
- AppLayout.modalRegion.show(view);
- },
-
_editMovie : function(options) {
var view = new EditMovieView({ model : options.movie });
AppLayout.modalRegion.show(view);
@@ -69,15 +60,6 @@ module.exports = Marionette.AppRouter.extend({
AppLayout.modalRegion.show(view);
},
- _showEpisode : function(options) {
- var view = new EpisodeDetailsLayout({
- model : options.episode,
- hideSeriesLink : options.hideSeriesLink,
- openingTab : options.openingTab
- });
- AppLayout.modalRegion.show(view);
- },
-
_showMovie : function(options) {
var view = new MoviesDetailsLayout({
model : options.movie,
diff --git a/src/UI/index.html b/src/UI/index.html
index 16f4b2c3b..be5e66f7e 100644
--- a/src/UI/index.html
+++ b/src/UI/index.html
@@ -17,12 +17,10 @@
-
-
diff --git a/src/UI/main.js b/src/UI/main.js
index f9ee67993..88fa53c1b 100644
--- a/src/UI/main.js
+++ b/src/UI/main.js
@@ -6,7 +6,6 @@ var SignalRBroadcaster = require('./Shared/SignalRBroadcaster');
var NavbarLayout = require('./Navbar/NavbarLayout');
var AppLayout = require('./AppLayout');
var MoviesController = require('./Movies/MoviesController');
-var SeriesController = require('./Series/SeriesController');
var Router = require('./Router');
var ModalController = require('./Shared/Modal/ModalController');
var ControlPanelController = require('./Shared/ControlPanel/ControlPanelController');
@@ -22,7 +21,6 @@ require('./Shared/piwikCheck');
require('./Shared/VersionChangeMonitor');
new MoviesController();
-new SeriesController();
new ModalController();
new ControlPanelController();
new Router();
diff --git a/src/UI/vent.js b/src/UI/vent.js
index 8ef57ee8a..50dbfb4f8 100644
--- a/src/UI/vent.js
+++ b/src/UI/vent.js
@@ -11,16 +11,13 @@ vent.Events = {
};
vent.Commands = {
- EditSeriesCommand : 'EditSeriesCommand',
EditMovieCommand : 'EditMovieCommand',
EditFileCommand : "EditFileCommand",
- DeleteSeriesCommand : 'DeleteSeriesCommand',
DeleteMovieCommand : 'DeleteMovieCommand',
OpenModalCommand : 'OpenModalCommand',
CloseModalCommand : 'CloseModalCommand',
OpenModal2Command : 'OpenModal2Command',
CloseModal2Command : 'CloseModal2Command',
- ShowEpisodeDetails : 'ShowEpisodeDetails',
ShowMovieDetails : 'ShowMovieDetails',
ShowHistoryDetails : 'ShowHistoryDetails',
ShowLogDetails : 'ShowLogDetails',