mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
Fixed automatic search failing because series wasn't part of episode
This commit is contained in:
parent
eb6d6e74b0
commit
c9a0aebbfb
@ -6,11 +6,12 @@ define(
|
|||||||
'Episode/Search/ButtonsView',
|
'Episode/Search/ButtonsView',
|
||||||
'Episode/Search/ManualLayout',
|
'Episode/Search/ManualLayout',
|
||||||
'Release/Collection',
|
'Release/Collection',
|
||||||
|
'Series/SeriesCollection',
|
||||||
'Shared/LoadingView',
|
'Shared/LoadingView',
|
||||||
'Shared/Messenger',
|
'Shared/Messenger',
|
||||||
'Commands/CommandController',
|
'Commands/CommandController',
|
||||||
'Shared/FormatHelpers'
|
'Shared/FormatHelpers'
|
||||||
], function (App, Marionette, ButtonsView, ManualSearchLayout, ReleaseCollection, LoadingView, Messenger, CommandController, FormatHelpers) {
|
], function (App, Marionette, ButtonsView, ManualSearchLayout, ReleaseCollection, SeriesCollection, LoadingView, Messenger, CommandController, FormatHelpers) {
|
||||||
|
|
||||||
return Marionette.Layout.extend({
|
return Marionette.Layout.extend({
|
||||||
template: 'Episode/Search/LayoutTemplate',
|
template: 'Episode/Search/LayoutTemplate',
|
||||||
@ -40,7 +41,8 @@ define(
|
|||||||
|
|
||||||
CommandController.Execute('episodeSearch', { episodeId: this.model.get('id') });
|
CommandController.Execute('episodeSearch', { episodeId: this.model.get('id') });
|
||||||
|
|
||||||
var seriesTitle = this.model.get('series').get('title');
|
var series = SeriesCollection.get(this.model.get('seriesId'));
|
||||||
|
var seriesTitle = series.get('title');
|
||||||
var season = this.model.get('seasonNumber');
|
var season = this.model.get('seasonNumber');
|
||||||
var episode = this.model.get('episodeNumber');
|
var episode = this.model.get('episodeNumber');
|
||||||
var message = seriesTitle + ' - ' + season + 'x' + FormatHelpers.pad(episode, 2);
|
var message = seriesTitle + ' - ' + season + 'x' + FormatHelpers.pad(episode, 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user