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
|
### Fixed
|
||||||
|
|
||||||
- A bug where instance testing is not immediately cancelled when the testing page is closed
|
- 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
|
## [0.21.2] - 2024-03-10
|
||||||
|
|
||||||
|
|||||||
@@ -208,6 +208,8 @@
|
|||||||
author={videoMetadata?.author}
|
author={videoMetadata?.author}
|
||||||
lengthSeconds={videoMetadata?.lengthSeconds}
|
lengthSeconds={videoMetadata?.lengthSeconds}
|
||||||
liveNow={videoMetadata?.liveNow}
|
liveNow={videoMetadata?.liveNow}
|
||||||
|
isUpcoming={videoMetadata?.isUpcoming}
|
||||||
|
premiereTimestamp={videoMetadata?.premiereTimestamp}
|
||||||
viewCount={videoMetadata?.viewCount}
|
viewCount={videoMetadata?.viewCount}
|
||||||
bind:videoStartAtChecked
|
bind:videoStartAtChecked
|
||||||
bind:videoStartAtTimestamp
|
bind:videoStartAtTimestamp
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
export let lengthSeconds: number = undefined;
|
export let lengthSeconds: number = undefined;
|
||||||
export let liveNow: boolean = undefined;
|
export let liveNow: boolean = undefined;
|
||||||
export let viewCount: number | undefined = undefined;
|
export let viewCount: number | undefined = undefined;
|
||||||
|
export let isUpcoming: boolean = undefined;
|
||||||
|
export let premiereTimestamp: number | undefined = undefined;
|
||||||
|
|
||||||
export let videoStartAtChecked;
|
export let videoStartAtChecked;
|
||||||
export let videoStartAtTimestamp;
|
export let videoStartAtTimestamp;
|
||||||
@@ -92,6 +94,8 @@
|
|||||||
bind:liveNow
|
bind:liveNow
|
||||||
bind:lengthSeconds
|
bind:lengthSeconds
|
||||||
bind:viewCount
|
bind:viewCount
|
||||||
|
bind:isUpcoming
|
||||||
|
bind:premiereTimestamp
|
||||||
bind:invidiousInstance
|
bind:invidiousInstance
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -146,6 +146,8 @@
|
|||||||
bind:title
|
bind:title
|
||||||
bind:videoThumbnails
|
bind:videoThumbnails
|
||||||
bind:liveNow
|
bind:liveNow
|
||||||
|
bind:isUpcoming
|
||||||
|
bind:premiereTimestamp
|
||||||
bind:lengthSeconds
|
bind:lengthSeconds
|
||||||
bind:viewCount
|
bind:viewCount
|
||||||
bind:invidiousInstance
|
bind:invidiousInstance
|
||||||
@@ -173,6 +175,8 @@
|
|||||||
bind:lengthSeconds
|
bind:lengthSeconds
|
||||||
bind:videoThumbnails
|
bind:videoThumbnails
|
||||||
bind:liveNow
|
bind:liveNow
|
||||||
|
bind:isUpcoming
|
||||||
|
bind:premiereTimestamp
|
||||||
bind:viewCount
|
bind:viewCount
|
||||||
videoStartAtChecked={false}
|
videoStartAtChecked={false}
|
||||||
videoStartAtTimestamp={0}
|
videoStartAtTimestamp={0}
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { tr } from "lib/Stores";
|
||||||
|
|
||||||
export let videoId: string | undefined = undefined;
|
export let videoId: string | undefined = undefined;
|
||||||
export let title: string | undefined = undefined;
|
export let title: string | undefined = undefined;
|
||||||
export let videoThumbnails: any[] | undefined = undefined;
|
export let videoThumbnails: any[] | undefined = undefined;
|
||||||
export let liveNow: boolean = undefined;
|
export let liveNow: boolean = undefined;
|
||||||
export let lengthSeconds: number = undefined;
|
export let lengthSeconds: number = undefined;
|
||||||
export let viewCount: number | undefined = undefined;
|
export let viewCount: number | undefined = undefined;
|
||||||
|
export let isUpcoming: boolean | undefined = undefined;
|
||||||
|
export let premiereTimestamp: number | undefined = undefined;
|
||||||
|
|
||||||
export let invidiousInstance;
|
export let invidiousInstance;
|
||||||
|
|
||||||
@@ -49,6 +53,10 @@
|
|||||||
}
|
}
|
||||||
return lengthSeconds === 0 && viewCount === 0;
|
return lengthSeconds === 0 && viewCount === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isVideoUpcoming() {
|
||||||
|
return isUpcoming && !!premiereTimestamp;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<figure class="relative">
|
<figure class="relative">
|
||||||
@@ -60,11 +68,17 @@
|
|||||||
src={thumbnailUrl}
|
src={thumbnailUrl}
|
||||||
alt={title}
|
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
|
<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"
|
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>
|
</div>
|
||||||
{:else if lengthSeconds}
|
{:else if lengthSeconds}
|
||||||
<div
|
<div
|
||||||
|
|||||||
Reference in new issue
Block a user