diff --git a/bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.mo b/bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.mo index f324c02..9d0b44e 100644 Binary files a/bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.mo and b/bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.mo differ diff --git a/bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.po b/bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.po index 696d4d4..03ae351 100644 --- a/bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.po +++ b/bbb_django/bbb/locale/zh_CN/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-12-21 23:43+0800\n" +"POT-Creation-Date: 2012-12-22 18:28+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: admin.py:13 models.py:48 models.py:198 +#: admin.py:13 models.py:48 models.py:241 msgid "agenda" msgstr "会议安排" @@ -62,31 +62,31 @@ msgstr "3小时" msgid "user" msgstr "用户" -#: models.py:40 models.py:189 +#: models.py:40 models.py:232 msgid "meeting name" msgstr "会议名称" -#: models.py:41 models.py:190 +#: models.py:41 models.py:233 msgid "attendee password" msgstr "会议密码" -#: models.py:42 models.py:192 +#: models.py:42 models.py:235 msgid "moderator password" msgstr "管理员密码" -#: models.py:43 models.py:194 +#: models.py:43 models.py:237 msgid "welcome message" msgstr "欢迎信息" -#: models.py:44 models.py:195 +#: models.py:44 models.py:238 msgid "record" msgstr "录制" -#: models.py:45 models.py:196 +#: models.py:45 models.py:239 msgid "duration" msgstr "时长" -#: models.py:46 models.py:197 +#: models.py:46 models.py:240 msgid "start time" msgstr "开始时间" @@ -102,15 +102,15 @@ msgstr "会议" msgid "meetings" msgstr "会议列表" -#: models.py:194 +#: models.py:237 msgid "Welcome!" msgstr "欢迎!" -#: models.py:211 +#: models.py:254 msgid "Your name" msgstr "姓名" -#: models.py:212 +#: models.py:255 msgid "password" msgstr "密码" @@ -196,23 +196,27 @@ msgstr "运行中" msgid "End" msgstr "结束会议" -#: templates/meetings.html:19 +#: templates/meetings.html:20 +msgid "Playback" +msgstr "会议录制" + +#: templates/meetings.html:22 msgid "Ended" msgstr "已结束" -#: templates/meetings.html:22 +#: templates/meetings.html:25 msgid "Not started" msgstr "未开始" -#: templates/meetings.html:23 +#: templates/meetings.html:26 msgid "Calendar export" msgstr "日程导出" -#: templates/meetings.html:24 +#: templates/meetings.html:27 msgid "Start" msgstr "开启会议" -#: templates/meetings.html:39 +#: templates/meetings.html:42 msgid "There are no meetings at the moment." msgstr "当前没有会议" @@ -278,17 +282,17 @@ msgid "" "please join the meeting via %(url)s, the attendee password is \"%(pwd)s\"" msgstr "请通过下面的url加入会议:%(url)s, 会议密码为:\"%(pwd)s\"" -#: views/core.py:186 +#: views/core.py:190 #, python-format msgid "Successfully ended meeting %s" msgstr "成功结束会议%s" -#: views/core.py:190 +#: views/core.py:194 #, python-format msgid "Unable to end meeting %s" msgstr "未能结束会议%s" -#: views/core.py:219 +#: views/core.py:223 #, python-format msgid "Successfully schdulered meeting %s" msgstr "成功预定会议%s" diff --git a/bbb_django/bbb/models.py b/bbb_django/bbb/models.py index a070c9a..7e8bddc 100755 --- a/bbb_django/bbb/models.py +++ b/bbb_django/bbb/models.py @@ -150,6 +150,49 @@ def get_meetings(self): else: return 'error' + @classmethod + def get_recordings(self, meeting_id=None): + """ + Retrieves the recordings that are available for playback for a given meetingID (or set of meeting IDs). + + :param meetingID: The meeting ID that identifies the meeting + """ + call = 'getRecordings' + if meeting_id: + query = urlencode(( + ('meetingID', meeting_id), + )) + else: + query = '' + hashed = self.api_call(query, call) + url = settings.BBB_API_URL + call + '?' + hashed + print 'recording url:%s'%url + r = parse(urlopen(url).read()) + # ToDO implement more keys + if r: + recordings = r.find('recordings') + if recordings is None: + return None + records = [] + for session in recordings.findall('recording'): + record = {} + record['record_id'] = session.find('recordID').text + record['meeting_id'] = session.find('meetingID').text + record['meeting_name'] = session.find('name').text + record['published'] = session.find('published').text == "true" + record['start_time'] = session.find('startTime').text + record['end_time'] = session.find('endTime').text + playbacks = session.find('playback') + for f in playbacks.findall('format'): + if f.find('type').text == 'slides': + record['playback_url'] = f.find('url').text + record['length'] = f.find('length').text + records.append(record) + #print records + return records + else: + return None + def start(self): call = 'create' voicebridge = 70000 + random.randint(0,9999) diff --git a/bbb_django/bbb/templates/meetings.html b/bbb_django/bbb/templates/meetings.html index 2c72a78..46689f0 100644 --- a/bbb_django/bbb/templates/meetings.html +++ b/bbb_django/bbb/templates/meetings.html @@ -17,6 +17,9 @@

{% trans "Meetings" %}

{% csrf_token %}
{% else %} {% trans "Ended" %} + {% if meeting.playback_url %} + + {% endif %} {% endif %} {% else %} {% trans "Not started" %} diff --git a/bbb_django/bbb/views/core.py b/bbb_django/bbb/views/core.py index 38dad3d..763e454 100644 --- a/bbb_django/bbb/views/core.py +++ b/bbb_django/bbb/views/core.py @@ -129,8 +129,12 @@ def meetings(request): }, } + record_info = Meeting.get_recordings(meeting.id) + if record_info: + d['playback_url'] = record_info[0]['playback_url'] + #print 'record info: %s'% Meeting.get_recordings(meeting.id) detail = started.get('%d'%meeting.id) - print meeting.id, detail + #print meeting.id, detail if detail is not None: d['running'] = detail['running'] d['info'].update(detail['info'])