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 IStorage : IWritable, IDownloader, ITYTDBase
|
|
|
|
{
|
2022-07-13 13:59:23 +00:00
|
|
|
void WaitTillMediaContentQueueEmpty();
|
|
|
|
|
2022-07-06 22:59:50 +00:00
|
|
|
Task WriteBestStreamInfoAsync(VideoId id,BestStreamInfo.BestStreamsSerialized serialized);
|
2022-06-14 18:21:36 +00:00
|
|
|
Task<bool> MuxVideosAsync(SavedVideo video,string videoSrc,string audioSrc,string videoDest,IProgress<double> progress=null,CancellationToken token=default(CancellationToken));
|
|
|
|
Task<bool> Continue(string path);
|
2022-08-28 21:40:34 +00:00
|
|
|
|
2022-06-14 18:21:36 +00:00
|
|
|
Task WriteVideoInfoAsync(SavedVideo channel);
|
|
|
|
Task WritePlaylistInfoAsync(SavedPlaylist channel);
|
|
|
|
Task WriteChannelInfoAsync(SavedChannel channel);
|
|
|
|
void CreateDirectoryIfNotExist(string path);
|
|
|
|
LegacyConverter Legacy {get;}
|
|
|
|
Logger GetLogger();
|
|
|
|
LoggerProperties GetLoggerProperties();
|
|
|
|
IReadOnlyList<Subscription> GetLoadedSubscriptions();
|
2022-11-01 07:17:11 +00:00
|
|
|
|
|
|
|
|
2022-06-14 18:21:36 +00:00
|
|
|
bool CanDownload {get;set;}
|
|
|
|
IExtensionContext ExtensionContext {get;set;}
|
|
|
|
HttpClient HttpClient {get;set;}
|
|
|
|
YoutubeClient YoutubeClient {get;set;}
|
|
|
|
Task<Stream> OpenOrCreateAsync(string path);
|
|
|
|
|
|
|
|
void RenameFile(string src, string dest);
|
|
|
|
|
|
|
|
Task<Stream> 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<bool> DownloadVideoOnlyAsync(SavedVideo video,CancellationToken token,IProgress<double> progress,bool report=true);
|
|
|
|
Task MoveLegacyStreams(SavedVideo video,BestStreams streams);
|
|
|
|
|
2022-06-15 08:04:26 +00:00
|
|
|
void StartLoop(CancellationToken token=default(CancellationToken));
|
2022-11-01 07:17:11 +00:00
|
|
|
|
2022-06-14 18:21:36 +00:00
|
|
|
}
|
|
|
|
}
|