Exemple #1
0
        public async Task AddFolder(params IFolderItem[] paths)
        {
            foreach (var path in paths)
            {
                var gallery = await ScanForGalleryAsync(path);

                var result = LocalLibraryDb.Instance.AddLocalLibrary(path, gallery);
                LocalLibrary.Add(result);
                gallery.ForEach(it => LocalGallery.Add(it));
            }
        }
Exemple #2
0
        public async Task Refresh()
        {
            foreach (var item in LocalLibrary)
            {
                var gallery =
                    await ScanForGalleryAsync(
                        await HentaiApp.Instance.Resolve <IPlatformService>().GetFolder(item.Token));

                LocalLibraryDb.Instance.UpdateLocalLibrary(item, gallery);
            }

            LocalGallery.Clear();
            LocalLibraryDb.Instance.GetLocalGallery().ForEach(it => LocalGallery.Add(it));
        }