Ability to start with a default category within `config.toml`

#38 · closed · 5 comments

View on GitHub ↗

brian6932

There'd need to be a delimiter, or an array, something like: ```toml category = ["Anime", "Sub", "English Translated"] ```

Comments

Beastwick18

This feature should already be present, [check this part of the wiki](https://github.com/Beastwick18/nyaa/wiki/Nyaa) for Nyaa. A basic example would be: ```toml [sources.nyaa] default_category = "AnimeEnglishTranslated" ``` Instead of being in a list, each category has a single ID. All possible category IDs for nyaa are [here](https://github.com/Beastwick18/nyaa/wiki/Nyaa#categories).

brian6932

Woops, my bad, completely missed that part of the wiki.

brian6932

After trying this, I'm not able to get it to work, other config settings work as expected. I tried both: ```toml [sources.nyaa] default_category = "AnimeEnglishTranslated" ``` and ```toml [sources.nyaa.categories] default_category = "AnimeEnglishTranslated" ``` ![](https://github.com/user-attachments/assets/01587b46-b191-4109-8db7-6aeea3ba6dbd) ``` ❯ nyaa -V nyaa v0.9.1 ```

Beastwick18

Whoops, that's my fault. The example I provided was wrong, this works on my config: ```toml [source.nyaa] default_category = "AnimeEnglishTranslated" ``` Should be `source`, not `sources`

brian6932

Yea that works.