Exemplo n.º 1
0
    public DownloadTask(IPlaylistHandler playlistHandler, IMessageHandler messageHandler, IContentDownloadHelper contentDownloadHelper, IVideoListContainer container, IVideosUnchecker unchecker)
    {
        this._cts                   = new CancellationTokenSource();
        this._messageHandler        = messageHandler;
        this._contentDownloadHelper = contentDownloadHelper;
        this._playlistHandler       = playlistHandler;
        this._container             = container;
        this._unchecker             = unchecker;

        this.OnWait       = _ => { };
        this.TaskFunction = async(_, _) => await this.DownloadAsync();

        this.IsCompleted  = new ReactiveProperty <bool>().AddTo(this.disposables);
        this.IsProcessing = new ReactiveProperty <bool>().AddTo(this.disposables);
        this.IsCanceled   = new ReactiveProperty <bool>().AddTo(this.disposables);
        this.Message      = new ReactiveProperty <string>("未初期化").AddTo(this.disposables);

        this.Resolution.Subscribe(value =>
        {
            if (this._settings is not null)
            {
                this._settings.VerticalResolution = value;
            }
        });
    }
Exemplo n.º 2
0
 public OnlineVideoRefreshManager(ICurrent current, IVideoListContainer container, INetworkVideoHandler netVideoHandler, IRemotePlaylistHandler remotePlaylistHandler, IMessageHandler message, IVideosUnchecker unchecker)
 {
     this._current               = current;
     this._container             = container;
     this._netVideoHandler       = netVideoHandler;
     this._remotePlaylistHandler = remotePlaylistHandler;
     this._message               = message;
     this._unchcecker            = unchecker;
 }