Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Better offline cache checking, prefetch url to cache and set source compatability#61

Closed
jarrodholliday wants to merge 19 commits into
danikula:masterdanikula/AndroidVideoCache:masterfrom
jarrodholliday:masterCopy head branch name to clipboard
Closed

Better offline cache checking, prefetch url to cache and set source compatability#61
jarrodholliday wants to merge 19 commits into
danikula:masterdanikula/AndroidVideoCache:masterfrom
jarrodholliday:masterCopy head branch name to clipboard

Conversation

@jarrodholliday

Copy link
Copy Markdown

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.

@elphinkuo

Copy link
Copy Markdown

I think this modify is excellent, fix my problems well!

And Jarrod, how can i list all the cached file`s initial URL?

@jarrodholliday

Copy link
Copy Markdown
Author

@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.
Just switch the dependency to
compile 'com.github.jarrodholliday:videocache:2.3.7'

@jarrodholliday jarrodholliday changed the title Better offline cache checking Better offline cache checking, prefetch url to cache and set source compatability Mar 11, 2016
@elphinkuo

Copy link
Copy Markdown

Thank you Jarrod

@moxiaohu

Copy link
Copy Markdown

Thanks jarrodholliday , this helps a lot!

@danikula

Copy link
Copy Markdown
Owner

@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.
If you want to merge you solution please take into account my comment and make new PR.

Anyway thanks for contribution! 👍

@danikula danikula closed this Jul 27, 2016
@jarrodholliday

Copy link
Copy Markdown
Author

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

@danikula

Copy link
Copy Markdown
Owner

@jarrodholliday Your fork contains a lot useful stuff. Hope with your help I'll merge into original repo the best fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.