mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-04 06:38:28 +02: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 System.Linq;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using FluentValidation.Results;
|
using FluentValidation.Results;
|
||||||
@ -56,6 +57,12 @@ private NamingConfigResource GetNamingConfig()
|
|||||||
{
|
{
|
||||||
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 @@ public BasicNamingConfig GetBasicNamingConfig(NamingConfig nameSpec)
|
|||||||
{
|
{
|
||||||
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 New Issue
Block a user