Skip to main content

BookContextDto

Book context for template and condition evaluation.

This structure provides a unified interface for evaluating templates and conditions against book data. It includes book-specific fields plus an embedded parent series context for cross-referencing.

Template Usage

In Handlebars templates, fields are accessible via:

  • {{type}} - Always "book"
  • {{bookId}} - Book UUID
  • {{seriesId}} - Parent series UUID
  • {{metadata.title}} - Book title
  • {{metadata.authors}} - Author array
  • {{externalIds.plugin:source.id}} - External ID from a source
  • {{customMetadata.myField}} - Custom metadata field
  • {{series.metadata.title}} - Parent series title (cross-reference)
bookIdstring<uuid>required

Book UUID

Example: 550e8400-e29b-41d4-a716-446655440001
customMetadataobject | nullnullable

Custom metadata fields (preserved as-is, no case transformation).

externalIds object

External IDs mapped by source name.

property name* ExternalIdContextDto

External ID context for template evaluation.

Represents an external ID from a metadata provider (plugin, comicinfo, etc.) in a simplified format suitable for template access.

hashstring | nullnullable

Metadata hash for change detection (if available)

idstringrequired

External ID value

Example: 12345
urlstring | nullnullable

External URL (if available)

Example: https://mangabaka.com/series/12345
fileFormatstringrequired

File format (e.g., "cbz", "epub", "pdf")

Example: epub
fileSizeinteger<int64>required

File size in bytes

Example: 52428800
libraryIdstring<uuid>required

Library UUID

Example: 550e8400-e29b-41d4-a716-446655440099
metadata object

Book metadata

authors object[]

Structured author information

  • Array [
  • namestringrequired

    Author name

    Example: Oda Eiichiro
    rolestring | nullnullable

    Role (e.g., "author", "artist", "editor")

    Example: author
    sortNamestring | nullnullable

    Sort name (e.g., "Lastname, Firstname")

    Example: Oda, Eiichiro
  • ]
  • authorsJsonLockboolean

    Whether authors_json is locked

    awards object[]

    Awards information

  • Array [
  • categorystring | nullnullable

    Award category (optional)

    Example: Best Novel
    namestringrequired

    Award name

    Example: Hugo Award
    wonboolean | nullnullable

    Whether the book won (vs nominated)

    Example: true
    yearinteger,null<int32>nullable

    Year awarded (optional)

    Example: 2015
  • ]
  • awardsJsonLockboolean

    Whether awards_json is locked

    blackAndWhiteboolean | nullnullable

    Whether the book is black and white

    Example: false
    blackAndWhiteLockboolean

    Whether black_and_white is locked

    bookTypestring | nullnullable

    Book type classification

    Example: novel
    bookTypeLockboolean

    Whether book_type is locked

    countinteger,null<int32>nullable

    Total count in series

    Example: 4
    countLockboolean

    Whether count is locked

    coverLockboolean

    Whether cover is locked

    customMetadataLockboolean

    Whether custom_metadata is locked

    dayinteger,null<int32>nullable

    Publication day (1-31)

    Example: 15
    dayLockboolean

    Whether day is locked

    editionstring | nullnullable

    Edition information

    Example: First Edition
    editionLockboolean

    Whether edition is locked

    externalLinks object[]

    External links for this book

  • Array [
  • externalIdstring | nullnullable

    External ID on the source (optional)

    Example: 123
    sourcestringrequired

    Source name (e.g., "mangadex", "myanimelist")

    Example: mangadex
    urlstringrequired

    URL to the external resource

    Example: https://mangadex.org/title/123
  • ]
  • formatDetailstring | nullnullable

    Format detail (e.g., "Trade Paperback")

    Example: Trade Paperback
    formatDetailLockboolean

    Whether format_detail is locked

    genrestring | nullnullable

    Genre (ComicInfo-style single genre field)

    Example: Science Fiction
    genreLockboolean

    Whether genre is locked

    genresstring[]

    Genre names for this book

    Example: ["Science Fiction","Adventure"]
    imprintstring | nullnullable

    Imprint (sub-publisher)

    Example: Broadway Books
    imprintLockboolean

    Whether imprint is locked

    isbnsstring | nullnullable

    ISBN(s)

    Example: 978-0553418026
    isbnsLockboolean

    Whether isbns is locked

    languageIsostring | nullnullable

    Language code (ISO format)

    Example: en
    languageIsoLockboolean

    Whether language_iso is locked

    mangaboolean | nullnullable

    Whether the book is manga format

    Example: false
    mangaLockboolean

    Whether manga is locked

    monthinteger,null<int32>nullable

    Publication month (1-12)

    Example: 2
    monthLockboolean

    Whether month is locked

    numbernumber,null<double>nullable

    Book number (e.g., issue/chapter number)

    Example: 1
    numberLockboolean

    Whether number is locked

    originalTitlestring | nullnullable

    Original title (for translated works)

    Example: 火星の人
    originalTitleLockboolean

    Whether original_title is locked

    originalYearinteger,null<int32>nullable

    Original publication year

    Example: 2011
    originalYearLockboolean

    Whether original_year is locked

    publisherstring | nullnullable

    Publisher name

    Example: Crown Publishing
    publisherLockboolean

    Whether publisher is locked

    seriesPositionnumber,null<double>nullable

    Position in a series

    Example: 1
    seriesPositionLockboolean

    Whether series_position is locked

    seriesTotalinteger,null<int32>nullable

    Total number of books in the series

    Example: 3
    seriesTotalLockboolean

    Whether series_total is locked

    subjectsstring[]

    Subject/topic tags

    Example: ["Science Fiction","Space Exploration"]
    subjectsLockboolean

    Whether subjects are locked

    subtitlestring | nullnullable

    Book subtitle

    Example: A Novel
    subtitleLockboolean

    Whether subtitle is locked

    summarystring | nullnullable

    Book summary/description

    Example: Astronaut Mark Watney is stranded on Mars...
    summaryLockboolean

    Whether summary is locked

    tagsstring[]

    Tag names for this book

    Example: ["mars","survival","space"]
    titlestring | nullnullable

    Book title

    Example: The Martian
    titleLockboolean

    Whether title is locked

    titleSortstring | nullnullable

    Custom sort name

    Example: Martian, The
    titleSortLockboolean

    Whether title_sort is locked

    translatorstring | nullnullable

    Translator name

    Example: John Smith
    translatorLockboolean

    Whether translator is locked

    volumeinteger,null<int32>nullable

    Volume number

    Example: 1
    volumeLockboolean

    Whether volume is locked

    yearinteger,null<int32>nullable

    Publication year

    Example: 2011
    yearLockboolean

    Whether year is locked

    pageCountinteger<int32>required

    Number of pages

    Example: 369
    series objectrequired

    Parent series context for cross-referencing

    bookCountinteger<int64>required

    Number of books in the series

    Example: 5
    customMetadataobject | nullnullable

    Custom metadata fields (preserved as-is, no case transformation). Can contain any JSON structure defined by the user.

    externalIds object

    External IDs mapped by source name. Keys are source identifiers (e.g., "plugin:mangabaka", "comicinfo").

    property name* ExternalIdContextDto

    External ID context for template evaluation.

    Represents an external ID from a metadata provider (plugin, comicinfo, etc.) in a simplified format suitable for template access.

    hashstring | nullnullable

    Metadata hash for change detection (if available)

    idstringrequired

    External ID value

    Example: 12345
    urlstring | nullnullable

    External URL (if available)

    Example: https://mangabaka.com/series/12345
    metadata object

    Series metadata

    ageRatinginteger,null<int32>nullable

    Age rating (e.g., 13, 16, 18)

    Example: 13
    ageRatingLockboolean

    Whether age_rating is locked

    alternateTitles object[]

    Alternate titles (e.g., Japanese, Romaji, English)

  • Array [
  • labelstringrequired

    Label for this alternate title (e.g., "Japanese", "Romaji")

    Example: Japanese
    titlestringrequired

    The alternate title text

    Example: ワンピース
  • ]
  • authors object[]

    Structured author information

  • Array [
  • namestringrequired

    Author name

    Example: Oda Eiichiro
    rolestring | nullnullable

    Role (e.g., "author", "artist", "editor")

    Example: author
    sortNamestring | nullnullable

    Sort name (e.g., "Lastname, Firstname")

    Example: Oda, Eiichiro
  • ]
  • authorsJsonLockboolean

    Whether authors_json is locked

    coverLockboolean

    Whether cover is locked

    customMetadataLockboolean

    Whether custom_metadata is locked

    externalLinks object[]

    External links to other sites

  • Array [
  • externalIdstring | nullnullable

    External ID on the source (optional)

    Example: 123
    sourcestringrequired

    Source name (e.g., "mangadex", "myanimelist")

    Example: mangadex
    urlstringrequired

    URL to the external resource

    Example: https://mangadex.org/title/123
  • ]
  • externalRatings object[]

    External ratings from various sources

  • Array [
  • ratingnumber<double>required

    Rating value (normalized to 0-100)

    Example: 85.5
    sourcestringrequired

    Source name (e.g., "myanimelist", "anilist")

    Example: myanimelist
    votesinteger,null<int32>nullable

    Number of votes (optional)

    Example: 12345
  • ]
  • genresstring[]

    Genre names

    Example: ["Action","Adventure","Comedy"]
    genresLockboolean

    Whether genres are locked

    imprintstring | nullnullable

    Imprint (sub-publisher)

    Example: Jump Comics
    imprintLockboolean

    Whether imprint is locked

    languagestring | nullnullable

    Language code (BCP47 format)

    Example: ja
    languageLockboolean

    Whether language is locked

    publisherstring | nullnullable

    Publisher name

    Example: Shueisha
    publisherLockboolean

    Whether publisher is locked

    readingDirectionstring | nullnullable

    Reading direction (ltr, rtl, ttb, webtoon)

    Example: rtl
    readingDirectionLockboolean

    Whether reading_direction is locked

    statusstring | nullnullable

    Series status (ongoing, ended, hiatus, abandoned, unknown)

    Example: ongoing
    statusLockboolean

    Whether status is locked

    summarystring | nullnullable

    Series description/summary

    Example: Follow Monkey D. Luffy on his adventure...
    summaryLockboolean

    Whether summary is locked

    tagsstring[]

    Tag names

    Example: ["pirates","treasure","friendship"]
    tagsLockboolean

    Whether tags are locked

    titlestring | nullnullable

    Series title

    Example: One Piece
    titleLockboolean

    Whether title is locked

    titleSortstring | nullnullable

    Custom sort name

    Example: One Piece
    titleSortLockboolean

    Whether title_sort is locked

    totalBookCountinteger,null<int32>nullable

    Expected total book count

    Example: 110
    totalBookCountLockboolean

    Whether total_book_count is locked

    yearinteger,null<int32>nullable

    Publication year

    Example: 1997
    yearLockboolean

    Whether year is locked

    seriesIdstring,null<uuid>nullable

    Series UUID

    Example: 550e8400-e29b-41d4-a716-446655440000
    typestringrequired

    Type discriminator — always "series" for SeriesContextDto

    Example: series
    seriesIdstring<uuid>required

    Parent series UUID

    Example: 550e8400-e29b-41d4-a716-446655440000
    typestringrequired

    Type discriminator — always "book" for BookContextDto

    Example: book
    BookContextDto
    {
    "bookId": "550e8400-e29b-41d4-a716-446655440001",
    "customMetadata": "Unknown Type: object,null",
    "externalIds": {
    "plugin:goodreads": {
    "id": "18007564",
    "url": "https://goodreads.com/book/show/18007564"
    }
    },
    "fileFormat": "epub",
    "fileSize": 52428800,
    "libraryId": "550e8400-e29b-41d4-a716-446655440099",
    "metadata": {
    "authors": [
    {
    "name": "Oda Eiichiro",
    "role": "author",
    "sortName": "Oda, Eiichiro"
    }
    ],
    "authorsJsonLock": true,
    "awards": [
    {
    "category": "Best Novel",
    "name": "Hugo Award",
    "won": true,
    "year": 2015
    }
    ],
    "awardsJsonLock": true,
    "blackAndWhite": false,
    "blackAndWhiteLock": true,
    "bookType": "novel",
    "bookTypeLock": true,
    "count": 4,
    "countLock": true,
    "coverLock": true,
    "customMetadataLock": true,
    "day": 15,
    "dayLock": true,
    "edition": "First Edition",
    "editionLock": true,
    "externalLinks": [
    {
    "externalId": "123",
    "source": "mangadex",
    "url": "https://mangadex.org/title/123"
    }
    ],
    "formatDetail": "Trade Paperback",
    "formatDetailLock": true,
    "genre": "Science Fiction",
    "genreLock": true,
    "genres": [
    "Science Fiction",
    "Adventure"
    ],
    "imprint": "Broadway Books",
    "imprintLock": true,
    "isbns": "978-0553418026",
    "isbnsLock": true,
    "languageIso": "en",
    "languageIsoLock": true,
    "manga": false,
    "mangaLock": true,
    "month": 2,
    "monthLock": true,
    "number": 1,
    "numberLock": true,
    "originalTitle": "火星の人",
    "originalTitleLock": true,
    "originalYear": 2011,
    "originalYearLock": true,
    "publisher": "Crown Publishing",
    "publisherLock": true,
    "seriesPosition": 1,
    "seriesPositionLock": true,
    "seriesTotal": 3,
    "seriesTotalLock": true,
    "subjects": [
    "Science Fiction",
    "Space Exploration"
    ],
    "subjectsLock": true,
    "subtitle": "A Novel",
    "subtitleLock": true,
    "summary": "Astronaut Mark Watney is stranded on Mars...",
    "summaryLock": true,
    "tags": [
    "mars",
    "survival",
    "space"
    ],
    "title": "The Martian",
    "titleLock": true,
    "titleSort": "Martian, The",
    "titleSortLock": true,
    "translator": "John Smith",
    "translatorLock": true,
    "volume": 1,
    "volumeLock": true,
    "year": 2011,
    "yearLock": true
    },
    "pageCount": 369,
    "series": {
    "bookCount": 5,
    "customMetadata": "Unknown Type: object,null",
    "externalIds": {
    "plugin:mangabaka": {
    "id": "12345",
    "url": "https://mangabaka.com/series/12345"
    }
    },
    "metadata": {
    "ageRating": 13,
    "ageRatingLock": true,
    "alternateTitles": [
    {
    "label": "Japanese",
    "title": "ワンピース"
    }
    ],
    "authors": [
    {
    "name": "Oda Eiichiro",
    "role": "author",
    "sortName": "Oda, Eiichiro"
    }
    ],
    "authorsJsonLock": true,
    "coverLock": true,
    "customMetadataLock": true,
    "externalLinks": [
    {
    "externalId": "123",
    "source": "mangadex",
    "url": "https://mangadex.org/title/123"
    }
    ],
    "externalRatings": [
    {
    "rating": 85.5,
    "source": "myanimelist",
    "votes": 12345
    }
    ],
    "genres": [
    "Action",
    "Adventure",
    "Comedy"
    ],
    "genresLock": true,
    "imprint": "Jump Comics",
    "imprintLock": true,
    "language": "ja",
    "languageLock": true,
    "publisher": "Shueisha",
    "publisherLock": true,
    "readingDirection": "rtl",
    "readingDirectionLock": true,
    "status": "ongoing",
    "statusLock": true,
    "summary": "Follow Monkey D. Luffy on his adventure...",
    "summaryLock": true,
    "tags": [
    "pirates",
    "treasure",
    "friendship"
    ],
    "tagsLock": true,
    "title": "One Piece",
    "titleLock": true,
    "titleSort": "One Piece",
    "titleSortLock": true,
    "totalBookCount": 110,
    "totalBookCountLock": true,
    "year": 1997,
    "yearLock": true
    },
    "seriesId": "550e8400-e29b-41d4-a716-446655440000",
    "type": "series"
    },
    "seriesId": "550e8400-e29b-41d4-a716-446655440000",
    "type": "book"
    }