public ArtistViewerWindow()
        {
            InitializeComponent();

            DataContext = new Domain.ArtistDataGridViewModel();

            Task.Run(() =>
            {
                var result = HitomiDataParser.SearchAsync("artist:michiking").Result;
                _          = Task.Run(() => LoadThumbnail(result));
            });
        }
        public ArtistViewerWindow()
        {
            InitializeComponent();
            Koromo_Copy_UX.Language.Lang.ApplyLanguageDictionary(this);

            DataContext = new Domain.ArtistDataGridViewModel();

            Task.Run(() =>
            {
                var result = HitomiDataParser.SearchAsync("artist:michiking").Result;
                _          = Task.Run(() => LoadThumbnail(result));
            });
        }
        public GroupViewerWindow(string group)
        {
            InitializeComponent();
            Koromo_Copy_UX.Language.Lang.ApplyLanguageDictionary(this);

            DataContext      = new Domain.ArtistDataGridViewModel();
            TagList.Sorting += new DataGridSortingEventHandler(new DataGridSorter <ArtistDataGridItemViewModel>(TagList).SortHandler);
            Title           += group;
            Group            = group;

            var dictionary = new Dictionary <string, int>();

            Task.Run(() =>
            {
                var result = HitomiDataParser.SearchAsync($"group:{group.ToLower().Replace(' ', '_')}").Result;
                _          = Task.Run(() => LoadThumbnail(result));

                foreach (var md in result)
                {
                    if (md.Tags != null)
                    {
                        foreach (var _tag in md.Tags)
                        {
                            var tag = HitomiIndex.Instance.index.Tags[_tag];
                            if (dictionary.ContainsKey(tag))
                            {
                                dictionary[tag] += 1;
                            }
                            else
                            {
                                dictionary.Add(tag, 1);
                            }
                        }
                    }
                }
            }).ContinueWith(t => {
                var vm   = DataContext as Domain.ArtistDataGridViewModel;
                var list = dictionary.ToList();
                list.Sort((a, b) => b.Value.CompareTo(a.Value));
                foreach (var tag in list)
                {
                    vm.Items.Add(new Domain.ArtistDataGridItemViewModel
                    {
                        항목  = tag.Key,
                        카운트 = tag.Value
                    });
                }
            }, TaskScheduler.FromCurrentSynchronizationContext());
        }
        public ArtistViewerWindow(string artist)
        {
            InitializeComponent();
            Koromo_Copy_UX.Language.Lang.ApplyLanguageDictionary(this);

            DataContext      = new Domain.ArtistDataGridViewModel();
            TagList.Sorting += new DataGridSortingEventHandler(new DataGridSorter <ArtistDataGridItemViewModel>(TagList).SortHandler);
            Title            = $"{FindResource("artist")} : {artist}";
            Artist           = artist;

            if (Settings.Instance.Hitomi.DisableArtistViewToast)
            {
                ArtistsPopup.IsOpen = false;
            }

            var dictionary = new Dictionary <string, int>();

            Task.Run(() =>
            {
                var result = HitomiDataParser.SearchAsync($"artist:{artist.ToLower().Replace(' ', '_')}").Result;
                _          = Task.Run(() => LoadThumbnail(result));

                foreach (var md in result)
                {
                    if (md.Tags != null)
                    {
                        foreach (var tag in md.Tags)
                        {
                            if (dictionary.ContainsKey(tag))
                            {
                                dictionary[tag] += 1;
                            }
                            else
                            {
                                dictionary.Add(tag, 1);
                            }
                        }
                    }
                }
            }).ContinueWith(async t => {
                var vm   = DataContext as Domain.ArtistDataGridViewModel;
                var list = dictionary.ToList();
                list.Sort((a, b) => b.Value.CompareTo(a.Value));
                foreach (var tag in list)
                {
                    vm.Items.Add(new Domain.ArtistDataGridItemViewModel
                    {
                        항목  = tag.Key,
                        카운트 = tag.Value
                    });
                }
                hpa.CustomAnalysis = dictionary.Select(x => new Tuple <string, int>(x.Key, x.Value)).ToList();

                if (!Settings.Instance.Hitomi.DisableArtistViewToast)
                {
                    await Task.Run(() => hpa.Update());
                    for (int j = 0; j < 5 && current_item < hpa.Rank.Count; current_item++)
                    {
                        if (hpa.Rank[current_item].Item1 == Artist)
                        {
                            continue;
                        }
                        RecommendArtist.Children.Add(new ArtistViewerToastElements(
                                                         $"{current_load + 1}. {hpa.Rank[current_item].Item1} ({HitomiAnalysis.Instance.ArtistCount[hpa.Rank[current_item].Item1]})", $"{FindResource("score")}: {hpa.Rank[current_item].Item2}", hpa.Rank[current_item].Item1));
                        j++;
                        current_load++;
                    }
                    loaded = true;
                }
            }, TaskScheduler.FromCurrentSynchronizationContext());
        }