Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it harmless to call download() many times? #28

Open
smhk opened this issue Dec 10, 2019 · 6 comments
Open

Is it harmless to call download() many times? #28

smhk opened this issue Dec 10, 2019 · 6 comments

Comments

@smhk
Copy link

smhk commented Dec 10, 2019

Say at 11:11:07.0 I call x.download()

Say that will take about three seconds to reach playerItemReadyToPlay and 10 seconds to fully download.

At 11:11:08.0 I call x.download() again

  1. is this completely harmless ?

  2. Does it know it is already doing x ?

thanks! @neekeetab - amazing library, the best

@zoink
Copy link

zoink commented Jan 8, 2020

+1

@neekeetab
Copy link
Owner

Calling download when there’s already a file loading has no effect

@zoink
Copy link

zoink commented Jan 9, 2020 via email

@neekeetab
Copy link
Owner

It will not be downloaded again. When loading is complete, delegate's playerItem(_ playerItem: CachingPlayerItem, didFinishDownloadingData data: Data) is called

@zoink
Copy link

zoink commented Jan 9, 2020 via email

@auro-krishna
Copy link

Is there any way I can check whether my file is present in the cached list? and also I wanted to clear the memory when total memory consumption is more

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

No branches or pull requests

4 participants