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 node-linker=hoisted
shamefully-hoist=true shamefully-hoist=true
public-hoist-pattern=* 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, nodeGypRebuild: true,
buildDependenciesFromSource: true, buildDependenciesFromSource: true,
includeSubNodeModules: false,
publish: { publish: {
provider: 'github', provider: 'github',
releaseType: 'release' releaseType: 'release'
@ -25,6 +27,7 @@ const options = {
}, },
win: { win: {
compression: 'maximum',
artifactName: 'crunchyroll-downloader-${version}-windows-installer.${ext}', artifactName: 'crunchyroll-downloader-${version}-windows-installer.${ext}',
icon: 'public/favicon.ico', icon: 'public/favicon.ico',
target: [ target: [

View File

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

View File

@ -1,16 +1,12 @@
<template> <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" /> <img src="/logo.png" class="h-24" />
<div class="text-base text-center leading-[18px]"> <div class="text-base text-center leading-[18px]">
Crunchyroll <br> Crunchyroll <br />
Downloader Downloader
</div> </div>
<div class="text-sm mt-1 text-gray-200"> <div class="text-sm mt-1 text-gray-200"> v1.1.3 </div>
v1.1.3 <div class="absolute right-0 bottom-0 text-xs text-gray-200"> Made by Stratum </div>
</div>
<div class="absolute right-0 bottom-0 text-xs text-gray-200">
Made by Stratum
</div>
</div> </div>
</template> </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 === '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" /> <Icon v-if="account.service === 'ADN'" name="arcticons:animeultima" class="h-6 w-6 text-white" />
<div class="text-xs ml-1.5"> <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>
<div class="text-xs ml-auto"> <div class="text-xs ml-auto">
{{ account.username }} {{ account.username }}
@ -50,8 +50,7 @@ const getAccounts = async () => {
accounts.value = data.value accounts.value = data.value
} }
getAccounts(); getAccounts()
const deleteAccount = async (id: number) => { const deleteAccount = async (id: number) => {
const { error } = await useFetch(`http://localhost:9941/api/service/account/${id}`, { const { error } = await useFetch(`http://localhost:9941/api/service/account/${id}`, {
@ -63,9 +62,8 @@ const deleteAccount = async (id: number) => {
return return
} }
getAccounts(); getAccounts()
} }
</script> </script>
<style></style> <style></style>

View File

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

View File

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

View File

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

View File

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