mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +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 FluentValidation;
|
||||
using FluentValidation.Results;
|
||||
@ -56,6 +57,12 @@ private NamingConfigResource GetNamingConfig()
|
||||
{
|
||||
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 @@ public BasicNamingConfig GetBasicNamingConfig(NamingConfig nameSpec)
|
||||
{
|
||||
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