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

feat: Add session recordings #8218

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

holloway
Copy link
Contributor

@holloway holloway commented Nov 17, 2024

Replaces #8084

  • Allows a secretariat to add and delete session recordings (youtube urls)

Screenshot from 2024-11-18 11-11-17

Screenshot from 2024-11-18 11-11-37

Comment on lines 2622 to 2623
today = datetime.datetime.now()
initial = {'title': f"Video recording for {session.group.acronym} on {today.strftime('%b-%d-%Y at %H:%M:%S')}"}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Video recording for tools on 2024-10-15 at 18:00:00. We should probably suggest a title of that form - @rjsparks

Done. Do timezones matter? Should it be UTC?

Copy link
Member

@jennifer-richards jennifer-richards Nov 18, 2024

Choose a reason for hiding this comment

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

I don't know what the existing TZ convention (if any) is, but I think UTC is the right choice. I'd probably add "... UTC" to the default name, though it'd mean a break from existing filename convention.

Copy link
Member

Choose a reason for hiding this comment

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

Why today?

The recording is for a working group session and the times should be the times for that session, not the time of the upload of the recording.

We should consider capturing the moment of "upload" (really, setting a URL) as a docevent, but I don't think we're currently doing that when meetecho reports uploads to youtube, so maybe this is a separate issue for improving both.

But yes, we should present in UTC by default - some views offer browser or meeting local time as well - this upload doesn't need to though, I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, it now looks like this

Screenshot from 2024-11-19 09-51-01

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on the assumption that session.meeting.date is already UTC. Is that correct?

Copy link
Member

Choose a reason for hiding this comment

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

Sadly, I don't think so, it'll be the date in the meeting timezone.

Copy link
Member

@jennifer-richards jennifer-richards Nov 19, 2024

Choose a reason for hiding this comment

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

Meeting.start_datetime() will give you a timezone-aware midnight in the meeting timezone. If you have a Session (which I think you do), then the way to get the formatted start time of that session is:

session.official_timeslotassignment().timeslot.utc_start_time().strftime(...)

Copy link
Member

Choose a reason for hiding this comment

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

Also, this needs a guard against official_timeslotassignment() not existing unless it's guaranteed to exist. It should exist for anything that is on an agenda.

Comment on lines +2612 to +2613
if delete:
delete_recording(pk=delete, session=session)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should think through what a chair would do if they entered the wrong link and wanted to fix it. @rjsparks

I've added a delete button. Is that ok?

Screenshot from 2024-11-18 10-56-26

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regarding the 'Revision' column is that valid for recordings? How would someone update the revision of a recording anyway?

Copy link
Member

Choose a reason for hiding this comment

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

It's valid as long as we're modeling recordings as Document objects.

To date, we have not revised a recording document. Doesn't mean we couldn't (with the current model anyhow). An -01 for youtube would just point to a different URL the same as an -01 for a draft points to a different filename.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thoughts on the delete button? Should it have a confirmation modal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to assume we need a confirmation modal.

Copy link
Contributor Author

@holloway holloway Nov 18, 2024

Choose a reason for hiding this comment

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

Done. It looks like this. I did it in plain JS with a <dialog> rather than Bootstrap as we're looking to migrate away from that.

Screenshot from 2024-11-19 13-01-20

Copy link
Member

Choose a reason for hiding this comment

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

I have minor heartburn that we're allowing a Document object to be deleted. It violates an assumption about what Document objects are for, but I suppose we have that problem with these recording documents-that-are-just-external-links already and some future project should migrate them to some other model instead.

I'll request one change and we can move forward with this.

Comment on lines +2594 to +2596
initial = {
'title': f"Video recording for {session.group.acronym} on {session.meeting.date.strftime('%b-%d-%Y at %H:%M:%S')}"
}
Copy link
Member

Choose a reason for hiding this comment

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

To be more concrete about my comments elsewhere, I think something like this is what is needed. The assertion() call is not bulletproof, there'll still be a 500 if this comes up.

Suggested change
initial = {
'title': f"Video recording for {session.group.acronym} on {session.meeting.date.strftime('%b-%d-%Y at %H:%M:%S')}"
}
timeslot = session.official_timeslotassignment()
assertion("timeslot is not None")
initial = {
'title': f"Video recording for {session.group.acronym} on {timeslot.utc_start_time().strftime('%b-%d-%Y at %H:%M:%S')}"
}

</table>
</form>
<dialog id="delete_confirm_dialog">
<p>Really delete <a href="#" id="delete_confirm_link"></a>?</p>
Copy link
Member

Choose a reason for hiding this comment

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

Could we say Really delete the link to instead? We don't want to leave anyone with the impression that this will remove the recording at youtube.

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.

3 participants