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

Watched state determined automatically #1350

Merged

Conversation

SebiWrn
Copy link
Contributor

@SebiWrn SebiWrn commented Apr 25, 2024

Motivation and Context

Fixes #1312

Description

If progress > 90%, the vod is marked as watched

Copy link

Your Testserver will be ready at https://1350.test.live.mm.rbg.tum.de in a few minutes.

Logins
Kurs1 Kurs2 Kurs3 Kurs4
public public loggedin enrolled
prof1 prof1 prof2 prof1
prof2
student1
student2
student3
student1
student2
student2
student3
student1
student2

Copy link
Sponsor Member

@joschahenningsen joschahenningsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This is long overdue 🥳

If you want, you can follow up on this by also setting watched: true if the progress<90% but rest of the video is a silence segment

api/progress.go Outdated Show resolved Hide resolved
@SebiWrn
Copy link
Contributor Author

SebiWrn commented Apr 25, 2024

I fixed another bug, that the watched state isn't set in the database and I added, that watched is set if only silence is after the current timestamp.

api/progress.go Outdated Show resolved Hide resolved
api/progress.go Outdated Show resolved Hide resolved
api/progress.go Outdated Show resolved Hide resolved
api/progress.go Outdated Show resolved Hide resolved
api/progress.go Outdated Show resolved Hide resolved
dao/progress.go Show resolved Hide resolved
@SebiWrn
Copy link
Contributor Author

SebiWrn commented Apr 25, 2024

Nvm, I have to have a look into it, in the tumLiveContext, the stream is null

@joschahenningsen
Copy link
Sponsor Member

Nvm, I have to have a look into it, in the tumLiveContext, the stream is null

Probably because there is no :streamID in the url of that endpoint, right?

@SebiWrn
Copy link
Contributor Author

SebiWrn commented Apr 29, 2024

I fixed it by adding a MockDao to the test. Now everything should be working fine

Copy link
Contributor

@DawinYurtseven DawinYurtseven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me just change the return type of the two errors to one of them being goroutine so we can get both errors if they exist.

@SebiWrn SebiWrn dismissed joschahenningsen’s stale review May 2, 2024 08:22

Checked by DawinYurtseven

@SebiWrn SebiWrn merged commit 9aa428e into dev May 2, 2024
8 checks passed
@SebiWrn SebiWrn deleted the 1312-watched-state-is-not-being-determined-and-set-automatically branch May 2, 2024 08:22
SebiWrn added a commit that referenced this pull request May 7, 2024
* Watched state determined automatically

* Fixed gofumpt

* Added watched state if only silence after it

* Fixed errors

* Fixed gofumpt

* Fixed bug

* Fixed bug

* Fixed bug

* Fixed some things and cleaned up code

* Fixed gofumpt

* Fixed test

* Fixed golangci-lint

* Removed test

* Removed debug messages

* Added comment

* gofumpted

* Fixed a bug
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.

"watched" state is not being determined and set automatically
3 participants