Add DisableUpdateNotifications setting

Lets the user turn notifications off completely
This commit is contained in:
Cucumberrbob 2025-03-11 20:34:52 +00:00
parent a366328472
commit b333c738be
No known key found for this signature in database
GPG key ID: 2B935C47401C3614
5 changed files with 9 additions and 2 deletions

View file

@ -4,4 +4,5 @@ export class Profile {
public expiration: Date;
public currentVersion: string;
public latestVersion: string;
public disableUpdateNotification: boolean;
}

View file

@ -63,7 +63,7 @@
</nav>
<div
class="notification is-warning"
*ngIf="profile && profile.latestVersion && profile.currentVersion !== profile.latestVersion"
*ngIf="profile && !profile.disableUpdateNotification && profile.latestVersion && profile.currentVersion !== profile.latestVersion"
>
Version {{ profile.latestVersion }} of RealDebrid Client was found. You are currently on version
{{ profile.currentVersion }}.

View file

@ -74,6 +74,10 @@ Supports the following parameters:
[DisplayName("Copy added torrent files")]
[Description("When a torrent file or magnet is added, create a copy in this directory.")]
public String? CopyAddedTorrents { get; set; } = null;
[DisplayName("Disable update notifications")]
[Description("Ignore update notifications. You will still be notified if the version you are running has a security vulnerability.")]
public Boolean DisableUpdateNotifications { get; set; } = false;
}
public class DbSettingsDownloadClient

View file

@ -7,4 +7,5 @@ public class Profile
public DateTimeOffset? Expiration { get; set; }
public String? CurrentVersion { get; set; }
public String? LatestVersion { get; set; }
public Boolean? DisableUpdateNotification { get; set; }
}

View file

@ -413,7 +413,8 @@ public class Torrents(
UserName = user.Username,
Expiration = user.Expiration,
CurrentVersion = UpdateChecker.CurrentVersion,
LatestVersion = UpdateChecker.LatestVersion
LatestVersion = UpdateChecker.LatestVersion,
DisableUpdateNotification = Settings.Get.General.DisableUpdateNotifications
};
return profile;