mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Using video path as alternate title on video player. Showing 'No Description' when no description is available.
This commit is contained in:
parent
61abff1c5e
commit
b6c7ef1d99
2 changed files with 3 additions and 4 deletions
|
|
@ -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`}>
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue