Crunchy-Downloader/CRD/Utils/UI/UiSonarrIdToVisibilityConverter.cs
Elwador 9d66eb34c9 Add - Added Table view to history tab
Add - Added Sorting to history tab
Add - Added next air date to history posters
Add - Added scale slider to history tab for posters
Chg - Auto download always starts new downloads even when you are not on the download queue tab
Chg - Small size adjustment for the text in the calendar tab
Fix - Simultaneous downloads set to 1 and auto download didn't work together
Fix - Finished downloads didn't resume correctly
2024-06-27 00:04:50 +02:00

21 lines
No EOL
775 B
C#

using System;
using System.Globalization;
using Avalonia.Data.Converters;
using CRD.Downloader;
using FluentAvalonia.UI.Controls;
namespace CRD.Utils.UI;
public class UiSonarrIdToVisibilityConverter : IValueConverter{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture){
if (value is string stringValue){
return Crunchyroll.Instance.CrunOptions.SonarrProperties != null && (stringValue.Length > 0 && Crunchyroll.Instance.CrunOptions.SonarrProperties.SonarrEnabled);
}
return false;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture){
throw new NotImplementedException("This converter only works for one-way binding");
}
}