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