From 9c49b349785eea14e29a489b3f78784c659316f8 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 1 May 2025 14:59:30 -0300 Subject: data: CommentaryEntry.isWikiEditorCommentary, etc Also: LyricsEntry.isWikiLyrics Also: hasAnnotationPart --- src/data/things/content.js | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'src/data/things') diff --git a/src/data/things/content.js b/src/data/things/content.js index 660d7020..91da2248 100644 --- a/src/data/things/content.js +++ b/src/data/things/content.js @@ -15,8 +15,12 @@ import { withResultOfAvailabilityCheck, } from '#composite/control-flow'; -import {withAnnotationParts, withSourceText, withWebArchiveDate} - from '#composite/things/content'; +import { + hasAnnotationPart, + withAnnotationParts, + withSourceText, + withWebArchiveDate, +} from '#composite/things/content'; export class ContentEntry extends Thing { static [Thing.getPropertyDescriptors] = ({Artist}) => ({ @@ -134,6 +138,24 @@ export class ContentEntry extends Thing { }; } -export class CommentaryEntry extends ContentEntry {} -export class LyricsEntry extends ContentEntry {} +export class CommentaryEntry extends ContentEntry { + static [Thing.getPropertyDescriptors] = () => ({ + // Expose only + + isWikiEditorCommentary: hasAnnotationPart({ + part: input.value('wiki editor'), + }), + }); +} + +export class LyricsEntry extends ContentEntry { + static [Thing.getPropertyDescriptors] = () => ({ + // Expose only + + isWikiLyrics: hasAnnotationPart({ + part: input.value('wiki lyrics'), + }), + }); +} + export class CreditingSourcesEntry extends ContentEntry {} -- cgit 1.3.0-6-gf8a5