fixed excessive storage usage

This commit is contained in:
stratuma 2024-05-09 02:09:37 +02:00
parent c4f299bcb3
commit 65ff0e373a
13 changed files with 708 additions and 432 deletions

1
.npmrc
View File

@ -1,4 +1,3 @@
node-linker=hoisted
shamefully-hoist=true
public-hoist-pattern=*
strict-peer-dependencies=false

1
.nvmrc
View File

@ -1 +0,0 @@
16.19.1

View File

@ -1 +0,0 @@
nodeLinker: "node-modules"

View File

@ -15,6 +15,8 @@ const options = {
nodeGypRebuild: true,
buildDependenciesFromSource: true,
includeSubNodeModules: false,
publish: {
provider: 'github',
releaseType: 'release'
@ -25,6 +27,7 @@ const options = {
},
win: {
compression: 'maximum',
artifactName: 'crunchyroll-downloader-${version}-windows-installer.${ext}',
icon: 'public/favicon.ico',
target: [

View File

@ -53,7 +53,6 @@ async function openSettings() {
}
async function openAddAnime() {
;(window as any).myAPI.openWindow({
title: 'Add Anime',
url: isProduction ? 'http://localhost:8079/addanime' : 'http://localhost:3000/addanime',

View File

@ -1,16 +1,12 @@
<template>
<div class="relative flex flex-col items-center justify-center h-full" style="-webkit-app-region: no-drag">
<div class="relative flex flex-col items-center justify-center h-full" style="-webkit-app-region: no-drag">
<img src="/logo.png" class="h-24" />
<div class="text-base text-center leading-[18px]">
Crunchyroll <br>
Crunchyroll <br />
Downloader
</div>
<div class="text-sm mt-1 text-gray-200">
v1.1.3
</div>
<div class="absolute right-0 bottom-0 text-xs text-gray-200">
Made by Stratum
</div>
<div class="text-sm mt-1 text-gray-200"> v1.1.3 </div>
<div class="absolute right-0 bottom-0 text-xs text-gray-200"> Made by Stratum </div>
</div>
</template>

View File

@ -6,7 +6,7 @@
<Icon v-if="account.service === 'CR'" name="simple-icons:crunchyroll" class="h-6 w-6 text-white" />
<Icon v-if="account.service === 'ADN'" name="arcticons:animeultima" class="h-6 w-6 text-white" />
<div class="text-xs ml-1.5">
{{ services.find(s => s.service === account.service)?.name }}
{{ services.find((s) => s.service === account.service)?.name }}
</div>
<div class="text-xs ml-auto">
{{ account.username }}
@ -50,8 +50,7 @@ const getAccounts = async () => {
accounts.value = data.value
}
getAccounts();
getAccounts()
const deleteAccount = async (id: number) => {
const { error } = await useFetch(`http://localhost:9941/api/service/account/${id}`, {
@ -63,9 +62,8 @@ const deleteAccount = async (id: number) => {
return
}
getAccounts();
getAccounts()
}
</script>
<style></style>

View File

@ -27,14 +27,15 @@
"concurrently": "^8.2.2",
"dotenv": "^16.4.5",
"electron": "^30.0.2",
"electron-builder": "^24.6.3",
"electron-builder": "^24.13.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-prettier": "^4.2.1",
"modclean": "3.0.0-beta.1",
"nuxt": "^3.11.2",
"nuxt-icon": "^0.6.10",
"prettier": "^2.8.8",
"sass": "^1.76.0",
"sass": "^1.77.0",
"sass-loader": "^13.3.3",
"tsc-watch": "^6.2.0",
"typescript": "^5.4.5",
@ -51,7 +52,7 @@
"electron-settings": "^4.0.4",
"electron-updater": "^6.1.8",
"express": "^4.19.2",
"fastify": "^4.26.2",
"fastify": "^4.27.0",
"fluent-ffmpeg": "^2.1.2",
"jsencrypt": "^3.3.2",
"long": "^5.2.3",
@ -63,6 +64,16 @@
"sqlite3": "5.1.6"
},
"build": {
"files": [
"!**/pages/*",
"!**/ffmpeg/*",
"!**/mp4decrypt/*",
"!**/keys/*",
"!**/.git/*",
"!**/.github/*",
"!**/.nuxt/*",
"!**/.vscode/*"
],
"extraResources": [
"./ffmpeg/**",
"./mp4decrypt/**",

File diff suppressed because it is too large Load Diff

View File

@ -187,7 +187,7 @@ export async function crunchyGetPlaylistMPD(q: string) {
if (!account) return
const { data, error } = await crunchyLogin(account.username, account.password)
const { data } = await crunchyLogin(account.username, account.password)
if (!data) return

View File

@ -66,12 +66,8 @@ export async function loginController(
return reply.code(200).send()
}
export async function getAllAccountsHandler(
request: FastifyRequest,
reply: FastifyReply
) {
const accounts = await getAllAccounts();
export async function getAllAccountsHandler(request: FastifyRequest, reply: FastifyReply) {
const accounts = await getAllAccounts()
return reply.code(200).send(accounts)
}
@ -79,12 +75,11 @@ export async function getAllAccountsHandler(
export async function deleteAccountHandler(
request: FastifyRequest<{
Params: {
id: number,
id: number
}
}>,
reply: FastifyReply
) {
try {
await deleteAccountID(request.params.id)
} catch (e) {

View File

@ -24,7 +24,7 @@ const exec = util.promisify(require('child_process').exec)
// Get All Accounts
export async function getAllAccounts() {
const accounts = await Account.findAll({
attributes: {exclude: ['password']},
attributes: { exclude: ['password'] }
})
return accounts

View File

@ -1,9 +0,0 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [],
theme: {
extend: {},
},
plugins: [],
}