Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
card
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanglu
card
Commits
305fabbc
Commit
305fabbc
authored
Dec 18, 2020
by
zhanglu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播预告url调整
parent
620bbe6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
format.py
card/views/live/format.py
+3
-3
No files found.
card/views/live/format.py
View file @
305fabbc
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment