Add radarr and sonarr categories to make the new version of radarr work.

This commit is contained in:
Roger Far 2021-01-13 11:46:57 -07:00
parent 337ecdecd8
commit 64d1250345
2 changed files with 27 additions and 0 deletions

2
docker-publish.bat Normal file
View file

@ -0,0 +1,2 @@
docker build --tag rogerfar/rdtclient .
docker push rogerfar/rdtclient

View file

@ -307,6 +307,31 @@ namespace RdtClient.Web.Controllers
public async Task<ActionResult<IDictionary<String, TorrentCategory>>> TorrentsCategories()
{
var categories = await _qBittorrent.TorrentsCategories();
var savePath = await _qBittorrent.AppDefaultSavePath();
if (!categories.ContainsKey("radarr"))
{
var radarrPath = Path.Combine(savePath, "radarr");
categories.Add("radarr", new TorrentCategory
{
Name = "radarr",
SavePath = radarrPath
});
}
if (!categories.ContainsKey("sonarr"))
{
var sonarrPath = Path.Combine(savePath, "sonarr");
categories.Add("sonarr", new TorrentCategory
{
Name = "sonarr",
SavePath = sonarrPath
});
}
return Ok(categories);
}