mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-24 17:06:18 -05:00
Including video.view_count in minimum video. Displaying video.view_count before info_json view count in UI.
This commit is contained in:
parent
165979f80a
commit
75169462e3
2 changed files with 5 additions and 5 deletions
|
|
@ -11,8 +11,7 @@ const MEDIA_PATH = '/media';
|
|||
|
||||
|
||||
function VideoPage(props) {
|
||||
let video = props.video;
|
||||
let channel = video.channel;
|
||||
let {video, channel} = props;
|
||||
let [deleteOpen, setDeleteOpen] = useState(false);
|
||||
|
||||
async function handleDeleteVideo(video_id) {
|
||||
|
|
@ -37,10 +36,10 @@ function VideoPage(props) {
|
|||
}
|
||||
|
||||
let description = 'No description available.';
|
||||
let viewCount = null;
|
||||
let viewCount = video.view_count;
|
||||
if (video.info_json) {
|
||||
description = video.info_json['description'];
|
||||
viewCount = video.info_json['view_count'];
|
||||
viewCount = viewCount || video.info_json['view_count'];
|
||||
}
|
||||
|
||||
let [favorite, setFavorite] = React.useState(video.favorite);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ REQUIRED_OPTIONS = ['name', 'directory']
|
|||
MINIMUM_CHANNEL_KEYS = {'id', 'name', 'directory', 'url', 'video_count', 'link'}
|
||||
MINIMUM_INFO_JSON_KEYS = {'description', 'view_count'}
|
||||
MINIMUM_VIDEO_KEYS = {'id', 'title', 'upload_date', 'duration', 'channel', 'channel_id', 'favorite', 'size',
|
||||
'poster_path', 'caption_path', 'video_path', 'info_json', 'channel', 'viewed', 'source_id'}
|
||||
'poster_path', 'caption_path', 'video_path', 'info_json', 'channel', 'viewed', 'source_id',
|
||||
'view_count'}
|
||||
VIDEO_QUERY_LIMIT = 20
|
||||
VIDEO_QUERY_MAX_LIMIT = 100
|
||||
# These are the supported video formats. These are in order of their preference.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue