add series works again, now includes title.
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
<div class="line row folder-match-result-view">
|
||||
<a href="http://thetvdb.com/?tab=series&id={{id}}" target="_blank" class="icon-info-sign"></a>
|
||||
<span>{{seriesName}} {{seriesYear}}</span>
|
||||
<span class="icon-plus pull-right btn btn-success x-btn-add"></span>
|
||||
|
||||
<div class="span6">
|
||||
{{title}} {{seriesYear}}
|
||||
</div>
|
||||
<div class="btn btn-success x-btn-add">
|
||||
<icon class="icon-plus "></icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,13 +15,13 @@ define([
|
||||
|
||||
var self = this;
|
||||
|
||||
var seriesId = this.model.get('id');
|
||||
var title = this.model.get('seriesName');
|
||||
var seriesId = this.model.get('tvDbId');
|
||||
var title = this.model.get('title');
|
||||
var quality = this.options.qualityProfile.val();
|
||||
var path = this.options.folder.path;
|
||||
|
||||
var model = new NzbDrone.Series.SeriesModel({
|
||||
seriesId:seriesId,
|
||||
tvDbId: seriesId,
|
||||
title:title,
|
||||
qualityProfileId:quality,
|
||||
path:path
|
||||
@@ -34,6 +34,7 @@ define([
|
||||
model.save(undefined, {
|
||||
success:function () {
|
||||
var notificationModel = new NzbDrone.Shared.NotificationModel({
|
||||
tvDbId: seriesId,
|
||||
title:'Added',
|
||||
message:title,
|
||||
level:'success'
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<icon class="icon-search "></icon>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="x-folder-name-match-results span11" />
|
||||
<div class="x-folder-name-match-results folder-name-matches span11" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a href="http://thetvdb.com/?tab=series&id={{id}}" target="_blank" class="icon-info-sign pull-left"></a>
|
||||
<a class="accordion-toggle" data-toggle="collapse" href="#{{id}}">{{seriesName}} {{seriesYear}}</a>
|
||||
<a href="http://thetvdb.com/?tab=series&id={{tvDbId}}" target="_blank" class="icon-info-sign pull-left"></a>
|
||||
<a class="accordion-toggle" data-toggle="collapse" href="#{{tvDbId}}">{{title}} {{seriesYear}}</a>
|
||||
</div>
|
||||
<div id="{{id}}" class="accordion-body collapse">
|
||||
<div id="{{tvDbId}}" class="accordion-body collapse">
|
||||
<div class="accordion-inner">
|
||||
<select class="span7 x-root-folder">
|
||||
{{#each rootFolders.models}}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
define(['app','Shared/NotificationCollection', 'AddSeries/SearchResultCollection', 'AddSeries/SearchResultModel', 'Series/SeriesCollection'], function (app,notificationCollection) {
|
||||
|
||||
define(['app', 'Shared/NotificationCollection', 'AddSeries/SearchResultCollection', 'AddSeries/SearchResultModel', 'Series/SeriesCollection'], function (app, notificationCollection) {
|
||||
|
||||
NzbDrone.AddSeries.New.SearchItemView = Backbone.Marionette.ItemView.extend({
|
||||
|
||||
template: "AddSeries/New/SearchResultTemplate",
|
||||
@@ -23,8 +23,8 @@ define(['app','Shared/NotificationCollection', 'AddSeries/SearchResultCollection
|
||||
|
||||
add: function () {
|
||||
|
||||
var seriesId = this.model.get('id');
|
||||
var title = this.model.get('seriesName');
|
||||
var seriesId = this.model.get('tvDbId');
|
||||
var title = this.model.get('title');
|
||||
var quality = this.ui.qualityProfile.val();
|
||||
var rootFolderId = this.ui.rootFolder.val();
|
||||
|
||||
@@ -33,7 +33,7 @@ define(['app','Shared/NotificationCollection', 'AddSeries/SearchResultCollection
|
||||
var path = rootPath + "\\" + title;
|
||||
|
||||
var model = new NzbDrone.Series.SeriesModel({
|
||||
seriesId: seriesId,
|
||||
tvdbId: seriesId,
|
||||
title: title,
|
||||
qualityProfileId: quality,
|
||||
path: path
|
||||
@@ -41,7 +41,7 @@ define(['app','Shared/NotificationCollection', 'AddSeries/SearchResultCollection
|
||||
|
||||
var self = this;
|
||||
|
||||
var seriesCollection = new NzbDrone.Series.SeriesCollection();
|
||||
var seriesCollection = new NzbDrone.Series.SeriesCollection();
|
||||
seriesCollection.push(model);
|
||||
|
||||
model.save(undefined, {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var date = Date.utc.create(this.get('firstAired')).format('({yyyy})');
|
||||
|
||||
//don't append year, if the series name already has the name appended.
|
||||
if (this.get('seriesName').endsWith(date)) {
|
||||
if (this.get('title').endsWith(date)) {
|
||||
return "";
|
||||
} else {
|
||||
return date;
|
||||
|
||||
Reference in New Issue
Block a user