mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-12-23 05:53:31 +02:00
Retry get track to cache and mark reused cache files
This commit is contained in:
parent
71ad1daf2b
commit
74b5f59684
1 changed files with 2 additions and 1 deletions
|
@ -32,10 +32,11 @@ function make_cache_track(url)
|
|||
if false == file_exists(cache_path_file) then
|
||||
createDir('cache/' .. host .. '/')
|
||||
msg.verbose('Caching ' .. cache_path_file .. '')
|
||||
os.execute('curl -s "' .. url .. '" -o "' .. cache_path_file .. '"')
|
||||
os.execute('curl -s --retry 3 "' .. url .. '" -o "' .. cache_path_file .. '"')
|
||||
mp.set_property("stream-open-filename", cache_path_file)
|
||||
else
|
||||
msg.verbose('Already cached ' .. cache_path_file .. '')
|
||||
os.execute('touch ' .. cache_path_file .. '')
|
||||
mp.set_property("stream-open-filename", cache_path_file)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue