2022-06-14 18:21:36 +00:00
|
|
|
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
|
|
|
|
{
|
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);
|
2022-06-14 18:21:36 +00:00
|
|
|
IAsyncEnumerable<string> GetPersonalPlaylistsAsync();
|
|
|
|
Task<(String Path,bool Delete)> GetRealUrlOrPathAsync(string path);
|
2022-06-24 23:02:51 +00:00
|
|
|
|
2022-06-14 18:21:36 +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
|
|
|
|
2022-06-14 18:21:36 +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
|
|
|
|
|
|
|
|
2022-06-14 18:21:36 +00:00
|
|
|
}
|
|
|
|
}
|