Fix ParsedDescription interface formatting
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { page } from '$app/stores';
|
||||
import { getBestThumbnail, ImageCache } from '$lib/images';
|
||||
import { videoLength } from '$lib/numbers';
|
||||
import { generateChapterWebVTT, type parsedDescription, type Timestamp } from '$lib/description';
|
||||
import { generateChapterWebVTT, type ParsedDescription, type Timestamp } from '$lib/description';
|
||||
import { SystemBars, SystemBarsStyle, SystemBarType } from '@capacitor/core';
|
||||
import { Capacitor } from '@capacitor/core';
|
||||
import { ScreenOrientation, type ScreenOrientationResult } from '@capacitor/screen-orientation';
|
||||
@@ -67,7 +67,7 @@
|
||||
} from '$lib/timelineThumbnails';
|
||||
|
||||
interface Props {
|
||||
data: { video: VideoPlay; content: parsedDescription; playlistId: string | null };
|
||||
data: { video: VideoPlay; content: ParsedDescription; playlistId: string | null };
|
||||
currentTime?: number;
|
||||
userManualSeeking?: boolean;
|
||||
isEmbed?: boolean;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { convertToSeconds, padTime } from './time';
|
||||
export type Timestamp = { title: string; time: number; timePretty: string; endTime: number };
|
||||
export type Timestamps = Timestamp[];
|
||||
|
||||
export interface parsedDescription {
|
||||
export interface ParsedDescription {
|
||||
description: string;
|
||||
timestamps: Timestamps;
|
||||
}
|
||||
@@ -45,7 +45,7 @@ export function parseDescription(
|
||||
videoId: string,
|
||||
content: string,
|
||||
fallbackPatch?: 'youtubejs' | 'piped'
|
||||
): parsedDescription {
|
||||
): ParsedDescription {
|
||||
const timestamps: Timestamps = [];
|
||||
const lines = content.split('\n');
|
||||
const filteredLines: string[] = [];
|
||||
|
||||
@@ -21,7 +21,7 @@ import type {
|
||||
VideoBase,
|
||||
VideoPlay
|
||||
} from './api/model';
|
||||
import type { parsedDescription } from './description';
|
||||
import type { ParsedDescription } from './description';
|
||||
import { ensureNoTrailingSlash } from './misc';
|
||||
import type { EngineFallback } from './api/misc';
|
||||
|
||||
@@ -182,7 +182,7 @@ export const playerAndroidPauseOnNetworkChange = persist(
|
||||
export const playerPlaylistHistory: Writable<string[]> = writable([]);
|
||||
|
||||
export interface PlayerState {
|
||||
data: { video: VideoPlay; content: parsedDescription; playlistId: string | null };
|
||||
data: { video: VideoPlay; content: ParsedDescription; playlistId: string | null };
|
||||
playerElement?: HTMLMediaElement | undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user