Exemplo n.º 1
0
        private async void HitomiPanel_Loaded(object sender, RoutedEventArgs e)
        {
            if (!afterLoad)
            {
                return;
            }
            if (h.type == Hitomi.Type.Hiyobi)
            {
                this.nameLabel.Content = h.name + " (로딩중)";
                h.files = new string[0];
                InternetP parser = new InternetP(index: int.Parse(h.id));
                this.h.files           = (await parser.HiyobiFiles()).Select(x => x.url).ToArray();
                this.h.page            = h.files.Length;
                this.nameLabel.Content = h.name;
                Init();
            }
            if (h.type == Hitomi.Type.Hitomi)
            {
                this.nameLabel.Content = h.name + " (로딩중)";
                InternetP parser = new InternetP();
                parser.url = $"https://ltn.hitomi.la/galleries/{h.id}.js";
                JObject info = await parser.HitomiGalleryInfo();

                h.type  = Hitomi.Type.Hitomi;
                h.tags  = parser.HitomiTags(info);
                h.files = parser.HitomiFiles(info).ToArray();
                h.page  = h.files.Length;
                h.thumb = ImageProcessor.LoadWebImage("https:" + h.thumbpath);
                h.Json  = info;
                h       = await parser.HitomiGalleryData(h);

                this.nameLabel.Content = h.name;
                Init();
            }
        }