From 11111d83f1ffb9b48a6a1356f7a9e30d53be8e4b Mon Sep 17 00:00:00 2001 From: lifegpc Date: Sat, 16 Jul 2022 01:08:42 +0000 Subject: [PATCH] Fix fanbox author name not filterd --- src/data/fanbox.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/data/fanbox.rs b/src/data/fanbox.rs index 08575b1..75489de 100644 --- a/src/data/fanbox.rs +++ b/src/data/fanbox.rs @@ -1,6 +1,8 @@ #[cfg(feature = "exif")] use super::exif::ExifDataSource; use crate::fanbox::post::FanboxPost; +use crate::opt::author_name_filter::AuthorFiler; +use crate::opthelper::get_helper; use crate::pixiv_link::PixivID; use crate::pixiv_link::ToPixivID; use json::JsonValue; @@ -50,9 +52,28 @@ impl ExifDataSource for FanboxData { return None; } }, + image_author, image_id, ); + fn image_author(&self) -> Option { + match (match &self.exif_data { + Some(d) => d, + None => { + return None; + } + }) + .image_author() + { + Some(a) => match get_helper().author_name_filters() { + Some(filters) => Some(filters.filter(&a)), + None => Some(a), + }, + None => None, + } + } + + #[inline] fn image_id(&self) -> Option { Some(self.id.to_link()) }