From 31574e15c6d4761cafb69a07ce32acc12968c52c Mon Sep 17 00:00:00 2001 From: Eigeen Date: Wed, 11 Sep 2024 00:03:39 +0800 Subject: [PATCH] Use 'director' tags as artist display if 'artist' tags not found. In e6ai.net, there are only Directors and not Artists. In the current version, if users view post details or download pictures, the information will not be displayed. Since the director label category does not exist on other sites, it can be considered that it has no impact on other sites. --- lib/post/data/download.dart | 2 +- lib/post/widgets/detail/widgets/artist.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/post/data/download.dart b/lib/post/data/download.dart index bd941434e..e1bced805 100644 --- a/lib/post/data/download.dart +++ b/lib/post/data/download.dart @@ -106,7 +106,7 @@ extension PostDownloading on Post { String _downloadName() { String filename = ''; - List artists = filterArtists(tags['artist'] ?? []); + List artists = filterArtists(tags['artist'] ?? tags['director'] ?? []); if (artists.isNotEmpty) { filename = '${artists.join(', ')} - '; } diff --git a/lib/post/widgets/detail/widgets/artist.dart b/lib/post/widgets/detail/widgets/artist.dart index e0d3b20c5..ec3b39659 100644 --- a/lib/post/widgets/detail/widgets/artist.dart +++ b/lib/post/widgets/detail/widgets/artist.dart @@ -84,7 +84,7 @@ class ArtistName extends StatelessWidget { context.select>>( (value) => value?.value?.tags ?? post.tags); - List artists = filterArtists((tags)['artist'] ?? []); + List artists = filterArtists((tags)['artist'] ?? (tags)['director'] ?? []); if (artists.isNotEmpty) { return OverflowBar( children: [