mirror of https://github.com/lidarr/Lidarr
Use scene name for download client queue
#ND-136 fixed New: Option to Scene name when adding NZBs to download client queue
This commit is contained in:
parent
e2cc4ef4ea
commit
0b9a4e1a46
|
@ -534,6 +534,13 @@ namespace NzbDrone.Core.Providers.Core
|
|||
set { SetValue("IgnoreArticlesWhenSortingSeries", value); }
|
||||
}
|
||||
|
||||
public virtual Boolean DownloadClientUseSceneName
|
||||
{
|
||||
get { return GetValueBoolean("DownloadClientUseSceneName", false); }
|
||||
|
||||
set { SetValue("DownloadClientUseSceneName", value); }
|
||||
}
|
||||
|
||||
private string GetValue(string key)
|
||||
{
|
||||
return GetValue(key, String.Empty);
|
||||
|
|
|
@ -97,6 +97,12 @@ namespace NzbDrone.Core.Providers
|
|||
|
||||
public virtual String GetDownloadTitle(EpisodeParseResult parseResult)
|
||||
{
|
||||
if(_configProvider.DownloadClientUseSceneName)
|
||||
{
|
||||
logger.Trace("Using scene name: {0}", parseResult.OriginalString);
|
||||
return parseResult.OriginalString;
|
||||
}
|
||||
|
||||
var seriesTitle = MediaFileProvider.CleanFilename(parseResult.Series.Title);
|
||||
|
||||
//Handle Full Naming
|
||||
|
|
|
@ -144,7 +144,8 @@ namespace NzbDrone.Web.Controllers
|
|||
DownloadClient = (int)_configProvider.DownloadClient,
|
||||
BlackholeDirectory = _configProvider.BlackholeDirectory,
|
||||
DownloadClientSelectList = new SelectList(downloadClientTypes, "Key", "Value"),
|
||||
PneumaticDirectory = _configProvider.PneumaticDirectory
|
||||
PneumaticDirectory = _configProvider.PneumaticDirectory,
|
||||
UseSceneName = _configProvider.DownloadClientUseSceneName
|
||||
};
|
||||
|
||||
return View(model);
|
||||
|
@ -458,6 +459,7 @@ namespace NzbDrone.Web.Controllers
|
|||
_configProvider.BlackholeDirectory = data.BlackholeDirectory;
|
||||
_configProvider.DownloadClient = (DownloadClientType)data.DownloadClient;
|
||||
_configProvider.PneumaticDirectory = data.PneumaticDirectory;
|
||||
_configProvider.DownloadClientUseSceneName = data.UseSceneName;
|
||||
|
||||
return GetSuccessResult();
|
||||
}
|
||||
|
|
|
@ -81,6 +81,10 @@ namespace NzbDrone.Web.Models
|
|||
[RequiredIf("DownloadClient", (int)DownloadClientType.Pneumatic, ErrorMessage = "Required when Download Client is Blackhole")]
|
||||
public string PneumaticDirectory { get; set; }
|
||||
|
||||
[DisplayName("Use Scene Name")]
|
||||
[Description("Use Scene name when adding NZB to queue?")]
|
||||
public Boolean UseSceneName { get; set; }
|
||||
|
||||
public SelectList SabTvCategorySelectList { get; set; }
|
||||
public SelectList DownloadClientSelectList { get; set; }
|
||||
}
|
||||
|
|
|
@ -37,11 +37,17 @@
|
|||
<span class="small">@Html.DescriptionFor(m => m.DownloadClient)</span>
|
||||
</label>
|
||||
@Html.DropDownListFor(m => m.DownloadClient, Model.DownloadClientSelectList, new { @class = "inputClass selectClass" })
|
||||
|
||||
<label class="labelClass">@Html.LabelFor(m => m.DownloadClientDropDirectory)
|
||||
<span class="small">@Html.DescriptionFor(m => m.DownloadClientDropDirectory)</span>
|
||||
<span class="small">@Html.ValidationMessageFor(m => m.DownloadClientDropDirectory)</span>
|
||||
</label>
|
||||
@Html.TextBoxFor(m => m.DownloadClientDropDirectory, new { @class = "inputClass folderLookup" })
|
||||
|
||||
<label class="labelClass">@Html.LabelFor(m => m.UseSceneName)
|
||||
<span class="small">@Html.DescriptionFor(m => m.UseSceneName)</span>
|
||||
</label>
|
||||
@Html.CheckBoxFor(m => m.UseSceneName, new { @class = "inputClass checkClass" })
|
||||
</div>
|
||||
|
||||
<div class="jquery-accordion" id="downloadClientAccordion">
|
||||
|
|
Loading…
Reference in New Issue