code refactoring, dependencies update
This commit is contained in:
@@ -9,28 +9,28 @@
|
|||||||
"author": "marcopeocchi",
|
"author": "marcopeocchi",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.10.6",
|
"@emotion/react": "^11.11.0",
|
||||||
"@emotion/styled": "^11.10.6",
|
"@emotion/styled": "^11.11.0",
|
||||||
"@mui/icons-material": "^5.11.16",
|
"@mui/icons-material": "^5.11.16",
|
||||||
"@mui/material": "^5.12.0",
|
"@mui/material": "^5.13.2",
|
||||||
"@reduxjs/toolkit": "^1.9.3",
|
"@reduxjs/toolkit": "^1.9.5",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-redux": "^8.0.5",
|
"react-redux": "^8.0.5",
|
||||||
"react-router-dom": "^6.9.0",
|
"react-router-dom": "^6.11.2",
|
||||||
"rxjs": "^7.8.0",
|
"rxjs": "^7.8.1",
|
||||||
"uuid": "^9.0.0"
|
"uuid": "^9.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@modyfi/vite-plugin-yaml": "^1.0.4",
|
"@modyfi/vite-plugin-yaml": "^1.0.4",
|
||||||
"@types/node": "^18.15.11",
|
"@types/node": "^20.2.4",
|
||||||
"@types/react": "^18.0.35",
|
"@types/react": "^18.2.7",
|
||||||
"@types/react-dom": "^18.0.10",
|
"@types/react-dom": "^18.0.10",
|
||||||
"@types/react-router-dom": "^5.3.3",
|
"@types/react-router-dom": "^5.3.3",
|
||||||
"@types/uuid": "^9.0.1",
|
"@types/uuid": "^9.0.1",
|
||||||
"@vitejs/plugin-react": "^3.1.0",
|
"@vitejs/plugin-react": "^4.0.0",
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
"typescript": "^5.0.4",
|
"typescript": "^5.0.4",
|
||||||
"vite": "^4.2.1"
|
"vite": "^4.3.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -57,8 +57,9 @@ export default function Downloaded() {
|
|||||||
|
|
||||||
const fetcherSubfolder = (sub: string) => {
|
const fetcherSubfolder = (sub: string) => {
|
||||||
const folders = sub.split('/')
|
const folders = sub.split('/')
|
||||||
|
|
||||||
let subdir = folders.length > 2
|
let subdir = folders.length > 2
|
||||||
? folders.slice(-2).join('/')
|
? folders.slice(-(folders.length - 1)).join('/')
|
||||||
: folders.pop()
|
: folders.pop()
|
||||||
|
|
||||||
fetch(`${serverAddr}/downloaded`, {
|
fetch(`${serverAddr}/downloaded`, {
|
||||||
@@ -142,9 +143,9 @@ export default function Downloaded() {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<List sx={{ width: '100%', bgcolor: 'background.paper' }}>
|
<List sx={{ width: '100%', bgcolor: 'background.paper' }}>
|
||||||
{selectable.length === 0 && 'No files found'}
|
{selectable.length === 0 && 'No files found'}
|
||||||
{selectable.map((file) => (
|
{selectable.map((file, idx) => (
|
||||||
<ListItem
|
<ListItem
|
||||||
key={file.shaSum}
|
key={idx}
|
||||||
secondaryAction={
|
secondaryAction={
|
||||||
!file.isDirectory && <Checkbox
|
!file.isDirectory && <Checkbox
|
||||||
edge="end"
|
edge="end"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import (
|
|||||||
"github.com/marcopeocchi/yt-dlp-web-ui/server/cli"
|
"github.com/marcopeocchi/yt-dlp-web-ui/server/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
// In-Memory volatile Thread-Safe Key-Value Storage
|
// In-Memory Thread-Safe Key-Value Storage with optional persistence
|
||||||
type MemoryDB struct {
|
type MemoryDB struct {
|
||||||
table sync.Map
|
table sync.Map
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user