Jackett_Indexerr icon indicating copy to clipboard operation
Jackett_Indexerr copied to clipboard

Config file parser has issues with one-item lists

Open CplPwnies opened this issue 4 years ago • 3 comments

add_indexer.py fails to parse config file prefixes correctly when only one prefix is defined.

Example:

[sonarr] apikey = foo url = https://localhost/sonarr/api/ categoryprefixes = ['TV'] animecategoryprefixes = ['Anime', 'TV']

The fix I found is to add a comma after the first entry so the config file parser parses it as a list:

[sonarr] apikey = foo url = https://localhost/sonarr/api/ categoryprefixes = ['TV',] animecategoryprefixes = ['Anime', 'TV']

CplPwnies avatar May 27 '20 18:05 CplPwnies

Duplicate of #4

Guilhem23 avatar May 28 '20 09:05 Guilhem23

This isn't a duplicate. #4 deals with add_parser.py specifically. This one pertains to the config file parser library that is used in add_parser.py

CplPwnies avatar May 28 '20 09:05 CplPwnies

Looked twice at it... Ok It's a config parser issue

As long as we patch categories to be treated as single or multiple element fixing configparser may be avoided

Guilhem23 avatar May 28 '20 10:05 Guilhem23