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 IStorage : IWritable, IDownloader, ITYTDBase { Task MuxVideosAsync(SavedVideo video,string videoSrc,string audioSrc,string videoDest,IProgress progress=null,CancellationToken token=default(CancellationToken)); Task Continue(string path); Task WriteVideoInfoAsync(SavedVideo channel); Task WritePlaylistInfoAsync(SavedPlaylist channel); Task WriteChannelInfoAsync(SavedChannel channel); void CreateDirectoryIfNotExist(string path); LegacyConverter Legacy {get;} Logger GetLogger(); LoggerProperties GetLoggerProperties(); IReadOnlyList GetLoadedSubscriptions(); event EventHandler Bell; event EventHandler VideoStarted; event EventHandler BeforeSaveInfo; event EventHandler VideoProgress; public event EventHandler VideoFinished; bool CanDownload {get;set;} IExtensionContext ExtensionContext {get;set;} HttpClient HttpClient {get;set;} YoutubeClient YoutubeClient {get;set;} Task OpenOrCreateAsync(string path); void RenameFile(string src, string dest); Task CreateAsync(string path); void Unsubscribe(ChannelId id); void CreateDirectory(string path); void MoveDirectory(string src, string dest); void DeleteFile(string file); void DeleteDirectory(string dir, bool recursive = false); Task DownloadVideoOnlyAsync(SavedVideo video,CancellationToken token,IProgress progress,bool report=true); Task MoveLegacyStreams(SavedVideo video,BestStreams streams); } }