fix:avoid unnecessary import. (#237)

Co-authored-by: lixiancan <lixc.percy@gmail.com>
This commit is contained in:
Percy Lee
2024-02-02 14:03:07 +08:00
committed by GitHub
parent 71b19fa9ce
commit 1868e27c0f
7 changed files with 9 additions and 7 deletions

View File

@@ -27,7 +27,7 @@ import storage from "@main/storage";
import Ffmpeg from "@main/ffmpeg";
import { Client } from "@/api";
import { WEB_API_URL } from "@/constants";
import { startCase } from "lodash";
import startCase from "lodash/startCase";
import { v5 as uuidv5 } from "uuid";
const SIZE_LIMIT = 1024 * 1024 * 50; // 50MB

View File

@@ -27,7 +27,7 @@ import storage from "@main/storage";
import Ffmpeg from "@main/ffmpeg";
import { Client } from "@/api";
import { WEB_API_URL } from "@/constants";
import { startCase } from "lodash";
import startCase from "lodash/startCase";
import { v5 as uuidv5 } from "uuid";
const SIZE_LIMIT = 1024 * 1024 * 100; // 100MB

View File

@@ -9,7 +9,7 @@ import downloader from "@main/downloader";
import storage from "@main/storage";
import readdirp from "readdirp";
import { t } from "i18next";
import { uniq } from "lodash";
import uniq from "lodash/uniq";
const logger = log.scope("ffmpeg");
export default class FfmpegWrapper {

View File

@@ -15,7 +15,8 @@ import { milisecondsToTimestamp } from "@/utils";
import { AzureSpeechSdk } from "@main/azure-speech-sdk";
import { Client } from "@/api";
import { WEB_API_URL } from "@/constants";
import { sortedUniqBy, take } from "lodash";
import take from "lodash/take";
import sortedUniqBy from "lodash/sortedUniqBy";
const logger = log.scope("whisper");

View File

@@ -4,7 +4,7 @@ import { exec } from "child_process";
import fs from "fs-extra";
import os from "os";
import log from "electron-log/main";
import { snakeCase } from "lodash";
import snakeCase from "lodash/snakeCase";
import settings from "@main/settings";
const logger = log.scope("YOUTUBEDR");

View File

@@ -13,7 +13,7 @@ import { secondsToTimestamp } from "@renderer/lib/utils";
import WaveSurfer from "wavesurfer.js";
import { useDebounce } from "@uidotdev/usehooks";
import { AppSettingsProviderContext } from "@renderer/context";
import { cloneDeep } from "lodash";
import cloneDeep from "lodash/cloneDeep";
import {
MediaPlayer as VidstackMediaPlayer,
MediaProvider,

View File

@@ -9,7 +9,8 @@ import {
PopoverAnchor,
} from "@renderer/components/ui";
import { SelectionMenu } from "@renderer/components";
import { debounce, uniq } from "lodash";
import uniq from "lodash/uniq";
import debounce from "lodash/debounce";
import Mark from "mark.js";
export const StoryViewer = (props: {