mirror of
https://github.com/venera-app/venera.git
synced 2025-12-15 14:41:15 +00:00
Merge pull request #578 from 4b1tQu4ntN3k0/normalize-protocol-relative-urls
[linux] Fix linux nhentai cover image
This commit is contained in:
@@ -52,7 +52,11 @@ abstract class ImageDownloader {
|
||||
responseType: ResponseType.stream,
|
||||
));
|
||||
|
||||
var req = await dio.request<ResponseBody>(configs['url'] ?? url,
|
||||
String requestUrl = configs['url'] ?? url;
|
||||
if (requestUrl.startsWith('//')) {
|
||||
requestUrl = 'https:$requestUrl';
|
||||
}
|
||||
var req = await dio.request<ResponseBody>(requestUrl,
|
||||
data: configs['data']);
|
||||
var stream = req.data?.stream ?? (throw "Error: Empty response body.");
|
||||
int? expectedBytes = req.data!.contentLength;
|
||||
|
||||
Reference in New Issue
Block a user