namespace ErsatzTV.Core.Interfaces.Streaming;
///
/// Checks whether a media-server remote-stream URL still resolves to playable media.
///
public interface IRemoteStreamProber
{
///
/// Probes , following redirects as ffmpeg would.
///
///
/// false only when the media server itself reported the media gone — i.e. a 404 that
/// arrived after ErsatzTV's own /media/{provider}/... endpoint redirected.
/// Every other outcome returns true (fail-open), including an un-redirected 404: that
/// one came from ErsatzTV's own endpoint, which also 404s when the media source is
/// unconfigured or momentarily missing, and honouring it would blank every item on that
/// source. Timeouts, transport failures and all other status codes likewise return
/// true, so a probe that cannot answer never prevents a tune that would have worked.
///
///
/// May propagate when is cancelled while the probe is
/// in flight. Caller cancellation is a genuine signal (shutdown / client disconnect), not a
/// probe failure, so it is not absorbed by the fail-open behaviour above. Cancelling after
/// the probe has already completed returns normally. The prober's own internal timeout does
/// not throw — it fails open.
///
Task IsAvailable(string url, CancellationToken cancellationToken);
}