mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-05 14:53:02 +00:00
Retry get track to cache and mark reused cache files
This commit is contained in:
parent
71ad1daf2b
commit
74b5f59684
@ -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 New Issue
Block a user