favorite & view page & etc.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Gallery.Util;
|
||||
@ -8,14 +9,14 @@ using Xamarin.Forms;
|
||||
|
||||
namespace Gallery.Sources.Danbooru
|
||||
{
|
||||
public class GallerySource : IGallerySource
|
||||
public class GallerySource : GallerySourceBase
|
||||
{
|
||||
public string Name => "Danbooru";
|
||||
public string Route => "danbooru";
|
||||
public string FlyoutIconKey => "Danbooru";
|
||||
public string HomePage => "https://danbooru.donmai.us";
|
||||
public override string Name => "Danbooru";
|
||||
public override string Route => "danbooru";
|
||||
public override string FlyoutIconKey => "Danbooru";
|
||||
public override string HomePage => "https://danbooru.donmai.us";
|
||||
|
||||
public async Task<GalleryItem[]> GetRecentItemsAsync(int page)
|
||||
public override async Task<IEnumerable<GalleryItem>> GetRecentItemsAsync(int page)
|
||||
{
|
||||
var url = $"https://danbooru.donmai.us/posts?page={page}";
|
||||
var (result, error) = await NetHelper.RequestObject(url, @return: content => ResolveGalleryItems(content));
|
||||
@ -47,7 +48,8 @@ namespace Gallery.Sources.Danbooru
|
||||
Width = int.Parse(g[3].Value),
|
||||
Height = int.Parse(g[4].Value),
|
||||
UserId = g[6].Value,
|
||||
Source = g[7].Value,
|
||||
Source = Route,
|
||||
SourceUrl = g[7].Value,
|
||||
RawUrl = g[8].Value,
|
||||
PreviewUrl = g[9].Value
|
||||
};
|
||||
@ -55,12 +57,12 @@ namespace Gallery.Sources.Danbooru
|
||||
return items;
|
||||
}
|
||||
|
||||
public void SetCookie()
|
||||
public override void SetCookie()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InitDynamicResources(string family, ResourceDictionary light, ResourceDictionary dark)
|
||||
public override void InitDynamicResources(string family, ResourceDictionary light, ResourceDictionary dark)
|
||||
{
|
||||
var icon = new FontImageSource
|
||||
{
|
||||
|
Reference in New Issue
Block a user