YouTube_DL: Fehler, wenn Video entfernt wurde/nicht existiert
This commit is contained in:
parent
0cedb2f9c1
commit
cbc72d8fe0
@ -22,6 +22,7 @@ function youtube_dl:get_availabe_formats(id, hash)
|
||||
local ytdl_json = io.popen('youtube-dl -j https://www.youtube.com/watch/?v='..id):read('*all')
|
||||
if not ytdl_json then return end
|
||||
local data = json.decode(ytdl_json)
|
||||
if not data then return nil end
|
||||
|
||||
local available_formats = {}
|
||||
redis:hset(hash, 'duration', data.duration)
|
||||
|
Reference in New Issue
Block a user