29 lines
1.2 KiB
C#
29 lines
1.2 KiB
C#
namespace YTExtractor.Services
|
|
{
|
|
public interface IYoutubeService
|
|
{
|
|
/// <summary>
|
|
/// Validates if the provided URL is a valid YouTube URL
|
|
/// </summary>
|
|
/// <param name="url">The URL to validate</param>
|
|
/// <returns>True if the URL is a valid YouTube URL, otherwise false</returns>
|
|
bool IsValidYouTubeUrl(string url);
|
|
|
|
/// <summary>
|
|
/// Gets video information from a YouTube URL
|
|
/// </summary>
|
|
/// <param name="url">The YouTube video URL</param>
|
|
/// <param name="workingDir">The working directory for temporary files</param>
|
|
/// <returns>Basic information about the video</returns>
|
|
Task<YtDlpInfo> GetVideoInfo(string url, string workingDir);
|
|
|
|
/// <summary>
|
|
/// Gets subtitles for a YouTube video
|
|
/// </summary>
|
|
/// <param name="url">The YouTube video URL</param>
|
|
/// <param name="language">The language code for subtitles</param>
|
|
/// <param name="workingDir">The working directory for temporary files</param>
|
|
/// <returns>The subtitles content as a string</returns>
|
|
Task<string> GetSubtitles(string url, string language, string workingDir);
|
|
}
|
|
} |