tytd/Tesses.YouTubeDownloader/ITYTDBase.cs

75 lines
2.9 KiB
C#
Raw Permalink Normal View History

using System;
using YoutubeExplode;
using YoutubeExplode.Videos;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Net.Http;
using System.IO;
using YoutubeExplode.Playlists;
using YoutubeExplode.Channels;
using Newtonsoft.Json;
namespace Tesses.YouTubeDownloader
{
public interface ITYTDBase : IPersonalPlaylistGet
{
2023-02-16 14:48:50 +00:00
Task<bool> BestStreamInfoExistsAsync(VideoId id);
Task<bool> VideoInfoExistsAsync(VideoId id);
Task<bool> PlaylistInfoExistsAsync(PlaylistId id);
Task<bool> ChannelInfoExistsAsync(ChannelId id);
Task<bool> ThumbnailExistsAsync(VideoId videoId,string res);
bool ThumbnailExists(VideoId videoId,string res);
Task<byte[]> ReadThumbnailAsync(VideoId videoId,string res,CancellationToken token=default);
2022-07-13 13:59:23 +00:00
IAsyncEnumerable<string> GetDownloadUrlsAsync();
IAsyncEnumerable<SavedVideo> GetDownloadsAsync();
Task<SavedVideo> GetDownloadInfoAsync(string url);
bool DownloadExists(string path);
2022-07-06 22:59:50 +00:00
Task<BestStreamInfo.BestStreamsSerialized> GetBestStreamInfoAsync(VideoId id);
bool BestStreamInfoExists(VideoId id);
IAsyncEnumerable<string> GetPersonalPlaylistsAsync();
Task<(String Path,bool Delete)> GetRealUrlOrPathAsync(string path);
2022-06-24 23:02:51 +00:00
bool FileExists(string path);
IAsyncEnumerable<string> GetVideoIdsAsync();
Task<SavedVideo> GetVideoInfoAsync(VideoId id);
IAsyncEnumerable<SavedVideo> GetVideosAsync();
IAsyncEnumerable<SavedVideoLegacy> GetLegacyVideosAsync();
Task<SavedVideoLegacy> GetLegacyVideoInfoAsync(VideoId id);
IAsyncEnumerable<SavedPlaylist> GetPlaylistsAsync();
Task<byte[]> ReadAllBytesAsync(string path,CancellationToken token=default(CancellationToken));
IAsyncEnumerable<string> GetPlaylistIdsAsync();
IAsyncEnumerable<string> GetChannelIdsAsync();
IAsyncEnumerable<VideoId> GetYouTubeExplodeVideoIdsAsync();
Task<SavedChannel> GetChannelInfoAsync(ChannelId id);
IAsyncEnumerable<SavedChannel> GetChannelsAsync();
bool PlaylistInfoExists(PlaylistId id);
bool VideoInfoExists(VideoId id);
bool ChannelInfoExists(ChannelId id);
Task<SavedPlaylist> GetPlaylistInfoAsync(PlaylistId id);
Task<string> ReadAllTextAsync(string file);
bool DirectoryExists(string path);
IEnumerable<string> EnumerateFiles(string path);
IEnumerable<string> EnumerateDirectories(string path);
2022-06-24 23:02:51 +00:00
Task<Stream> OpenReadAsync(string path);
Task<bool> FileExistsAsync(string path);
Task<bool> DirectoryExistsAsync(string path);
IAsyncEnumerable<string> EnumerateFilesAsync(string path);
IAsyncEnumerable<string> EnumerateDirectoriesAsync(string path);
2022-06-24 23:02:51 +00:00
}
}