From 63ee20f93c27acdd700be77ab731490a51e10b1f Mon Sep 17 00:00:00 2001 From: Alexey Danilov Date: Fri, 25 Sep 2015 17:07:46 +0300 Subject: [PATCH] fix offline work --- README.md | 6 ++++-- library/build.gradle | 2 +- .../main/java/com/danikula/videocache/HttpUrlSource.java | 2 +- sample/build.gradle | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9f87aee..77070ce 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ repositories { maven { url 'https://dl.bintray.com/alexeydanilov/maven' } } dependencies { - compile 'com.danikula:videocache:2.1.1' + compile 'com.danikula:videocache:2.1.2' } ``` @@ -59,7 +59,9 @@ More preferable way is use some dependency injector like [Dagger](http://square. See `sample` app for details. ## Whats new -### 2.1 +### 2.1.2 +- fix offline work +### 2.1.1 - fix for too long cache file name - url redirects support (thanks [ongakuer](https://github.com/ongakuer) for [PR](https://github.com/danikula/AndroidVideoCache/pull/12)) diff --git a/library/build.gradle b/library/build.gradle index cda2891..7c64ea2 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -26,7 +26,7 @@ publish { userOrg = 'alexeydanilov' groupId = 'com.danikula' artifactId = 'videocache' - publishVersion = '2.1.1' + publishVersion = '2.1.2' description = 'Cache support for android VideoView' website = 'https://github.com/danikula/AndroidVideoCache' } diff --git a/library/src/main/java/com/danikula/videocache/HttpUrlSource.java b/library/src/main/java/com/danikula/videocache/HttpUrlSource.java index 601a35d..a8ec0da 100644 --- a/library/src/main/java/com/danikula/videocache/HttpUrlSource.java +++ b/library/src/main/java/com/danikula/videocache/HttpUrlSource.java @@ -99,7 +99,7 @@ private void fetchContentInfo() throws ProxyCacheException { inputStream = urlConnection.getInputStream(); Log.i(LOG_TAG, "Content info for `" + url + "`: mime: " + mime + ", content-length: " + available); } catch (IOException e) { - throw new ProxyCacheException("Error fetching Content-Length from " + url); + Log.e(LOG_TAG, "Error fetching info from " + url, e); } finally { ProxyCacheUtils.close(inputStream); if (urlConnection != null) { diff --git a/sample/build.gradle b/sample/build.gradle index f475771..e36776b 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -39,7 +39,7 @@ dependencies { // compile project(':library') compile 'com.android.support:support-v4:23.0.1' compile 'org.androidannotations:androidannotations-api:3.3.2' - compile 'com.danikula:videocache:2.1.1' + compile 'com.danikula:videocache:2.1.2' compile 'com.viewpagerindicator:library:2.4.2-SNAPSHOT@aar' apt 'org.androidannotations:androidannotations:3.3.2' }