make tags optional in shows.yaml
This commit is contained in:
parent
363838e466
commit
31e1b6302a
|
@ -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:
|
the list of shows the bot should take screencaps from is read from a YAML file with the following structure:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
Char's Counterattack:
|
||||||
|
path: /home/user/media/Gundam_CCA.mkv
|
||||||
Gundam 0079:
|
Gundam 0079:
|
||||||
path: /home/user/media/Mobile Suit Gundam 0079/
|
path: /home/user/media/Mobile Suit Gundam 0079/
|
||||||
tags:
|
tags:
|
||||||
- MSG 0079
|
- MSG 0079
|
||||||
- "0079"
|
- "0079"
|
||||||
- First Gundam
|
- 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
|
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
|
containing numbered video files for each episode of a series. all of
|
||||||
the episodes must be directly inside the directory, the bot will not
|
the episodes must be directly inside the directory, the bot will not
|
||||||
traverse subdirectories to find files.
|
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.
|
||||||
|
|
|
@ -8,6 +8,7 @@ mod enumeration;
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
pub struct Show {
|
pub struct Show {
|
||||||
pub path: PathBuf,
|
pub path: PathBuf,
|
||||||
|
#[serde(default)]
|
||||||
pub tags: Vec<String>,
|
pub tags: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue