Skip to content

Commit

Permalink
v1: Add VideoDetail and ExtractDetailAsync (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
justgotothedesk authored Oct 15, 2023
1 parent 5d2c980 commit bf46f82
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/YouTubeSubtitlesExtractor/Abstractions/IYouTubeVideo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,11 @@ public interface IYouTubeVideo
/// <param name="options"><see cref="VideoOptions"/> instance.</param>
/// <returns>Returns the list of <see cref="Subtitle"/> instances.</returns>
Task<List<Subtitle>> ExtractSubtitlesAsync(VideoOptions options);

/// <summary>
/// Extracts the details from the given video options.
/// <summary>
/// <params name="videoUrl">YouTube video URL.</param>
/// <returns>Returns the list of <see cref="VideoDetails"/> instances.</returns>
Task<VideoDetails> ExtractVideoDetailsAsync(string videoUrl);
}
6 changes: 6 additions & 0 deletions src/YouTubeSubtitlesExtractor/YouTubeVideo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,10 @@ public async Task<List<Subtitle>> ExtractSubtitlesAsync(VideoOptions options)

return subtitles;
}

/// <inheritdoc/>
public async Task<VideoDetails> ExtractVideoDetailsAsync(string videoUrl)

Check warning on line 104 in src/YouTubeSubtitlesExtractor/YouTubeVideo.cs

View workflow job for this annotation

GitHub Actions / Build Test (windows-latest)

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 104 in src/YouTubeSubtitlesExtractor/YouTubeVideo.cs

View workflow job for this annotation

GitHub Actions / Build Test (ubuntu-latest)

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

Check warning on line 104 in src/YouTubeSubtitlesExtractor/YouTubeVideo.cs

View workflow job for this annotation

GitHub Actions / Build Test (macos-latest)

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
throw new NotImplementedException();
}
}

0 comments on commit bf46f82

Please sign in to comment.