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

improvements around registerPlayback #211

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

gechoto
Copy link
Contributor

@gechoto gechoto commented Jan 17, 2025

What is it?

  • New feature (user facing)
  • Update to existing feature (user facing)
  • Bugfix (user facing)
  • Translations
  • Codebase improvements or refactors (dev facing)
  • Other

Description of the changes in your PR

  • Use playback tracking url from database if it exists (as before 3767b06)
  • Only call registerPlayback if the playback tracking url is not null
  • Report exceptions in case registerPlayback ran into an error

Due diligence

  • I read the contribution guidelines.
  • I understand that in the event of merge conflicts, I may be asked to rebase my branch on top of the dev branch, instead of resolving them by merging dev into my own branch

@gechoto gechoto changed the title player: use playback tracking url from databse if possible and report… improvements around registerPlayback Jan 17, 2025
@gechoto gechoto marked this pull request as draft January 17, 2025 03:57
@gechoto
Copy link
Contributor Author

gechoto commented Jan 17, 2025

@mikooomich with 3767b06 you changed it so that it always makes a new player request before registering playback.

This leads to duplicate/more requests being made and the playbackUrl from the database (added here:

playbackUrl = playbackData.playbackTracking?.videostatsPlaybackUrl?.baseUrl
) seems to be unused now.

Was there a reason for this change?

In case the additional player requests are required now every time the playbackUrl should be removed from the database instead.

@gechoto
Copy link
Contributor Author

gechoto commented Jan 17, 2025

btw there could be more improvements later.

  • if the playback tracking url is kept in the database: rename it (the current name playbackUrl sounds like a streaming url, something like playbackTrackingUrl would be easier to understand)
  • validate playback tracking urls before making the requests (maybe throw exception if it does not start with "https://s.youtube.com")

@gechoto gechoto marked this pull request as ready for review January 17, 2025 04:41
@mikooomich mikooomich merged commit fc2c1fa into DD3Boh:dev Jan 17, 2025
1 check passed
@mikooomich
Copy link
Collaborator

) seems to be unused now.
Was there a reason for this change?

I didn't realize this was saved. Thanks!

if the playback tracking url is kept in the database: rename it (the current name playbackUrl sounds like a streaming url, something like playbackTrackingUrl would be easier to understand)

I'll keep this in mine next time we need to update the database schema

@gechoto gechoto deleted the registerPlayback-improvements branch January 27, 2025 07:31
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.

2 participants