merged upstream/dev
This commit is contained in:
commit
f19cfb75e6
64 changed files with 8191 additions and 1871 deletions
|
|
@ -95,7 +95,8 @@ public class Downloader implements org.schabi.newpipe.extractor.Downloader {
|
|||
.build();
|
||||
response = client.newCall(request).execute();
|
||||
|
||||
return Long.parseLong(response.header("Content-Length"));
|
||||
String contentLength = response.header("Content-Length");
|
||||
return contentLength == null ? -1 : Long.parseLong(contentLength);
|
||||
} catch (NumberFormatException e) {
|
||||
throw new IOException("Invalid content length", e);
|
||||
} finally {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue