diff --git a/ietf/meeting/models.py b/ietf/meeting/models.py
index 693cb99dfd..3470679327 100644
--- a/ietf/meeting/models.py
+++ b/ietf/meeting/models.py
@@ -1321,11 +1321,16 @@ def onsite_tool_url(self):
return None
def session_recording_url(self):
- url = getattr(settings, "MEETECHO_SESSION_RECORDING_URL", "")
- if self.meeting.type.slug == "ietf" and self.has_onsite_tool and url:
- self.group.acronym_upper = self.group.acronym.upper()
- return url.format(session=self)
- return None
+ url_formatter = getattr(settings, "MEETECHO_SESSION_RECORDING_URL", "")
+ url = None
+ if url_formatter and self.video_stream_url:
+ 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')}"
+ else:
+ session_label = f"IETF-{self.group.acronym.upper()}-{self.official_timeslotassignment().timeslot.time.strftime('%Y%m%d-%H%M')}"
+ url = url_formatter.format(session_label=session_label)
+
+ return url
class SchedulingEvent(models.Model):
diff --git a/ietf/meeting/tests_models.py b/ietf/meeting/tests_models.py
index 0ccd462715..ff874100dc 100644
--- a/ietf/meeting/tests_models.py
+++ b/ietf/meeting/tests_models.py
@@ -146,3 +146,47 @@ def test_chat_room_name(self):
self.assertEqual(session.chat_room_name(), 'plenary')
session.chat_room = 'fnord'
self.assertEqual(session.chat_room_name(), 'fnord')
+
+ def test_session_recording_url(self):
+ group_acronym = "foobar"
+ meeting_date = datetime.date.today()
+ meeting_number = 123
+
+ # IETF meeting
+ session = SessionFactory(
+ meeting__type_id='ietf',
+ meeting__date=meeting_date,
+ group__acronym=group_acronym,
+ meeting__number=meeting_number,
+ )
+ with override_settings():
+ if hasattr(settings, "MEETECHO_SESSION_RECORDING_URL"):
+ del settings.MEETECHO_SESSION_RECORDING_URL
+ self.assertIsNone(session.session_recording_url())
+
+ settings.MEETECHO_SESSION_RECORDING_URL = "http://player.example.com"
+ self.assertEqual(session.session_recording_url(), "http://player.example.com")
+
+ settings.MEETECHO_SESSION_RECORDING_URL = "http://player.example.com?{session_label}"
+ self.assertIn(f"IETF{meeting_number}-{group_acronym.upper()}", session.session_recording_url())
+ self.assertIn(f"{meeting_date.strftime('%Y%m%d')}", session.session_recording_url())
+ self.assertTrue(session.session_recording_url().startswith("http://player.example.com"))
+
+ # interim meeting
+ session = SessionFactory(
+ meeting__type_id='interim',
+ meeting__date=meeting_date,
+ group__acronym=group_acronym,
+ )
+ with override_settings():
+ if hasattr(settings, "MEETECHO_SESSION_RECORDING_URL"):
+ del settings.MEETECHO_SESSION_RECORDING_URL
+ self.assertIsNone(session.session_recording_url())
+
+ settings.MEETECHO_SESSION_RECORDING_URL = "http://player.example.com"
+ self.assertEqual(session.session_recording_url(), "http://player.example.com")
+
+ settings.MEETECHO_SESSION_RECORDING_URL = "http://player.example.com?{session_label}"
+ self.assertIn(f"IETF-{group_acronym.upper()}", session.session_recording_url())
+ self.assertIn(f"{meeting_date.strftime('%Y%m%d')}", session.session_recording_url())
+ self.assertTrue(session.session_recording_url().startswith("http://player.example.com"))
diff --git a/ietf/settings.py b/ietf/settings.py
index db53efe0a5..1bb7a122c3 100644
--- a/ietf/settings.py
+++ b/ietf/settings.py
@@ -1174,7 +1174,7 @@ def skip_unreadable_post(record):
MEETECHO_ONSITE_TOOL_URL = "https://meetings.conf.meetecho.com/onsite{session.meeting.number}/?session={session.pk}"
MEETECHO_VIDEO_STREAM_URL = "https://meetings.conf.meetecho.com/ietf{session.meeting.number}/?session={session.pk}"
MEETECHO_AUDIO_STREAM_URL = "https://mp3.conf.meetecho.com/ietf{session.meeting.number}/{session.pk}.m3u"
-MEETECHO_SESSION_RECORDING_URL = "https://www.meetecho.com/ietf{session.meeting.number}/recordings#{session.group.acronym_upper}"
+MEETECHO_SESSION_RECORDING_URL = "https://meetecho-player.ietf.org/playout/?session={session_label}"
# Put the production SECRET_KEY in settings_local.py, and also any other
# sensitive or site-specific changes. DO NOT commit settings_local.py to svn.
diff --git a/ietf/templates/meeting/interim_session_buttons.html b/ietf/templates/meeting/interim_session_buttons.html
index a32f4345c9..23263b9859 100644
--- a/ietf/templates/meeting/interim_session_buttons.html
+++ b/ietf/templates/meeting/interim_session_buttons.html
@@ -146,17 +146,18 @@
{% endif %}
{% endwith %}
{% endfor %}
- {% elif session.video_stream_url %}
+ {% elif show_empty %}
+ {# #}
+ {% endif %}
+ {% if session.session_recording_url %}
- {% elif show_empty %}
- {# #}
{% endif %}
{% endwith %}
{% endif %}
-{% endwith %}
\ No newline at end of file
+{% endwith %}