Add logging.
This commit is contained in:
parent
d0f7c9fb37
commit
1817bd7508
6 changed files with 27 additions and 12 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
|
@ -4,16 +4,21 @@ All notable changes to this project will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [2.0.53] - 2024-01-15
|
## [2.0.54] - 2024-01-07
|
||||||
|
### Changed
|
||||||
|
- Added some logging for the symlink downloader to troubleshoot.
|
||||||
|
- Added some logging when deleting torrents and the symlinker overrides the finish action.
|
||||||
|
|
||||||
|
## [2.0.53] - 2024-01-05
|
||||||
### Added
|
### Added
|
||||||
- Add setting to set the download path on the aria2 instance.
|
- Add setting to set the download path on the aria2 instance.
|
||||||
|
|
||||||
## [2.0.52] - 2024-01-15
|
## [2.0.52] - 2024-01-05
|
||||||
### Added
|
### Added
|
||||||
- Add BASE_PATH environment variable for the base path setting.
|
- Add BASE_PATH environment variable for the base path setting.
|
||||||
- Expose the Post Torrent Download Action setting on the Provider settings.
|
- Expose the Post Torrent Download Action setting on the Provider settings.
|
||||||
|
|
||||||
## [2.0.51] - 2024-01-15
|
## [2.0.51] - 2024-01-05
|
||||||
### Added
|
### Added
|
||||||
- Added setting to store magnets and torrents to a directory after adding.
|
- Added setting to store magnets and torrents to a directory after adding.
|
||||||
- Added bulk settings change on the index pages.
|
- Added bulk settings change on the index pages.
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
<a class="navbar-item" routerLink="profile"> Profile </a>
|
<a class="navbar-item" routerLink="profile"> Profile </a>
|
||||||
<a class="navbar-item" (click)="logout()"> Logout </a>
|
<a class="navbar-item" (click)="logout()"> Logout </a>
|
||||||
<hr class="navbar-divider" />
|
<hr class="navbar-divider" />
|
||||||
<a href="https://github.com/rogerfar/rdt-client" target="_blank" class="navbar-item">Version 2.0.53</a>
|
<a href="https://github.com/rogerfar/rdt-client" target="_blank" class="navbar-item">Version 2.0.54</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "rdt-client",
|
"name": "rdt-client",
|
||||||
"version": "2.0.53",
|
"version": "2.0.54",
|
||||||
"description": "This is a web interface to manage your torrents on Real-Debrid.",
|
"description": "This is a web interface to manage your torrents on Real-Debrid.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ public class SymlinkDownloader : IDownloader
|
||||||
|
|
||||||
public Task<String?> Download()
|
public Task<String?> Download()
|
||||||
{
|
{
|
||||||
_logger.Debug($"Starting download of {_uri}, writing to path: {_filePath}");
|
_logger.Debug($"Starting symlink resolving of {_uri}, writing to path: {_filePath}");
|
||||||
|
|
||||||
var fileName = Path.GetFileName(_filePath);
|
var fileName = Path.GetFileName(_filePath);
|
||||||
|
|
||||||
|
|
@ -56,10 +56,13 @@ public class SymlinkDownloader : IDownloader
|
||||||
{
|
{
|
||||||
DownloadComplete?.Invoke(this, new DownloadCompleteEventArgs());
|
DownloadComplete?.Invoke(this, new DownloadCompleteEventArgs());
|
||||||
|
|
||||||
|
_logger.Information($"File {fileName} found on {Settings.Get.DownloadClient.RcloneMountPath} at {actualFilePath}");
|
||||||
return Task.FromResult<String?>(actualFilePath);
|
return Task.FromResult<String?>(actualFilePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_logger.Information($"File {fileName} not found on {Settings.Get.DownloadClient.RcloneMountPath}!");
|
||||||
|
|
||||||
// Return null and try again next cycle.
|
// Return null and try again next cycle.
|
||||||
return Task.FromResult<String?>(null);
|
return Task.FromResult<String?>(null);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -541,12 +541,19 @@ public class TorrentRunner
|
||||||
|
|
||||||
if (torrent.DownloadClient == Data.Enums.DownloadClient.Symlink)
|
if (torrent.DownloadClient == Data.Enums.DownloadClient.Symlink)
|
||||||
{
|
{
|
||||||
torrent.FinishedAction = torrent.FinishedAction switch
|
switch (torrent.FinishedAction)
|
||||||
{
|
{
|
||||||
TorrentFinishedAction.RemoveAllTorrents => TorrentFinishedAction.RemoveClient,
|
case TorrentFinishedAction.RemoveAllTorrents:
|
||||||
TorrentFinishedAction.RemoveRealDebrid => TorrentFinishedAction.None,
|
Log($"Force setting FinishedAction to RemoveClient as download client is Symlink and FinishedAction is RemoveAllTorrents", torrent);
|
||||||
_ => torrent.FinishedAction
|
torrent.FinishedAction = TorrentFinishedAction.RemoveClient;
|
||||||
};
|
|
||||||
|
break;
|
||||||
|
case TorrentFinishedAction.RemoveRealDebrid:
|
||||||
|
Log($"Force setting FinishedAction to TorrentFinishedAction.None as download client is Symlink and FinishedAction is RemoveRealDebrid", torrent);
|
||||||
|
torrent.FinishedAction = TorrentFinishedAction.None;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (torrent.FinishedAction)
|
switch (torrent.FinishedAction)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<UserSecretsId>94c24cba-f03f-4453-a671-3640b517c573</UserSecretsId>
|
<UserSecretsId>94c24cba-f03f-4453-a671-3640b517c573</UserSecretsId>
|
||||||
<Version>2.0.53</Version>
|
<Version>2.0.54</Version>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue