namespace octo_fiesta.Models.Settings;
///
/// Download mode for tracks
///
public enum DownloadMode
{
///
/// Download only the requested track (default behavior)
///
Track,
///
/// When a track is played, download the entire album in background
/// The requested track is downloaded first, then remaining tracks are queued
///
Album
}
///
/// Explicit content filter mode for Deezer tracks
///
public enum ExplicitFilter
{
///
/// Show all tracks (no filtering)
///
All,
///
/// Exclude clean/edited versions (explicit_content_lyrics == 3)
/// Shows original explicit content and naturally clean content
///
ExplicitOnly,
///
/// Only show clean content (explicit_content_lyrics == 0 or 3)
/// Excludes tracks with explicit_content_lyrics == 1
///
CleanOnly
}
///
/// Storage mode for downloaded tracks
///
public enum StorageMode
{
///
/// Files are permanently stored in the library and registered in the database
///
Permanent,
///
/// Files are stored in a temporary cache and automatically cleaned up
/// Not registered in the database, no Navidrome scan triggered
///
Cache
}
///
/// Music service provider
///
public enum MusicService
{
///
/// Deezer music service
///
Deezer,
///
/// Qobuz music service
///
Qobuz
}
public class SubsonicSettings
{
public string? Url { get; set; }
///
/// Explicit content filter mode (default: All)
/// Environment variable: EXPLICIT_FILTER
/// Values: "All", "ExplicitOnly", "CleanOnly"
/// Note: Only works with Deezer
///
public ExplicitFilter ExplicitFilter { get; set; } = ExplicitFilter.All;
///
/// Download mode for tracks (default: Track)
/// Environment variable: DOWNLOAD_MODE
/// Values: "Track" (download only played track), "Album" (download full album when playing a track)
///
public DownloadMode DownloadMode { get; set; } = DownloadMode.Track;
///
/// Music service to use (default: Deezer)
/// Environment variable: MUSIC_SERVICE
/// Values: "Deezer", "Qobuz"
///
public MusicService MusicService { get; set; } = MusicService.Deezer;
///
/// Storage mode for downloaded files (default: Permanent)
/// Environment variable: STORAGE_MODE
/// Values: "Permanent" (files saved to library), "Cache" (temporary files, auto-cleanup)
///
public StorageMode StorageMode { get; set; } = StorageMode.Permanent;
///
/// Cache duration in hours for Cache storage mode (default: 1)
/// Environment variable: CACHE_DURATION_HOURS
/// Files older than this duration will be automatically deleted
/// Only applies when StorageMode is Cache
///
public int CacheDurationHours { get; set; } = 1;
}