using octo_fiesta.Models.Domain;
using octo_fiesta.Models.Settings;
using octo_fiesta.Models.Download;
using octo_fiesta.Models.Search;
using octo_fiesta.Models.Subsonic;
namespace octo_fiesta.Services;
///
/// Interface for the music download service (Deezspot or other)
///
public interface IDownloadService
{
///
/// Downloads a song from an external provider
///
/// The provider (deezer, spotify)
/// The ID on the external provider
/// Cancellation token
/// The path to the downloaded file
Task DownloadSongAsync(string externalProvider, string externalId, CancellationToken cancellationToken = default);
///
/// Downloads a song and streams the result progressively
///
/// The provider (deezer, spotify)
/// The ID on the external provider
/// Cancellation token
/// A stream of the audio file
Task DownloadAndStreamAsync(string externalProvider, string externalId, CancellationToken cancellationToken = default);
///
/// Downloads remaining tracks from an album in background (excluding the specified track)
///
/// The provider (deezer, spotify)
/// The album ID on the external provider
/// The track ID to exclude (already downloaded)
void DownloadRemainingAlbumTracksInBackground(string externalProvider, string albumExternalId, string excludeTrackExternalId);
///
/// Checks if a song is currently being downloaded
///
DownloadInfo? GetDownloadStatus(string songId);
///
/// Checks if the service is properly configured and functional
///
Task IsAvailableAsync();
}