1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-11 12:02:35 +02:00

Pneumatic added to client side

New: Pneumatic added as a download client
This commit is contained in:
Mark McDowall 2012-08-29 19:33:57 -07:00
parent 8854269a43
commit 4052db7502
9 changed files with 36 additions and 6 deletions

View File

@ -0,0 +1 @@
plugin://plugin.program.pneumatic/?mode=strm&type=add_file&nzb=C:\Test\Pneumatic\30 Rock - 6x18 - Murphy Brown Lied to Us [SDTV].nzb&nzbname=30 Rock - 6x18 - Murphy Brown Lied to Us [SDTV]

View File

@ -0,0 +1 @@
plugin://plugin.program.pneumatic/?mode=strm&type=add_file&nzb=C:\Test\Pneumatic\30 Rock - 6x19 - Live from Studio 6H (East Coast) [SDTV] [Proper].nzb&nzbname=30 Rock - 6x19 - Live from Studio 6H (East Coast) [SDTV] [Proper]

View File

@ -0,0 +1 @@
plugin://plugin.program.pneumatic/?mode=strm&type=add_file&nzb=C:\Test\Pneumatic\30 Rock - 6x21 - The Return of Avery Jessup [SDTV].nzb&nzbname=30 Rock - 6x21 - The Return of Avery Jessup [SDTV]

View File

@ -60,7 +60,7 @@ public virtual bool DownloadNzb(string url, string title)
logger.Trace("NZB Download succeeded, saved to: {0}", filename);
var contents = String.Format("plugin://plugin.program.pneumatic/?mode=strm&type=add_file&nzb={0}&nzbname={1}", filename, title);
_diskProvider.WriteAllText(title + ".strm", contents);
_diskProvider.WriteAllText(Path.Combine(_configProvider.SabDropDirectory, title + ".strm"), contents);
return true;
}

View File

@ -111,7 +111,8 @@ public ActionResult DownloadClient()
SabTvCategorySelectList = tvCategorySelectList,
DownloadClient = (int)_configProvider.DownloadClient,
BlackholeDirectory = _configProvider.BlackholeDirectory,
DownloadClientSelectList = new SelectList(downloadClientTypes, "Key", "Value")
DownloadClientSelectList = new SelectList(downloadClientTypes, "Key", "Value"),
PneumaticDirectory = _configProvider.PneumaticDirectory
};
return View(model);
@ -430,6 +431,7 @@ public JsonResult SaveDownloadClient(DownloadClientSettingsModel data)
_configProvider.SabDropDirectory = data.DownloadClientDropDirectory;
_configProvider.BlackholeDirectory = data.BlackholeDirectory;
_configProvider.DownloadClient = (DownloadClientType)data.DownloadClient;
_configProvider.PneumaticDirectory = data.PneumaticDirectory;
return GetSuccessResult();
}

View File

@ -70,6 +70,12 @@ public class DownloadClientSettingsModel
[Description("What method do you download NZBs with?")]
public int DownloadClient { get; set; }
[DisplayName("Pneumatic Nzb Directory")]
[Description("Directory to save NZBs for Pneumatic, must be able from XBMC")]
[DisplayFormat(ConvertEmptyStringToNull = false)]
[RequiredIf("DownloadClient", (int)DownloadClientType.Pneumatic, ErrorMessage = "Required when Download Client is Blackhole")]
public string PneumaticDirectory { get; set; }
public SelectList SabTvCategorySelectList { get; set; }
public SelectList DownloadClientSelectList { get; set; }
}

View File

@ -554,6 +554,9 @@
<ItemGroup>
<Content Include="Views\Shared\_MINIPROFILER UPDATED Layout.cshtml" />
</ItemGroup>
<ItemGroup>
<Content Include="Views\Settings\Pneumatic.cshtml" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>

View File

@ -41,12 +41,14 @@
</div>
<div class="jquery-accordion" id="downloadClientAccordion">
<h3>
<a href="#">Sabnzbd</a></h3>
<h3><a href="#">Sabnzbd</a></h3>
@{Html.RenderPartial("Sabnzbd", Model);}
<h3>
<a href="#">Blackhole</a></h3>
<h3><a href="#">Blackhole</a></h3>
@{Html.RenderPartial("Blackhole", Model);}
<h3><a href="#">Pneumatic</a></h3>
@{Html.RenderPartial("Pneumatic", Model);}
</div>
<button type="submit" class="save_button" disabled="disabled">

View File

@ -0,0 +1,14 @@
@using NzbDrone.Web.Helpers;
@model NzbDrone.Web.Models.DownloadClientSettingsModel
@{
Layout = null;
}
<div class="downloadClient">
<label class="labelClass">@Html.LabelFor(m => m.PneumaticDirectory)
<span class="small">@Html.DescriptionFor(m => m.PneumaticDirectory)</span>
<span class="small">@Html.ValidationMessageFor(m => m.PneumaticDirectory)</span>
</label>
@Html.TextBoxFor(m => m.PneumaticDirectory, new { @class = "inputClass folderLookup" })
</div>