mirror of
https://github.com/Sonarr/Sonarr
synced 2025-01-02 21:24:56 +00:00
Fixed the broken tests
This commit is contained in:
parent
5659a3c496
commit
c90d010cd8
4 changed files with 16 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using FluentValidation.Results;
|
using FluentValidation.Results;
|
||||||
|
@ -56,6 +57,12 @@ namespace NzbDrone.Api.Config
|
||||||
{
|
{
|
||||||
var nameSpec = _namingConfigService.GetConfig();
|
var nameSpec = _namingConfigService.GetConfig();
|
||||||
var resource = nameSpec.InjectTo<NamingConfigResource>();
|
var resource = nameSpec.InjectTo<NamingConfigResource>();
|
||||||
|
|
||||||
|
if (String.IsNullOrWhiteSpace(resource.StandardEpisodeFormat))
|
||||||
|
{
|
||||||
|
return resource;
|
||||||
|
}
|
||||||
|
|
||||||
var basicConfig = _filenameBuilder.GetBasicNamingConfig(nameSpec);
|
var basicConfig = _filenameBuilder.GetBasicNamingConfig(nameSpec);
|
||||||
resource.InjectFrom(basicConfig);
|
resource.InjectFrom(basicConfig);
|
||||||
|
|
||||||
|
|
|
@ -181,6 +181,11 @@ namespace NzbDrone.Core.Organizer
|
||||||
{
|
{
|
||||||
var episodeFormat = GetEpisodeFormat(nameSpec.StandardEpisodeFormat);
|
var episodeFormat = GetEpisodeFormat(nameSpec.StandardEpisodeFormat);
|
||||||
|
|
||||||
|
if (episodeFormat == null)
|
||||||
|
{
|
||||||
|
return new BasicNamingConfig();
|
||||||
|
}
|
||||||
|
|
||||||
var basicNamingConfig = new BasicNamingConfig
|
var basicNamingConfig = new BasicNamingConfig
|
||||||
{
|
{
|
||||||
Separator = episodeFormat.Separator,
|
Separator = episodeFormat.Separator,
|
||||||
|
|
|
@ -5,9 +5,8 @@ define(
|
||||||
'vent',
|
'vent',
|
||||||
'marionette',
|
'marionette',
|
||||||
'Settings/MediaManagement/Naming/NamingSampleModel',
|
'Settings/MediaManagement/Naming/NamingSampleModel',
|
||||||
'Settings/MediaManagement/Naming/Wizard/NamingWizardModel',
|
|
||||||
'Mixins/AsModelBoundView'
|
'Mixins/AsModelBoundView'
|
||||||
], function (_, vent, Marionette, NamingSampleModel, NamingWizardModel, AsModelBoundView) {
|
], function (_, vent, Marionette, NamingSampleModel, AsModelBoundView) {
|
||||||
|
|
||||||
var view = Marionette.ItemView.extend({
|
var view = Marionette.ItemView.extend({
|
||||||
template: 'Settings/MediaManagement/Naming/Basic/BasicNamingViewTemplate',
|
template: 'Settings/MediaManagement/Naming/Basic/BasicNamingViewTemplate',
|
||||||
|
|
|
@ -37,8 +37,8 @@ define(
|
||||||
this.ui.namingOptions.hide();
|
this.ui.namingOptions.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.basicNamingView = new BasicNamingView({ model: this.model });
|
var basicNamingView = new BasicNamingView({ model: this.model });
|
||||||
this.basicNamingRegion.show(this.basicNamingView);
|
this.basicNamingRegion.show(basicNamingView);
|
||||||
this.namingSampleModel = new NamingSampleModel();
|
this.namingSampleModel = new NamingSampleModel();
|
||||||
|
|
||||||
this.listenTo(this.model, 'change', this._updateSamples);
|
this.listenTo(this.model, 'change', this._updateSamples);
|
||||||
|
|
Loading…
Reference in a new issue