File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -57,16 +57,15 @@ def fill_missing_details
57
57
info = Youtube ::Video . new ( url ) . get_information
58
58
59
59
if info . present?
60
- # Wait for stream to finish
61
- success = info [ "is_live" ] ? nil : !!info [ "id" ]
62
60
63
- if success && info [ 'extractor' ] == 'youtube'
61
+ if info [ "id" ] && info [ 'extractor' ] == 'youtube'
64
62
video = Youtube ::Video . from_id ( info [ "id" ] )
65
63
self . guid = video . guid
66
64
self . url = video . url
67
65
end
68
66
69
- self . reachable = success
67
+ # Wait for stream to finish
68
+ self . reachable = info [ "id" ] . present? && !info [ "is_live" ] || nil
70
69
self . author = info [ "uploader" ] || ''
71
70
self . title = [ info [ "is_live" ] && "[LIVE]" , feed &.title , info [ "title" ] ] . select ( &:present? ) . join ( " - " )
72
71
self . published_at = info [ "upload_date" ] && Date . parse ( info [ "upload_date" ] )
You can’t perform that action at this time.
0 commit comments