-
Notifications
You must be signed in to change notification settings - Fork 701
feat: explicit names for meetecho recordings #8062
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # Copyright The IETF Trust 2017, All Rights Reserved | ||
| # Copyright The IETF Trust 2017-2024, All Rights Reserved | ||
|
|
||
| from django.conf import settings | ||
| from django.urls import include | ||
|
|
@@ -39,6 +39,8 @@ | |
| url(r'^iesg/position', views_ballot.api_set_position), | ||
| # Let Meetecho set session video URLs | ||
| url(r'^meeting/session/video/url$', meeting_views.api_set_session_video_url), | ||
| # Let Meetecho tell us the name of its recordings | ||
| url(r'meeting/session/recordingname$', meeting_views.api_set_meetecho_recording_name), | ||
|
||
| # Meeting agenda + floorplan data | ||
| url(r'^meeting/(?P<num>[A-Za-z0-9._+-]+)/agenda-data$', meeting_views.api_get_agenda_data), | ||
| # Meeting session materials | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Copyright The IETF Trust 2024, All Rights Reserved | ||
|
|
||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ("meeting", "0008_remove_schedtimesessassignment_notes"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AddField( | ||
| model_name="session", | ||
| name="meetecho_recording_name", | ||
| field=models.CharField( | ||
| blank=True, help_text="Name of the meetecho recording", max_length=64 | ||
| ), | ||
| ), | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1042,6 +1042,7 @@ class Session(models.Model): | |
| on_agenda = models.BooleanField(default=True, help_text='Is this session visible on the meeting agenda?') | ||
| has_onsite_tool = models.BooleanField(default=False, help_text="Does this session use the officially supported onsite and remote tooling?") | ||
| chat_room = models.CharField(blank=True, max_length=32, help_text='Name of Zulip stream, if different from group acronym') | ||
| meetecho_recording_name = models.CharField(blank=True, max_length=64, help_text="Name of the meetecho recording") | ||
|
|
||
| tombstone_for = models.ForeignKey('Session', blank=True, null=True, help_text="This session is the tombstone for a session that was rescheduled", on_delete=models.CASCADE) | ||
|
|
||
|
|
@@ -1332,17 +1333,23 @@ def onsite_tool_url(self): | |
| return None | ||
|
|
||
| def _session_recording_url_label(self): | ||
| otsa = self.official_timeslotassignment() | ||
| if otsa is None: | ||
| return None | ||
| if self.meeting.type.slug == "ietf" and self.has_onsite_tool: | ||
| session_label = f"IETF{self.meeting.number}-{self.group.acronym.upper()}-{self.official_timeslotassignment().timeslot.time.strftime('%Y%m%d-%H%M')}" | ||
| session_label = f"IETF{self.meeting.number}-{self.group.acronym.upper()}-{otsa.timeslot.time.strftime('%Y%m%d-%H%M')}" | ||
| else: | ||
| session_label = f"IETF-{self.group.acronym.upper()}-{self.official_timeslotassignment().timeslot.time.strftime('%Y%m%d-%H%M')}" | ||
| session_label = f"IETF-{self.group.acronym.upper()}-{otsa.timeslot.time.strftime('%Y%m%d-%H%M')}" | ||
| return session_label | ||
|
|
||
| def session_recording_url(self): | ||
| url_formatter = getattr(settings, "MEETECHO_SESSION_RECORDING_URL", "") | ||
| url = None | ||
| if url_formatter and self.video_stream_url: | ||
| url = url_formatter.format(session_label=self._session_recording_url_label()) | ||
| name = self.meetecho_recording_name | ||
| if name is None or name.strip() == "": | ||
| name = self._session_recording_url_label() | ||
| if url_formatter.strip()!="" and name is not None: | ||
|
||
| url = url_formatter.format(session_label=name) | ||
| return url | ||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't already, we ought to cover features like this in a unit test of the
require_api_key()decorator and trust that. (Not actually asking for a change here unless you're enthusiastic about it, just pointing it out.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I felt the lack-of-reuse pain, but didn't pursue it as I think we might want to rework all of these to use DRF going forward maybe?