Skip to content

Commit

Permalink
fix:avoid unnecessary import. (#237)
Browse files Browse the repository at this point in the history
Co-authored-by: lixiancan <lixc.percy@gmail.com>
  • Loading branch information
PercyAtFj and PercyAtFj authored Feb 2, 2024
1 parent 71b19fa commit 1868e27
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion enjoy/src/main/db/models/audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion enjoy/src/main/db/models/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion enjoy/src/main/ffmpeg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion enjoy/src/main/whisper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
2 changes: 1 addition & 1 deletion enjoy/src/main/youtubedr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion enjoy/src/renderer/components/medias/media-player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion enjoy/src/renderer/components/stories/story-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 1868e27

Please sign in to comment.