mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 03:11:46 +00:00
feat: remove unnecessary export default for better tree-shaking
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { createRoute, z } from '@hono/zod-openapi';
|
||||
import { ipcMain } from 'electron';
|
||||
|
||||
import getSongControls from '@/providers/song-controls';
|
||||
import { getSongControls } from '@/providers/song-controls';
|
||||
import {
|
||||
LikeType,
|
||||
type RepeatMode,
|
||||
|
||||
@ -1,17 +1,15 @@
|
||||
import net from 'net';
|
||||
import * as net from 'node:net';
|
||||
|
||||
import { SocksClient, type SocksClientOptions } from 'socks';
|
||||
|
||||
import is from 'electron-is';
|
||||
|
||||
import { createBackend, LoggerPrefix } from '@/utils';
|
||||
|
||||
import { type BackendType } from './types';
|
||||
|
||||
import config from '@/config';
|
||||
import * as config from '@/config';
|
||||
|
||||
import { type AuthProxyConfig, defaultAuthProxyConfig } from '../config';
|
||||
|
||||
import type { BackendType } from './types';
|
||||
import type { BackendContext } from '@/types/contexts';
|
||||
|
||||
// Parsing the upstream authentication SOCK proxy URL
|
||||
|
||||
@ -2,7 +2,7 @@ import { createSignal } from 'solid-js';
|
||||
|
||||
import { render } from 'solid-js/web';
|
||||
|
||||
import defaultConfig from '@/config/defaults';
|
||||
import { defaultConfig } from '@/config/defaults';
|
||||
import { getSongMenu } from '@/providers/dom-elements';
|
||||
import { getSongInfo } from '@/providers/song-info-front';
|
||||
import { t } from '@/i18n';
|
||||
|
||||
@ -7,7 +7,7 @@ import previousIcon from '@assets/media-icons-black/previous.png?asset&asarUnpac
|
||||
|
||||
import { notificationImage, secondsToMinutes, ToastStyles } from './utils';
|
||||
|
||||
import getSongControls from '@/providers/song-controls';
|
||||
import { getSongControls } from '@/providers/song-controls';
|
||||
import {
|
||||
registerCallback,
|
||||
type SongInfo,
|
||||
|
||||
@ -2,8 +2,8 @@ import { type BrowserWindow, globalShortcut } from 'electron';
|
||||
import is from 'electron-is';
|
||||
import { register as registerElectronLocalShortcut } from 'electron-localshortcut';
|
||||
|
||||
import registerMPRIS from './mpris';
|
||||
import getSongControls from '@/providers/song-controls';
|
||||
import { registerMPRIS } from './mpris';
|
||||
import { getSongControls } from '@/providers/song-controls';
|
||||
|
||||
import type { ShortcutMappingType, ShortcutsPluginConfig } from './index';
|
||||
|
||||
|
||||
@ -19,8 +19,8 @@ import {
|
||||
type SongInfo,
|
||||
SongInfoEvent,
|
||||
} from '@/providers/song-info';
|
||||
import getSongControls from '@/providers/song-controls';
|
||||
import config from '@/config';
|
||||
import { getSongControls } from '@/providers/song-controls';
|
||||
import * as config from '@/config';
|
||||
import { LoggerPrefix } from '@/utils';
|
||||
|
||||
import type { RepeatMode, VolumeState } from '@/types/datahost-get-state';
|
||||
@ -84,7 +84,7 @@ function setupMPRIS() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
function registerMPRIS(win: BrowserWindow) {
|
||||
export function registerMPRIS(win: BrowserWindow) {
|
||||
const songControls = getSongControls(win);
|
||||
const {
|
||||
playPause,
|
||||
@ -363,5 +363,3 @@ function registerMPRIS(win: BrowserWindow) {
|
||||
console.trace(error);
|
||||
}
|
||||
}
|
||||
|
||||
export default registerMPRIS;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { z } from 'zod';
|
||||
import * as z from 'zod';
|
||||
|
||||
import { LRC } from '../parsers/lrc';
|
||||
import { netFetch } from '../renderer';
|
||||
|
||||
@ -7,7 +7,7 @@ import nextIcon from '@assets/media-icons-black/next.png?asset&asarUnpack';
|
||||
import previousIcon from '@assets/media-icons-black/previous.png?asset&asarUnpack';
|
||||
|
||||
import { createPlugin } from '@/utils';
|
||||
import getSongControls from '@/providers/song-controls';
|
||||
import { getSongControls } from '@/providers/song-controls';
|
||||
import {
|
||||
registerCallback,
|
||||
type SongInfo,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { nativeImage, type NativeImage, TouchBar } from 'electron';
|
||||
|
||||
import { createPlugin } from '@/utils';
|
||||
import getSongControls from '@/providers/song-controls';
|
||||
import { getSongControls } from '@/providers/song-controls';
|
||||
import { registerCallback, SongInfoEvent } from '@/providers/song-info';
|
||||
import { t } from '@/i18n';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user