Added album.release template

This commit is contained in:
Oskar Dudziński
2025-11-21 22:16:38 +01:00
parent 9a73fc33be
commit 97f3fed079
2 changed files with 12 additions and 9 deletions
+2 -1
View File
@@ -52,7 +52,7 @@ Each object type exposes fields you can use inside templates.
### `album`
| Field | Description | Example | Type |
| -------------------- | ----------------------------------- | ------------ | -------- |
| -------------------- | ----------------------------------- | ----------------- | -------- |
| `album.id` | Album ID | `98765` | int |
| `album.title` | Album title | `Discovery` | str |
| `album.artist` | Primary artist | `Daft Punk` | str |
@@ -60,6 +60,7 @@ Each object type exposes fields you can use inside templates.
| `album.date` | Release date | `2001-03-13` | datetime |
| `album.explicit` | Explicit content | `clean` | str |
| `album.master:[MAX]` | Is album max quality (`UserFormat`) | `[MAX]` | str |
| `album.release` | Release type | `ALBUM/EP/SINGLE` | str |
---
+2
View File
@@ -52,6 +52,7 @@ class AlbumTemplate:
date: datetime
explicit: Explicit
master: UserFormat
release: str
@dataclass(slots=True)
@@ -147,6 +148,7 @@ def generate_template_data(
master=UserFormat(
"HIRES_LOSSLESS" in album.mediaMetadata.tags and quality == "MAX"
),
release=album.type,
)
playlist_template = None