Using video path as alternate title on video player. Showing 'No Description' when no description is available.

This commit is contained in:
Roland 2022-01-04 14:48:01 -07:00
parent 61abff1c5e
commit b6c7ef1d99
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
2 changed files with 3 additions and 4 deletions

View file

@ -70,7 +70,7 @@ function VideoPage(props) {
let descriptionPane = {
menuItem: 'Description', render: () => <Tab.Pane>
<pre className="wrap-text">
{description}
{description || 'No description'}
</pre>
</Tab.Pane>
};
@ -120,7 +120,7 @@ function VideoPage(props) {
<track kind="captions" label="English captions" src={captionsUrl} srcLang="en" default/>
</video>
<h2>{video.title}</h2>
<h2>{video.title || video.video_path}</h2>
{video.upload_date && <h3>{uploadDate(video.upload_date)}</h3>}
<h3>
{channel && <Link to={`/videos/channel/${channel.link}/video`}>

View file

@ -461,8 +461,7 @@ async def get_bulk_video_info_json(video_ids: List[int]):
video.duration = get_video_duration(video.video_path.path)
if not video.title:
# Use the video path name without the extension.
video_path = video.video_path.path.with_suffix('')
video.title = video_path.name
video.title = video.video_path.path.with_suffix('').name
# Unescape any HTML entities.
video.title = html.unescape(video.title)