Commit 305fabbc authored by zhanglu's avatar zhanglu

直播预告url调整

parent 620bbe6a
......@@ -12,7 +12,7 @@ from .schemas import LiveInfo, LiveList
class LiveFormat(BaseFormat):
@classmethod
def _get_live_gm_url(cls, status, topic_id, channel_id):
def _get_live_gm_url(cls, status, topic_id, channel_id, notice_id):
"""获取直播相关的gm_url。"""
gm_url = ''
......@@ -23,7 +23,7 @@ class LiveFormat(BaseFormat):
gm_url = gm_protocol.get_live_list(channel_id=channel_id, entrance=LIVE_PLAYER_ENTRANCE.FEED)
elif status == LIVE_STATUS.NOTICE:
url = settings.API_HOST + "/hybrid/broadcast/prevue/"
url = settings.API_HOST + "/hybrid/broadcast/prevue/?notice_id={notice_id}".format(notice_id=notice_id)
gm_url = gm_protocol.get_webview(url)
return gm_url
......@@ -66,7 +66,7 @@ class LiveFormat(BaseFormat):
if live["status"] == LIVE_STATUS.NOLIVE and not live["topic_id"]:
return None
live["gm_url"] = self._get_live_gm_url(live["status"], live["topic_id"], live["channel_id"])
live["gm_url"] = self._get_live_gm_url(live["status"], live["topic_id"], live["channel_id"], live.get("conf_id", ""))
return LiveInfo(**live)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment