Add logging.

This commit is contained in:
Roger Far 2024-01-07 12:09:11 -07:00
parent d0f7c9fb37
commit 1817bd7508
6 changed files with 27 additions and 12 deletions

View file

@ -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/),
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
- Add setting to set the download path on the aria2 instance.
## [2.0.52] - 2024-01-15
## [2.0.52] - 2024-01-05
### Added
- Add BASE_PATH environment variable for the base path setting.
- 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 setting to store magnets and torrents to a directory after adding.
- Added bulk settings change on the index pages.

View file

@ -55,7 +55,7 @@
<a class="navbar-item" routerLink="profile"> Profile </a>
<a class="navbar-item" (click)="logout()"> Logout </a>
<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>

View file

@ -1,6 +1,6 @@
{
"name": "rdt-client",
"version": "2.0.53",
"version": "2.0.54",
"description": "This is a web interface to manage your torrents on Real-Debrid.",
"main": "index.js",
"dependencies": {

View file

@ -24,7 +24,7 @@ public class SymlinkDownloader : IDownloader
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);
@ -56,10 +56,13 @@ public class SymlinkDownloader : IDownloader
{
DownloadComplete?.Invoke(this, new DownloadCompleteEventArgs());
_logger.Information($"File {fileName} found on {Settings.Get.DownloadClient.RcloneMountPath} at {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 Task.FromResult<String?>(null);
}

View file

@ -541,12 +541,19 @@ public class TorrentRunner
if (torrent.DownloadClient == Data.Enums.DownloadClient.Symlink)
{
torrent.FinishedAction = torrent.FinishedAction switch
switch (torrent.FinishedAction)
{
TorrentFinishedAction.RemoveAllTorrents => TorrentFinishedAction.RemoveClient,
TorrentFinishedAction.RemoveRealDebrid => TorrentFinishedAction.None,
_ => torrent.FinishedAction
};
case TorrentFinishedAction.RemoveAllTorrents:
Log($"Force setting FinishedAction to RemoveClient as download client is Symlink and FinishedAction is RemoveAllTorrents", torrent);
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)

View file

@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<UserSecretsId>94c24cba-f03f-4453-a671-3640b517c573</UserSecretsId>
<Version>2.0.53</Version>
<Version>2.0.54</Version>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>