New: Add Option to localize metadata written in .nfo if available (#5060)

* Add Option to localize metadata written in .nfo if available

* Fix Pull Request comments
This commit is contained in:
Daniel Martin Gonzalez
2020-10-17 07:03:46 +02:00
committed by GitHub
parent 1ebb71db59
commit 82eadcffaa
3 changed files with 40 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Core.Annotations;
namespace NzbDrone.Core.Languages
{
public class RealLanguageFieldConverter : ISelectOptionsConverter
{
public List<SelectOption> GetSelectOptions()
{
return Language.All
.Where(l => l != Language.Unknown && l != Language.Any)
.ToList()
.ConvertAll(v => new SelectOption { Value = v.Id, Name = v.Name });
}
}
}