Never mark Youtube videos as 'Forbidden or Private' since 403 errors are most likely from API throttling. #2327
This commit is contained in:
parent
905e619629
commit
17575a285f
@ -215,7 +215,7 @@ Embedding =
|
|||||||
title: (req, data) ->
|
title: (req, data) ->
|
||||||
return unless req.status
|
return unless req.status
|
||||||
|
|
||||||
{key, uid} = data
|
{key, uid, link} = data
|
||||||
{status} = req
|
{status} = req
|
||||||
service = Embedding.types[key].title
|
service = Embedding.types[key].title
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ Embedding =
|
|||||||
when 404
|
when 404
|
||||||
text = "Not Found"
|
text = "Not Found"
|
||||||
when 403
|
when 403
|
||||||
text = "Forbidden or Private"
|
text = if service.ignore403 then link.textContent else "Forbidden or Private"
|
||||||
else
|
else
|
||||||
text = "#{status}'d"
|
text = "#{status}'d"
|
||||||
Embedding.cb.titleText text, data
|
Embedding.cb.titleText text, data
|
||||||
@ -539,6 +539,7 @@ Embedding =
|
|||||||
el
|
el
|
||||||
title:
|
title:
|
||||||
batchSize: 50
|
batchSize: 50
|
||||||
|
ignore403: true
|
||||||
api: (uids) ->
|
api: (uids) ->
|
||||||
ids = encodeURIComponent uids.join(',')
|
ids = encodeURIComponent uids.join(',')
|
||||||
key = '<%= meta.youtubeAPIKey %>'
|
key = '<%= meta.youtubeAPIKey %>'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user