fix(Search): Indexer would not open when headers map was null

This commit is contained in:
Jagandeep Brar
2021-04-26 10:00:32 -05:00
parent 9734c359d2
commit c6a72dbbb5

View File

@@ -18,7 +18,7 @@ class NewznabAPI {
baseUrl: '${indexer.host}/api',
headers: {
'User-Agent': _USER_AGENT,
...indexer.headers,
if (indexer.headers?.isNotEmpty ?? false) ...indexer.headers,
},
queryParameters: {
if (indexer.apiKey != '') 'apikey': indexer.apiKey,