fix: Resolve ambiguous UserPreferences class conflict

- Renamed UserPreferences in LoggingService to LoggingPreferences
- Used fully qualified names for TransmissionRssManager.Core.UserPreferences
- Fixed float to int conversion issues with explicit casts
- Fixed interface implementation issues

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
MasterDraco 2025-03-12 22:40:44 +00:00
parent 2e2e38d979
commit 164268abd1
3 changed files with 7 additions and 7 deletions

View File

@ -187,7 +187,7 @@ namespace TransmissionRssManager.Api.Controllers
CompressCompletedFiles = false,
DeleteCompletedAfterDays = 0
},
UserPreferences = new UserPreferences
UserPreferences = new TransmissionRssManager.Core.UserPreferences
{
EnableDarkMode = true,
AutoRefreshUIEnabled = true,

View File

@ -224,7 +224,7 @@ namespace TransmissionRssManager.Services
case "PostProcessing.MinimumSeedRatio":
if (float.TryParse(value, out float seedRatio))
{
config.PostProcessing.MinimumSeedRatio = seedRatio;
config.PostProcessing.MinimumSeedRatio = (int)seedRatio;
changed = true;
}
break;
@ -409,7 +409,7 @@ namespace TransmissionRssManager.Services
OrganizeMedia = true,
MinimumSeedRatio = 1
},
UserPreferences = new UserPreferences
UserPreferences = new TransmissionRssManager.Core.UserPreferences
{
EnableDarkMode = true,
AutoRefreshUIEnabled = true,
@ -439,7 +439,7 @@ namespace TransmissionRssManager.Services
MinimumSeedRatio = 1
};
config.UserPreferences ??= new UserPreferences
config.UserPreferences ??= new TransmissionRssManager.Core.UserPreferences
{
EnableDarkMode = true,
AutoRefreshUIEnabled = true,

View File

@ -21,7 +21,7 @@ namespace TransmissionRssManager.Services
public string Properties { get; set; } = string.Empty;
}
public class UserPreferences
public class LoggingPreferences
{
public bool EnableDarkMode { get; set; } = false;
public bool AutoRefreshUIEnabled { get; set; } = true;
@ -42,7 +42,7 @@ namespace TransmissionRssManager.Services
}
public interface ILoggingService
{
void Configure(UserPreferences preferences);
void Configure(TransmissionRssManager.Core.UserPreferences preferences);
Task<List<LogEntry>> GetLogsAsync(LogFilterOptions options);
Task ClearLogsAsync(DateTime? olderThan = null);
Task<byte[]> ExportLogsAsync(LogFilterOptions options);
@ -96,7 +96,7 @@ namespace TransmissionRssManager.Services
}
}
public void Configure(UserPreferences preferences)
public void Configure(TransmissionRssManager.Core.UserPreferences preferences)
{
// No-op in simplified version
}