mirror of
https://github.com/oskvr37/tiddl.git
synced 2026-06-13 04:05:08 +03:00
✨ Added album.release template
This commit is contained in:
+2
-1
@@ -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 |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user