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
3cb3f96d
Commit
3cb3f96d
authored
Dec 03, 2020
by
zhanglu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐛
fix: 直播增加channel_id
parent
2f986a20
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
4 deletions
+7
-4
format.py
card/views/diary/format.py
+1
-1
schemas.py
card/views/live/schemas.py
+1
-0
format.py
card/views/qa/format.py
+1
-0
special_pool.py
card/views/special_pool/special_pool.py
+1
-1
format.py
card/views/utils/format.py
+3
-2
No files found.
card/views/diary/format.py
View file @
3cb3f96d
...
...
@@ -41,7 +41,7 @@ class DiaryFormat(BaseFormat):
if
item
.
get
(
"video_url"
,
""
):
diary
.
video
=
self
.
get_video
(
video_cover
_url
=
self
.
revert_image
(
item
.
get
(
"video_cover"
,
""
)),
video_cover
=
self
.
revert_image
(
item
.
get
(
"video_cover"
,
""
)),
video_url
=
item
.
get
(
"video_url"
,
""
),
short_video_url
=
item
.
get
(
"short_video_url"
,
""
),
)
...
...
card/views/live/schemas.py
View file @
3cb3f96d
...
...
@@ -48,6 +48,7 @@ class LiveInfo(Schema):
topic_id
:
Optional
[
int
]
=
Field
(
None
,
description
=
"关联帖子ID"
)
status
:
Optional
[
int
]
=
Field
(
None
,
description
=
"关联帖子ID"
)
stream_id
:
Optional
[
int
]
=
Field
(
None
,
description
=
"stream id"
)
channel_id
:
Optional
[
int
]
=
Field
(
None
,
description
=
"channel id"
)
class
LiveList
(
Schema
):
...
...
card/views/qa/format.py
View file @
3cb3f96d
...
...
@@ -36,6 +36,7 @@ class AnswerFormat(BaseFormat):
item
[
"user"
]
=
user
answer
:
AnswerInfo
=
AnswerInfo
(
**
item
)
answer
.
content
=
gm_decode_html
(
answer
.
content
)
answer
.
gm_url
=
gm_protocol
.
get_question_detail
(
item
[
"question_id"
],
top_answer_id
=
item
[
"answer_id"
])
tags_v3
=
item
[
"tags_v3"
]
...
...
card/views/special_pool/special_pool.py
View file @
3cb3f96d
...
...
@@ -17,7 +17,7 @@ async def special_pools(ctx: Context, request: SpecialPoolListRequest) -> Specia
return
SpecialPoolFormat
(
request
.
version
,
request
.
device_id
)
.
format_feed_card
(
special_pools
=
res
)
@bind
(
"card/visualpage/list_by_ids"
)
@bind
(
"card/visual
_
page/list_by_ids"
)
async
def
visualpages
(
ctx
:
Context
,
request
:
VisualPageListRequest
)
->
VisualPageList
:
if
not
request
.
visualpage_ids
:
return
VisualPageList
(
visualpages
=
[])
...
...
card/views/utils/format.py
View file @
3cb3f96d
...
...
@@ -31,8 +31,9 @@ class BaseFormat(object):
@classmethod
def
get_video
(
cls
,
video_cover
:
str
,
video_url
:
str
,
short_video_url
:
str
,
width
:
Optional
[
int
]
=
0
,
height
:
Optional
[
int
]
=
0
)
->
Video
:
video_cover
:
str
,
video_url
:
str
,
short_video_url
:
str
,
width
:
Optional
[
int
]
=
0
,
height
:
Optional
[
int
]
=
0
)
->
Video
:
return
Video
(
**
{
...
...
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