merged upstream/dev

This commit is contained in:
Ritvik Saraf 2018-12-20 08:51:44 +05:30
commit f19cfb75e6
64 changed files with 8191 additions and 1871 deletions

View file

@ -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 {