Exemple #1
0
        public VodList(DownloadForm parent)
        {
            InitializeComponent();
            DownloadWindow       = parent;
            comboBoxService.Text = "Twitch (Recordings)";
            objectListViewVideos.SecondarySortColumn = objectListViewVideos.GetColumn("Video ID");
            objectListViewVideos.SecondarySortOrder  = SortOrder.Ascending;

            comboBoxKnownUsers.Items.Add(" == No Preset == ");
            comboBoxKnownUsers.Items.AddRange(UserInfoPersister.GetKnownUsers().ToArray());
            comboBoxKnownUsers.SelectedIndex = 0;

            buttonClear.Enabled          = false;
            checkBoxAutoDownload.Enabled = false;

            if (!Util.ShowDownloadFetched)
            {
                buttonDownloadFetched.Enabled = false;
                buttonDownloadFetched.Hide();
                buttonDownloadAllKnown.Enabled = false;
                buttonDownloadAllKnown.Hide();
                checkBoxAutoDownload.Hide();
            }
            if (!Util.ShowAnySpecialButton)
            {
                objectListViewVideos.Size = new Size(objectListViewVideos.Size.Width, objectListViewVideos.Size.Height + 29);
            }
        }
Exemple #2
0
        private void StartTimedAutoFetch()
        {
            if (Util.AllowTimedAutoFetch)
            {
                FetchTaskGroups = new Dictionary <ServiceVideoCategoryType, FetchTaskGroup>();
                foreach (List <ServiceVideoCategoryType> types in ServiceVideoCategoryGroups.Groups)
                {
                    FetchTaskGroup ftg = new FetchTaskGroup(this, CancellationTokenSource.Token);
                    foreach (ServiceVideoCategoryType svc in types)
                    {
                        FetchTaskGroups.Add(svc, ftg);
                        foreach (IUserInfo ui in UserInfoPersister.GetKnownUsers())
                        {
                            if (ui.AutoDownload && ui.Type == svc)
                            {
                                ftg.Add(ui);
                            }
                        }
                    }
                }

                StatusMessageTask = StatusMessageThreadFunc(CancellationTokenSource.Token);
            }
        }