make tags optional in shows.yaml

This commit is contained in:
xenofem 2023-07-01 23:23:30 -04:00
parent 363838e466
commit 31e1b6302a
2 changed files with 4 additions and 6 deletions

View file

@ -33,17 +33,14 @@ directory:
the list of shows the bot should take screencaps from is read from a YAML file with the following structure:
```yaml
Char's Counterattack:
path: /home/user/media/Gundam_CCA.mkv
Gundam 0079:
path: /home/user/media/Mobile Suit Gundam 0079/
tags:
- MSG 0079
- "0079"
- First Gundam
Char's Counterattack:
path: /home/user/media/Gundam_CCA.mkv
tags:
- Char's Counterattack
- "Mobile Suit Gundam: Char's Counterattack"
```
each top-level key is a show title, which will be used in spoiler
@ -53,4 +50,4 @@ warnings on posts and in image alt text. each show has two keys:
containing numbered video files for each episode of a series. all of
the episodes must be directly inside the directory, the bot will not
traverse subdirectories to find files.
- `tags`: a list of tags to put on posts from this show.
- `tags`: an optional list of tags to put on posts from this show.

View file

@ -8,6 +8,7 @@ mod enumeration;
#[derive(Deserialize)]
pub struct Show {
pub path: PathBuf,
#[serde(default)]
pub tags: Vec<String>,
}