jazzband / django-embed-video

Django app for easy embedding YouTube and Vimeo videos and music from SoundCloud.
http://django-embed-video.rtfd.org
MIT License
383 stars 137 forks source link

Add setting EMBED_VIDEO_YOUTUBE_CHECK_THUMBNAIL #177

Closed eagleoflqj closed 2 years ago

eagleoflqj commented 2 years ago

Closes #176

Changes and docs are updated.

Unit test is added.

I tested performance locally. With it set to False, a page with 2 youtube videos responses within 10ms, while by default it's more than 1s.

Ref: https://developers.google.com/youtube/v3/docs/thumbnails

aleksihakli commented 2 years ago

LGTM!

codecov[bot] commented 2 years ago

Codecov Report

Merging #177 (a6a757f) into master (f20cb8f) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #177      +/-   ##
==========================================
+ Coverage   98.89%   98.91%   +0.01%     
==========================================
  Files          17       17              
  Lines         634      643       +9     
  Branches       69       70       +1     
==========================================
+ Hits          627      636       +9     
  Misses          4        4              
  Partials        3        3              
Impacted Files Coverage Δ
embed_video/backends.py 97.46% <100.00%> (+0.03%) :arrow_up:
embed_video/settings.py 100.00% <100.00%> (ø)
embed_video/tests/backends/tests_youtube.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f20cb8f...a6a757f. Read the comment docs.

aleksihakli commented 2 years ago

Released in version 1.4.4.