Better offline cache checking, prefetch url to cache and set source compatability#61
Better offline cache checking, prefetch url to cache and set source compatability#61jarrodholliday wants to merge 19 commits intodanikula:masterdanikula/AndroidVideoCache:masterfrom jarrodholliday:masterCopy head branch name to clipboard
Conversation
…creation. Signed-off-by: Bogdan Stanga <bogdydaci@gmail.com>
…m the server for true offline cache.
|
I think this modify is excellent, fix my problems well! And Jarrod, how can i list all the cached file`s initial URL? |
|
@elphinkuo As of right now I'm not sure on how to list all the cached file's URLs. When I get some free time this weekend I'll look into it. Also if you want to use my changes to the library I made them available on bintray so I don't have to include a library project. |
|
Thank you Jarrod |
…io exception stuff.
…dVideoCache In order to get file delete listener
…when testing ping to the proxy. # Conflicts: # library/src/main/java/com/danikula/videocache/HttpProxyCacheServer.java
|
Thanks jarrodholliday , this helps a lot! |
# Conflicts: # build.gradle
…wrong while pre-fetching.
|
@jarrodholliday thanks for your contribution. It seems this PR resolves same problem with help of same method. But It looks much pretty. Your PR should contain single commit that resolves concrete problem. So have to decline your PR. This PR looks more promising. Sorry. Anyway thanks for contribution! 👍 |
|
@danikula Yea I screwed up and made the PR off of master and continued to do work. When I get back from vacation I'll take a look at your comment. |
|
@jarrodholliday Your fork contains a lot useful stuff. Hope with your help I'll merge into original repo the best fixes. |
If the cache is completed exit early and don't compare file sizes from the server for true offline cache.
Was running into situations where there was no connectivity, wifi or cellular data, and the library still tries to check the length of the file on the server. If the cache is already marked completed we should exit early and use the cached file.
Since I forgot to make a separate branch for this pull request some of the other stuff I did is in here too.
Added a function to prefetch a url into cache without having to start it up in a VideoView or media player.
Since I'm using Java8 for RetroLambda the library needed source compatibility set since Java8 was throwing errors building it.