This repository was archived by the owner on Apr 3, 2025. It is now read-only.
File tree 11 files changed +18
-3
lines changed
11 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ abstract class LidarrAPI {
21
21
queryParameters: {
22
22
if (apiKey.isNotEmpty) 'apikey' : apiKey,
23
23
},
24
+ contentType: Headers .jsonContentType,
25
+ responseType: ResponseType .json,
24
26
));
25
27
return _LidarrAPI (dio, baseUrl: _baseUrl (host));
26
28
}
Original file line number Diff line number Diff line change 1
- import 'dart:convert' ;
2
- import 'package:dio/dio.dart' ;
3
1
import 'package:lunasea/api/nzbget/models/status.dart' ;
4
2
import 'package:lunasea/api/nzbget/models/version.dart' ;
5
- import 'package:retrofit/retrofit .dart' ;
3
+ import 'package:lunasea/vendor .dart' ;
6
4
7
5
part 'api.g.dart' ;
8
6
@@ -51,6 +49,8 @@ abstract class NZBGetAPI {
51
49
headers: headers,
52
50
followRedirects: true ,
53
51
maxRedirects: 5 ,
52
+ contentType: Headers .jsonContentType,
53
+ responseType: ResponseType .json,
54
54
));
55
55
_attachInterceptor (dio);
56
56
_setResponseTransformer (dio);
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ abstract class OverseerrAPI {
27
27
'X-Api-Key' : apiKey,
28
28
...headers,
29
29
},
30
+ contentType: Headers .jsonContentType,
31
+ responseType: ResponseType .json,
30
32
followRedirects: true ,
31
33
maxRedirects: 5 ,
32
34
),
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ class RadarrAPI {
68
68
headers: headers,
69
69
followRedirects: followRedirects,
70
70
maxRedirects: maxRedirects,
71
+ contentType: Headers .jsonContentType,
71
72
responseType: ResponseType .json,
72
73
),
73
74
);
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ abstract class SABnzbdAPI {
32
32
headers: headers,
33
33
followRedirects: true ,
34
34
maxRedirects: 5 ,
35
+ contentType: Headers .jsonContentType,
36
+ responseType: ResponseType .json,
35
37
queryParameters: {
36
38
if (apiKey.isNotEmpty) 'apikey' : apiKey,
37
39
'output' : 'json' ,
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ class SonarrAPI {
36
36
queryParameters: {
37
37
'apikey' : apiKey,
38
38
},
39
+ contentType: Headers .jsonContentType,
39
40
responseType: ResponseType .json,
40
41
headers: headers,
41
42
followRedirects: followRedirects,
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ class TautulliAPI {
51
51
queryParameters: {
52
52
'apikey' : apiKey,
53
53
},
54
+ contentType: Headers .jsonContentType,
54
55
responseType: ResponseType .json,
55
56
headers: headers,
56
57
followRedirects: followRedirects,
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ class API {
48
48
'start' : _startDate (today),
49
49
'end' : _endDate (today),
50
50
},
51
+ contentType: Headers .jsonContentType,
51
52
responseType: ResponseType .json,
52
53
headers: profile.lidarrHeaders,
53
54
followRedirects: true ,
@@ -92,6 +93,7 @@ class API {
92
93
'start' : _startDate (today),
93
94
'end' : _endDate (today),
94
95
},
96
+ contentType: Headers .jsonContentType,
95
97
responseType: ResponseType .json,
96
98
headers: profile.radarrHeaders,
97
99
followRedirects: true ,
@@ -147,6 +149,7 @@ class API {
147
149
'start' : _startDate (today),
148
150
'end' : _endDate (today),
149
151
},
152
+ contentType: Headers .jsonContentType,
150
153
responseType: ResponseType .json,
151
154
headers: profile.sonarrHeaders,
152
155
followRedirects: true ,
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ class LidarrAPI {
14
14
queryParameters: {
15
15
if (profile.lidarrKey != '' ) 'apikey' : profile.lidarrKey,
16
16
},
17
+ contentType: Headers .jsonContentType,
17
18
responseType: ResponseType .json,
18
19
headers: LunaProfile .current.lidarrHeaders,
19
20
followRedirects: true ,
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ class NZBGetAPI {
17
17
headers: profile.nzbgetHeaders,
18
18
followRedirects: true ,
19
19
maxRedirects: 5 ,
20
+ contentType: Headers .jsonContentType,
20
21
responseType: ResponseType .json,
21
22
),
22
23
);
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ class SABnzbdAPI {
18
18
headers: profile.sabnzbdHeaders,
19
19
followRedirects: true ,
20
20
maxRedirects: 5 ,
21
+ contentType: Headers .jsonContentType,
21
22
responseType: ResponseType .json,
22
23
),
23
24
);
You can’t perform that action at this time.
0 commit comments