Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: refactor video highlighting, fix videos not getting highlighted in add previews #1778

Merged
merged 8 commits into from
Jul 4, 2024

Conversation

dyc3
Copy link
Owner

@dyc3 dyc3 commented May 25, 2024

For better UX when copying links from youtube playlists, OTT is supposed to highlight the video that is in the link, while still fetching the playlist, if possible. This PR fixes that, and refactors the feature to make it a little more reliable.

fixes #1777

@dyc3 dyc3 marked this pull request as draft May 25, 2024 21:32
Copy link

github-actions bot commented May 25, 2024

Bundle size diff

diff -u /tmp/bundle-size-base.txt/bundle-size.txt /tmp/bundle-size-head.txt/bundle-size.txt
--- /tmp/bundle-size-base.txt/bundle-size.txt	2024-06-20 22:30:45.467632921 +0000
+++ /tmp/bundle-size-head.txt/bundle-size.txt	2024-06-20 22:30:46.023635977 +0000
@@ -30,19 +30,19 @@
 �[2mdist/�[22m�[2massets/�[22m�[36mAttribution-hash.js                        �[39m�[1m�[2m    0.34 kB�[22m�[1m�[22m�[2m │ gzip:   0.26 kB�[22m
 �[2mdist/�[22m�[2massets/�[22m�[36mNotFound-hash.js                           �[39m�[1m�[2m    0.60 kB�[22m�[1m�[22m�[2m │ gzip:   0.32 kB�[22m
 �[2mdist/�[22m�[2massets/�[22m�[36mplaceholder-hash.js                        �[39m�[1m�[2m    1.04 kB�[22m�[1m�[22m�[2m │ gzip:   0.48 kB�[22m
-�[2mdist/�[22m�[2massets/�[22m�[36mPasswordReset-hash.js                      �[39m�[1m�[2m    2.00 kB�[22m�[1m�[22m�[2m │ gzip:   0.96 kB�[22m
+�[2mdist/�[22m�[2massets/�[22m�[36mPasswordReset-hash.js                      �[39m�[1m�[2m    2.00 kB�[22m�[1m�[22m�[2m │ gzip:   0.95 kB�[22m
 �[2mdist/�[22m�[2massets/�[22m�[36mRoomList-hash.js                           �[39m�[1m�[2m    2.31 kB�[22m�[1m�[22m�[2m │ gzip:   1.08 kB�[22m
 �[2mdist/�[22m�[2massets/�[22m�[36mPrivacy-hash.js                            �[39m�[1m�[2m    2.64 kB�[22m�[1m�[22m�[2m │ gzip:   1.29 kB�[22m
 �[2mdist/�[22m�[2massets/�[22m�[36mHome-hash.js                               �[39m�[1m�[2m    5.43 kB�[22m�[1m�[22m�[2m │ gzip:   1.34 kB�[22m
-�[2mdist/�[22m�[2massets/�[22m�[36mYoutubePlayer-hash.js                      �[39m�[1m�[2m    5.86 kB�[22m�[1m�[22m�[2m │ gzip:   2.22 kB�[22m
+�[2mdist/�[22m�[2massets/�[22m�[36mYoutubePlayer-hash.js                      �[39m�[1m�[2m    5.86 kB�[22m�[1m�[22m�[2m │ gzip:   2.21 kB�[22m
 �[2mdist/�[22m�[2massets/�[22m�[36mde-hash.js                                 �[39m�[1m�[2m   10.79 kB�[22m�[1m�[22m�[2m │ gzip:   4.49 kB�[22m
-�[2mdist/�[22m�[2massets/�[22m�[36mfr-hash.js                                 �[39m�[1m�[2m   11.59 kB�[22m�[1m�[22m�[2m │ gzip:   4.79 kB�[22m
+�[2mdist/�[22m�[2massets/�[22m�[36mfr-hash.js                                 �[39m�[1m�[2m   11.59 kB�[22m�[1m�[22m�[2m │ gzip:   4.78 kB�[22m
 �[2mdist/�[22m�[2massets/�[22m�[36mru-hash.js                                 �[39m�[1m�[2m   12.40 kB�[22m�[1m�[22m�[2m │ gzip:   6.42 kB�[22m
-�[2mdist/�[22m�[2massets/�[22m�[36mes-hash.js                                 �[39m�[1m�[2m   14.05 kB�[22m�[1m�[22m�[2m │ gzip:   5.98 kB�[22m
+�[2mdist/�[22m�[2massets/�[22m�[36mes-hash.js                                 �[39m�[1m�[2m   14.05 kB�[22m�[1m�[22m�[2m │ gzip:   5.97 kB�[22m
 �[2mdist/�[22m�[2massets/�[22m�[36mPeertubePlayer-hash.js                     �[39m�[1m�[2m   16.35 kB�[22m�[1m�[22m�[2m │ gzip:   5.54 kB�[22m
-�[2mdist/�[22m�[2massets/�[22m�[36mVimeoPlayer-hash.js                        �[39m�[1m�[2m   39.99 kB�[22m�[1m�[22m�[2m │ gzip:  12.53 kB�[22m
-�[2mdist/�[22m�[2massets/�[22m�[36mRoom-hash.js                               �[39m�[1m�[2m  164.14 kB�[22m�[1m�[22m�[2m │ gzip:  51.45 kB�[22m
+�[2mdist/�[22m�[2massets/�[22m�[36mVimeoPlayer-hash.js                        �[39m�[1m�[2m   39.99 kB�[22m�[1m�[22m�[2m │ gzip:  12.52 kB�[22m
+�[2mdist/�[22m�[2massets/�[22m�[36mRoom-hash.js                               �[39m�[1m�[2m  164.20 kB�[22m�[1m�[22m�[2m │ gzip:  51.45 kB�[22m
 �[2mdist/�[22m�[2massets/�[22m�[36mGoogleDrivePlayer-hash.js                  �[39m�[1m�[33m  604.87 kB�[39m�[22m�[2m │ gzip: 173.51 kB�[22m
-�[2mdist/�[22m�[2massets/�[22m�[36mindex-hash.js                              �[39m�[1m�[33m  743.54 kB�[39m�[22m�[2m │ gzip: 248.17 kB�[22m
+�[2mdist/�[22m�[2massets/�[22m�[36mindex-hash.js                              �[39m�[1m�[33m  743.54 kB�[39m�[22m�[2m │ gzip: 248.18 kB�[22m
 �[2mdist/�[22m�[2massets/�[22m�[36mPlyrPlayer-hash.js                         �[39m�[1m�[33m1,280.78 kB�[39m�[22m�[2m │ gzip: 379.36 kB�[22m
-�[32m✓ built in 25.65s�[39m
+�[32m✓ built in 25.14s�[39m

Copy link

cypress bot commented May 25, 2024

Passing run #1986 ↗︎

0 57 1 0 Flakiness 0

Details:

Merge aa69801 into c196bd3...
Project: OpenTogetherTube Commit: d9487fbf06 ℹ️
Status: Passed Duration: 02:59 💡
Started: Jun 20, 2024 10:29 PM Ended: Jun 20, 2024 10:32 PM

Review all test suite changes for PR #1778 ↗︎

@dyc3 dyc3 force-pushed the fix-highlighted-vids branch 2 times, most recently from 4f972eb to 1700df9 Compare May 26, 2024 18:53
@dyc3
Copy link
Owner Author

dyc3 commented Jun 20, 2024

I've just tested this and it should be good to go.

@dyc3 dyc3 marked this pull request as ready for review June 20, 2024 22:27
@dyc3 dyc3 force-pushed the fix-highlighted-vids branch from 1700df9 to aa69801 Compare June 20, 2024 22:28
Copy link

codecov bot commented Jul 4, 2024

Codecov Report

Attention: Patch coverage is 54.11765% with 39 lines in your changes missing coverage. Please review.

Project coverage is 62.8135%. Comparing base (c196bd3) to head (aa69801).
Report is 2 commits behind head on master.

Files Patch % Lines
server/infoextractor.ts 23.4042% 36 Missing ⚠️
server/services/youtube.ts 92.3076% 2 Missing ⚠️
server/serviceadapter.ts 50.0000% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##             master      #1778        +/-   ##
================================================
- Coverage   62.8300%   62.8135%   -0.0166%     
================================================
  Files           168        168                
  Lines         24918      24958        +40     
  Branches       1444       1446         +2     
================================================
+ Hits          15656      15677        +21     
- Misses         9209       9228        +19     
  Partials         53         53                

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dyc3 dyc3 merged commit c91bbab into master Jul 4, 2024
22 of 25 checks passed
@dyc3 dyc3 deleted the fix-highlighted-vids branch July 4, 2024 22:52
Copy link

cypress bot commented Jul 4, 2024

Passing run #1989 ↗︎

0 84 1 0 Flakiness 0

Details:

server: refactor video highlighting, fix videos not getting highlighted in add p...
Project: OpenTogetherTube Commit: c91bbabdbe
Status: Passed Duration: 05:23 💡
Started: Jul 4, 2024 10:53 PM Ended: Jul 4, 2024 10:58 PM

Review all test suite changes for PR #1778 ↗︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding a video from a playlist loads the whole playlist
1 participant