fix: apply fix from eslint

This commit is contained in:
JellyBrick
2024-10-13 22:45:11 +09:00
parent f42f20f770
commit cb1381bbb3
85 changed files with 1858 additions and 1042 deletions

View File

@ -176,15 +176,17 @@ declare module '@jellybrick/mpris-service' {
setActivePlaylist(playlistId: string): void;
}
interface MprisInterface extends dbusInterface.Interface {
export interface MprisInterface extends dbusInterface.Interface {
setProperty(property: string, valuePlain: unknown): void;
}
interface RootInterface {}
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface RootInterface {}
interface PlayerInterface {}
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface PlayerInterface {}
interface TracklistInterface {
export interface TracklistInterface {
TrackListReplaced(tracks: Track[]): void;
TrackAdded(afterTrack: string): void;
@ -192,7 +194,7 @@ declare module '@jellybrick/mpris-service' {
TrackRemoved(trackId: string): void;
}
interface PlaylistsInterface {
export interface PlaylistsInterface {
PlaylistChanged(playlist: unknown[]): void;
setActivePlaylistId(playlistId: string): void;

View File

@ -192,10 +192,13 @@ function registerMPRIS(win: BrowserWindow) {
return;
}
const currentPosition = queue.items?.findIndex((it) =>
it?.playlistPanelVideoRenderer?.selected ||
it?.playlistPanelVideoWrapperRenderer?.primaryRenderer?.playlistPanelVideoRenderer?.selected
) ?? 0;
const currentPosition =
queue.items?.findIndex(
(it) =>
it?.playlistPanelVideoRenderer?.selected ||
it?.playlistPanelVideoWrapperRenderer?.primaryRenderer
?.playlistPanelVideoRenderer?.selected,
) ?? 0;
player.canGoPrevious = currentPosition !== 0;
let hasNext: boolean;