Skip to content

Commit

Permalink
Add logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerfar committed Jan 7, 2024
1 parent d0f7c9f commit 1817bd7
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 12 deletions.
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/navbar/navbar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public SymlinkDownloader(String uri, String filePath)

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);

Expand Down Expand Up @@ -56,10 +56,13 @@ public SymlinkDownloader(String uri, String filePath)
{
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);
}
Expand Down
17 changes: 12 additions & 5 deletions server/RdtClient.Service/Services/TorrentRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -541,12 +541,19 @@ public async Task Tick()

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)
Expand Down
2 changes: 1 addition & 1 deletion server/RdtClient.Web/RdtClient.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 1817bd7

Please sign in to comment.