chore(format): run prettier over src/ and scripts/
Formatting was configured but never enforced: `bun run format:check` reported 199 unformatted files and ran in no workflow and in no git hook, so .prettierrc (printWidth 100, trailing commas) described an intention rather than the tree. This is the one-time sweep that makes the check gateable. Whitespace and token-reflow only -- no behavioural change: `bun run check` reports 0 errors and all 1053 frontend tests pass before and after. Kept out of every other commit on purpose. A 199-file diff mixed with real changes is unreviewable, and the next commit turns format:check into a hard CI gate so this cannot silently accumulate again.
This commit is contained in:
@@ -40,7 +40,7 @@ export class RepositoryClient {
|
||||
serverUrl: string,
|
||||
userId: string,
|
||||
accessToken: string,
|
||||
serverId: string
|
||||
serverId: string,
|
||||
): Promise<string> {
|
||||
log.debug("Creating Rust repository...");
|
||||
this.handle = await commands.repositoryCreate(serverUrl, userId, accessToken, serverId);
|
||||
@@ -137,7 +137,11 @@ export class RepositoryClient {
|
||||
}
|
||||
|
||||
async getNextUpEpisodes(seriesId?: string, limit?: number): Promise<MediaItem[]> {
|
||||
return commands.repositoryGetNextUpEpisodes(this.ensureHandle(), seriesId ?? null, limit ?? null);
|
||||
return commands.repositoryGetNextUpEpisodes(
|
||||
this.ensureHandle(),
|
||||
seriesId ?? null,
|
||||
limit ?? null,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -181,7 +185,11 @@ export class RepositoryClient {
|
||||
|
||||
/** Albums the user has played but not listened to recently ("rediscover"). */
|
||||
async getRediscoverAlbums(parentId?: string, limit?: number): Promise<MediaItem[]> {
|
||||
return commands.repositoryGetRediscoverAlbums(this.ensureHandle(), parentId ?? null, limit ?? null);
|
||||
return commands.repositoryGetRediscoverAlbums(
|
||||
this.ensureHandle(),
|
||||
parentId ?? null,
|
||||
limit ?? null,
|
||||
);
|
||||
}
|
||||
|
||||
async getGenres(parentId?: string): Promise<Genre[]> {
|
||||
@@ -229,13 +237,13 @@ export class RepositoryClient {
|
||||
async getVideoStreamUrl(
|
||||
itemId: string,
|
||||
mediaSourceId?: string,
|
||||
audioStreamIndex?: number
|
||||
audioStreamIndex?: number,
|
||||
): Promise<string> {
|
||||
return commands.repositoryGetVideoStreamUrl(
|
||||
this.ensureHandle(),
|
||||
itemId,
|
||||
mediaSourceId ?? null,
|
||||
audioStreamIndex ?? null
|
||||
audioStreamIndex ?? null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -248,14 +256,14 @@ export class RepositoryClient {
|
||||
itemId: string,
|
||||
mediaSourceId?: string,
|
||||
startTimeSeconds?: number,
|
||||
audioStreamIndex?: number
|
||||
audioStreamIndex?: number,
|
||||
): Promise<string> {
|
||||
return commands.repositoryGetAudioOnlyStreamUrlForVideo(
|
||||
this.ensureHandle(),
|
||||
itemId,
|
||||
mediaSourceId ?? null,
|
||||
startTimeSeconds ?? null,
|
||||
audioStreamIndex ?? null
|
||||
audioStreamIndex ?? null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -282,7 +290,11 @@ export class RepositoryClient {
|
||||
* Get image URL from backend
|
||||
* The Rust backend constructs and returns the URL with proper credentials handling
|
||||
*/
|
||||
async getImageUrl(itemId: string, imageType: ImageType = "Primary", options?: ImageOptions): Promise<string> {
|
||||
async getImageUrl(
|
||||
itemId: string,
|
||||
imageType: ImageType = "Primary",
|
||||
options?: ImageOptions,
|
||||
): Promise<string> {
|
||||
return commands.repositoryGetImageUrl(this.ensureHandle(), itemId, imageType, options ?? null);
|
||||
}
|
||||
|
||||
@@ -294,9 +306,15 @@ export class RepositoryClient {
|
||||
itemId: string,
|
||||
mediaSourceId: string,
|
||||
streamIndex: number,
|
||||
format: string = "vtt"
|
||||
format: string = "vtt",
|
||||
): Promise<string> {
|
||||
return commands.repositoryGetSubtitleUrl(this.ensureHandle(), itemId, mediaSourceId, streamIndex, format);
|
||||
return commands.repositoryGetSubtitleUrl(
|
||||
this.ensureHandle(),
|
||||
itemId,
|
||||
mediaSourceId,
|
||||
streamIndex,
|
||||
format,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -307,9 +325,14 @@ export class RepositoryClient {
|
||||
async getVideoDownloadUrl(
|
||||
itemId: string,
|
||||
quality: QualityPreset = "original",
|
||||
mediaSourceId?: string
|
||||
mediaSourceId?: string,
|
||||
): Promise<string> {
|
||||
return commands.repositoryGetVideoDownloadUrl(this.ensureHandle(), itemId, quality, mediaSourceId ?? null);
|
||||
return commands.repositoryGetVideoDownloadUrl(
|
||||
this.ensureHandle(),
|
||||
itemId,
|
||||
quality,
|
||||
mediaSourceId ?? null,
|
||||
);
|
||||
}
|
||||
|
||||
// ===== Favorite Methods (via Rust) =====
|
||||
|
||||
Reference in New Issue
Block a user