fix: merge conflicts and upstream changes merged

This commit is contained in:
bransoned
2026-01-16 22:45:04 +00:00
27 changed files with 3063 additions and 108 deletions

View File

@@ -40,6 +40,23 @@ public enum ExplicitFilter
CleanOnly
}
/// <summary>
/// Storage mode for downloaded tracks
/// </summary>
public enum StorageMode
{
/// <summary>
/// Files are permanently stored in the library and registered in the database
/// </summary>
Permanent,
/// <summary>
/// Files are stored in a temporary cache and automatically cleaned up
/// Not registered in the database, no Navidrome scan triggered
/// </summary>
Cache
}
/// <summary>
/// Music service provider
/// </summary>
@@ -85,5 +102,38 @@ public class SubsonicSettings
/// Environment variable: MUSIC_SERVICE
/// Values: "Deezer", "Qobuz", "SquidWTF"
/// </summary>
public MusicService MusicService { get; set; } = MusicService.SquidWTF;
}
/// <summary>
/// Storage mode for downloaded files (default: Permanent)
/// Environment variable: STORAGE_MODE
/// Values: "Permanent" (files saved to library), "Cache" (temporary files, auto-cleanup)
/// </summary>
public StorageMode StorageMode { get; set; } = StorageMode.Permanent;
/// <summary>
/// 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
/// </summary>
public int CacheDurationHours { get; set; } = 1;
/// <summary>
/// Enable external playlist search and streaming (default: true)
/// Environment variable: ENABLE_EXTERNAL_PLAYLISTS
/// When enabled, users can search for playlists from the configured music provider
/// Playlists appear as "albums" in search results with genre "Playlist"
/// </summary>
public bool EnableExternalPlaylists { get; set; } = true;
/// <summary>
/// Directory name for storing playlist .m3u files (default: "playlists")
/// Environment variable: PLAYLISTS_DIRECTORY
/// Relative to the music library root directory
/// Playlist files will be stored in {MusicDirectory}/{PlaylistsDirectory}/
/// </summary>
public string PlaylistsDirectory { get; set; } = "playlists";
}

View File

@@ -0,0 +1,58 @@
namespace octo_fiesta.Models.Subsonic;
/// <summary>
/// Represents a playlist from an external music provider (Deezer, Qobuz).
/// </summary>
public class ExternalPlaylist
{
/// <summary>
/// Unique identifier in the format "pl-{provider}-{externalId}"
/// Example: "pl-deezer-123456" or "pl-qobuz-789"
/// </summary>
public string Id { get; set; } = string.Empty;
/// <summary>
/// Playlist name
/// </summary>
public string Name { get; set; } = string.Empty;
/// <summary>
/// Playlist description
/// </summary>
public string? Description { get; set; }
/// <summary>
/// Name of the playlist creator/curator
/// </summary>
public string? CuratorName { get; set; }
/// <summary>
/// Provider name ("deezer" or "qobuz")
/// </summary>
public string Provider { get; set; } = string.Empty;
/// <summary>
/// External ID from the provider (without "pl-" prefix)
/// </summary>
public string ExternalId { get; set; } = string.Empty;
/// <summary>
/// Number of tracks in the playlist
/// </summary>
public int TrackCount { get; set; }
/// <summary>
/// Total duration in seconds
/// </summary>
public int Duration { get; set; }
/// <summary>
/// Cover art URL from the provider
/// </summary>
public string? CoverUrl { get; set; }
/// <summary>
/// Playlist creation date
/// </summary>
public DateTime? CreatedDate { get; set; }
}