Bug fix
This commit is contained in:
1 parent
42dadec020
commit
6e6ea94544
5 files changed
+27
-2
No files matched your search
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Fixed
|
||||
|
||||
- A bug where instance testing is not immediately cancelled when the testing page is closed
|
||||
- A bug in the web app where "upcoming" videos show up as "live"
|
||||
|
||||
## [0.21.2] - 2024-03-10
|
||||
|
||||
|
||||
@@ -208,6 +208,8 @@
|
||||
author={videoMetadata?.author}
|
||||
lengthSeconds={videoMetadata?.lengthSeconds}
|
||||
liveNow={videoMetadata?.liveNow}
|
||||
isUpcoming={videoMetadata?.isUpcoming}
|
||||
premiereTimestamp={videoMetadata?.premiereTimestamp}
|
||||
viewCount={videoMetadata?.viewCount}
|
||||
bind:videoStartAtChecked
|
||||
bind:videoStartAtTimestamp
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
export let lengthSeconds: number = undefined;
|
||||
export let liveNow: boolean = undefined;
|
||||
export let viewCount: number | undefined = undefined;
|
||||
export let isUpcoming: boolean = undefined;
|
||||
export let premiereTimestamp: number | undefined = undefined;
|
||||
|
||||
export let videoStartAtChecked;
|
||||
export let videoStartAtTimestamp;
|
||||
@@ -92,6 +94,8 @@
|
||||
bind:liveNow
|
||||
bind:lengthSeconds
|
||||
bind:viewCount
|
||||
bind:isUpcoming
|
||||
bind:premiereTimestamp
|
||||
bind:invidiousInstance
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -146,6 +146,8 @@
|
||||
bind:title
|
||||
bind:videoThumbnails
|
||||
bind:liveNow
|
||||
bind:isUpcoming
|
||||
bind:premiereTimestamp
|
||||
bind:lengthSeconds
|
||||
bind:viewCount
|
||||
bind:invidiousInstance
|
||||
@@ -173,6 +175,8 @@
|
||||
bind:lengthSeconds
|
||||
bind:videoThumbnails
|
||||
bind:liveNow
|
||||
bind:isUpcoming
|
||||
bind:premiereTimestamp
|
||||
bind:viewCount
|
||||
videoStartAtChecked={false}
|
||||
videoStartAtTimestamp={0}
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
<script lang="ts">
|
||||
import { tr } from "lib/Stores";
|
||||
|
||||
export let videoId: string | undefined = undefined;
|
||||
export let title: string | undefined = undefined;
|
||||
export let videoThumbnails: any[] | undefined = undefined;
|
||||
export let liveNow: boolean = undefined;
|
||||
export let lengthSeconds: number = undefined;
|
||||
export let viewCount: number | undefined = undefined;
|
||||
export let isUpcoming: boolean | undefined = undefined;
|
||||
export let premiereTimestamp: number | undefined = undefined;
|
||||
|
||||
export let invidiousInstance;
|
||||
|
||||
@@ -49,6 +53,10 @@
|
||||
}
|
||||
return lengthSeconds === 0 && viewCount === 0;
|
||||
}
|
||||
|
||||
function isVideoUpcoming() {
|
||||
return isUpcoming && !!premiereTimestamp;
|
||||
}
|
||||
</script>
|
||||
|
||||
<figure class="relative">
|
||||
@@ -60,11 +68,17 @@
|
||||
src={thumbnailUrl}
|
||||
alt={title}
|
||||
/>
|
||||
{#if isVideoLive()}
|
||||
{#if isVideoUpcoming()}
|
||||
<div
|
||||
class="absolute bottom-2 right-0 bg-black/70 text-white text-sm rounded-sm font-bold pt-1 pb-1 pr-2 pl-2"
|
||||
>
|
||||
{$tr("UPCOMING")}
|
||||
</div>
|
||||
{:else if isVideoLive()}
|
||||
<div
|
||||
class="absolute bottom-2 right-0 bg-red-500 text-white text-sm rounded-sm font-bold pt-1 pb-1 pr-2 pl-2"
|
||||
>
|
||||
LIVE
|
||||
{$tr("LIVE")}
|
||||
</div>
|
||||
{:else if lengthSeconds}
|
||||
<div
|
||||
|
||||
Reference in new issue
Block a user