mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-22 16:06:19 -05:00
Displaying captions on video page.
This commit is contained in:
parent
0315def174
commit
93204a0b2a
3 changed files with 10 additions and 2 deletions
|
|
@ -97,7 +97,13 @@ function VideoPage(props) {
|
|||
</Tab.Pane>
|
||||
}
|
||||
|
||||
let tabPanes = [descriptionPane, statisticsPane];
|
||||
let captionsPane = {
|
||||
menuItem: 'Captions', render: () => <Tab.Pane>
|
||||
<pre>{video.caption}</pre>
|
||||
</Tab.Pane>
|
||||
};
|
||||
|
||||
let tabPanes = [descriptionPane, statisticsPane, captionsPane];
|
||||
|
||||
return (
|
||||
<Container textAlign='left'>
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ class Video(ModelHelper, Base):
|
|||
"""
|
||||
Add this video to it's Channel's skip list.
|
||||
"""
|
||||
if self.channel:
|
||||
if self.channel and self.source_id:
|
||||
self.channel.add_video_to_skip_list(self.source_id)
|
||||
|
||||
def set_favorite(self, favorite: bool) -> Optional[datetime]:
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ def get_video_for_app(video_id: int) -> Tuple[dict, Optional[dict], Optional[dic
|
|||
video.set_viewed()
|
||||
previous_video, next_video = video.get_surrounding_videos()
|
||||
|
||||
caption = video.caption
|
||||
video = video.__json__()
|
||||
video['caption'] = caption
|
||||
previous_video = previous_video.__json__() if previous_video else None
|
||||
next_video = next_video.__json__() if next_video else None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue