diff --git a/.eslintignore b/.eslintignore
deleted file mode 100644
index dd20ec6..0000000
--- a/.eslintignore
+++ /dev/null
@@ -1,5 +0,0 @@
-lib
-/videos/*.ts
-build
-dev.js
-tsc.ts
\ No newline at end of file
diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index 175b10a..0000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "env": {
- "browser": true,
- "es2021": true,
- "node": true
- },
- "extends": [
- "eslint:recommended",
- "plugin:react/recommended",
- "plugin:@typescript-eslint/recommended"
- ],
- "parser": "@typescript-eslint/parser",
- "parserOptions": {
- "ecmaFeatures": {
- "jsx": true
- },
- "ecmaVersion": 12,
- "sourceType": "module"
- },
- "plugins": [
- "react",
- "@typescript-eslint"
- ],
- "overrides": [
- {
- "files": ["gui/react/**/*"],
- "rules": {
- "no-console": 0
- }
- }
- ],
- "rules": {
- "no-console": 2,
- "react/prop-types": 0,
- "react-hooks/exhaustive-deps": 0,
- "@typescript-eslint/no-explicit-any": "off",
- "@typescript-eslint/no-unsafe-declaration-merging": "warn",
- "@typescript-eslint/no-unused-vars" : "warn",
- "indent": [
- "error",
- 2
- ],
- "linebreak-style": [
- "warn",
- "windows"
- ],
- "quotes": [
- "error",
- "single"
- ],
- "semi": [
- "error",
- "always"
- ]
- }
-}
diff --git a/eslint.config.mjs b/eslint.config.mjs
index 68875de..0770387 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -7,15 +7,6 @@ import react from 'eslint-plugin-react';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
- {
- ignores: [
- 'lib',
- '/videos/*.ts',
- 'build',
- 'dev.js',
- 'tsc.ts'
- ]
- },
{
rules: {
'no-console': 2,
@@ -54,5 +45,20 @@ export default tseslint.config(
},
parser: tseslint.parser
}
+ },
+ {
+ ignores: [
+ '**/lib',
+ '**/videos/*.ts',
+ '**/build',
+ 'dev.js',
+ 'tsc.ts'
+ ]
+ },
+ {
+ files: ['gui/react/**/*'],
+ rules: {
+ 'no-console': 0
+ }
}
);
\ No newline at end of file
diff --git a/gui/react/src/Layout.tsx b/gui/react/src/Layout.tsx
index 54bc212..478ae91 100644
--- a/gui/react/src/Layout.tsx
+++ b/gui/react/src/Layout.tsx
@@ -23,11 +23,11 @@ const Layout: React.FC = () => {
maxWidth: '93rem',
maxHeight: '3rem'
//backgroundColor: '#ffffff',
- }}>
+ }}>
- } onClick={() => messageHandler?.openFolder('content')} sx={{ height: '37px' }}>Open Output Directory
- } onClick={() => messageHandler?.clearQueue() } sx={{ height: '37px' }}>Clear Queue
+ } onClick={() => messageHandler?.openFolder('content')} sx={{ height: '37px' }}>Open Output Directory
+ } onClick={() => messageHandler?.clearQueue() } sx={{ height: '37px' }}>Clear Queue
diff --git a/gui/react/src/Style.tsx b/gui/react/src/Style.tsx
index 8ac45f8..1195472 100644
--- a/gui/react/src/Style.tsx
+++ b/gui/react/src/Style.tsx
@@ -11,8 +11,8 @@ const makeTheme = (mode: 'dark'|'light') : Partial => {
const Style: FCWithChildren = ({children}) => {
return
-
- {children}
+
+ {children}
;
};
diff --git a/gui/react/src/components/AddToQueue/DownloadSelector/DownloadSelector.tsx b/gui/react/src/components/AddToQueue/DownloadSelector/DownloadSelector.tsx
index 9707dc6..586518b 100644
--- a/gui/react/src/components/AddToQueue/DownloadSelector/DownloadSelector.tsx
+++ b/gui/react/src/components/AddToQueue/DownloadSelector/DownloadSelector.tsx
@@ -86,240 +86,240 @@ const DownloadSelector: React.FC = ({ onFinish }) => {
flexDirection: 'column',
alignItems: 'center',
margin: '5px',
- }}>
-
-
-
- General Options
-
- {
- dispatch({
- type: 'downloadOptions',
- payload: { ...store.downloadOptions, id: e.target.value }
- });
- }} label='Show ID'/>
- {
- const parsed = parseInt(e.target.value);
- if (isNaN(parsed) || parsed < 0 || parsed > 10)
- return;
- dispatch({
- type: 'downloadOptions',
- payload: { ...store.downloadOptions, q: parsed }
- });
- }} label='Quality Level (0 for max)'/>
-
-
-
-
-
-
- Simulcast is only supported on Hidive
- }
- arrow placement='top'
- >
-
-
-
-
-
-
-
- Episode Options
-
- {
+
+ General Options
+
+ {
dispatch({
type: 'downloadOptions',
- payload: { ...store.downloadOptions, e: e.target.value }
+ payload: { ...store.downloadOptions, id: e.target.value }
});
- }} placeholder='Episode Select'/>
-
- List
Episodes
+ }} label='Show ID'/>
+ {
+ const parsed = parseInt(e.target.value);
+ if (isNaN(parsed) || parsed < 0 || parsed > 10)
+ return;
+ dispatch({
+ type: 'downloadOptions',
+ payload: { ...store.downloadOptions, q: parsed }
+ });
+ }} label='Quality Level (0 for max)'/>
+
+
+
+
+
+
+ Simulcast is only supported on Hidive
+ }
+ arrow placement='top'
+ >
+
+
+
+
-
-
-
-
-
+
+ Episode Options
+
+
+
+ {
+ dispatch({
+ type: 'downloadOptions',
+ payload: { ...store.downloadOptions, e: e.target.value }
+ });
+ }} placeholder='Episode Select'/>
+
+ List
Episodes
+
+
+
+
+
+
-
+ }}>
+
Language Options
-
- {
- dispatch({
- type: 'downloadOptions',
- payload: { ...store.downloadOptions, dubLang: e }
- });
- }}
- allOption
- />
+
+ {
+ dispatch({
+ type: 'downloadOptions',
+ payload: { ...store.downloadOptions, dubLang: e }
+ });
+ }}
+ allOption
+ />
- {
- dispatch({
- type: 'downloadOptions',
- payload: { ...store.downloadOptions, dlsubs: e }
- });
- }}
- />
- {
+ dispatch({
+ type: 'downloadOptions',
+ payload: { ...store.downloadOptions, dlsubs: e }
+ });
+ }}
+ />
+
Hardsubs are only supported on Crunchyroll
- }
+ }
arrow placement='top'>
-
+
-
-
- Hardsub Language
-
-
-
+
+
+ Hardsub Language
+
+
+
-
+
Downloads the hardsub version of the selected subtitle.
Subtitles are displayed PERMANENTLY!
You can choose only 1 subtitle per video!
-
- } arrow placement='top'>
-
-
+
+ } arrow placement='top'>
+
+
+
+
-
-
-
-
- {
- dispatch({
- type: 'downloadOptions',
- payload: { ...store.downloadOptions, fileName: e.target.value }
- });
- }} sx={{ width: '87%' }} label='Filename Overwrite' />
-
+
+
+ {
+ dispatch({
+ type: 'downloadOptions',
+ payload: { ...store.downloadOptions, fileName: e.target.value }
+ });
+ }} sx={{ width: '87%' }} label='Filename Overwrite' />
+
Click here to see the documentation
-
- } arrow placement='top'>
-
-
-
-
+
+ } arrow placement='top'>
+
+
+
+
- Add to Queue
+ Add to Queue
;
};
diff --git a/gui/react/src/components/AddToQueue/DownloadSelector/Listing/EpisodeListing.tsx b/gui/react/src/components/AddToQueue/DownloadSelector/Listing/EpisodeListing.tsx
index d3668a2..0d34d96 100644
--- a/gui/react/src/components/AddToQueue/DownloadSelector/Listing/EpisodeListing.tsx
+++ b/gui/react/src/components/AddToQueue/DownloadSelector/Listing/EpisodeListing.tsx
@@ -75,21 +75,21 @@ const EpisodeListing: React.FC = () => {
{store.episodeListing.filter((a) => season === 'all' ? true : a.season === season).map((item, index, { length }) => {
const e = isNaN(parseInt(item.e)) ? item.e : parseInt(item.e);
- const idStr = `S${item.season}E${e}`
+ const idStr = `S${item.season}E${e}`;
const isSelected = selected.includes(e.toString());
const imageRef = React.createRef();
const summaryRef = React.createRef();
return
{
- let arr: string[] = [];
- if (isSelected) {
- arr = [...selected.filter(a => a !== e.toString())];
- } else {
- arr = [...selected, e.toString()];
- }
- setSelected(arr.filter(a => a.length > 0));
- }}>
+ onClick={() => {
+ let arr: string[] = [];
+ if (isSelected) {
+ arr = [...selected.filter(a => a !== e.toString())];
+ } else {
+ arr = [...selected, e.toString()];
+ }
+ setSelected(arr.filter(a => a.length > 0));
+ }}>
{ isSelected ? : }
{idStr}
@@ -133,9 +133,9 @@ const EpisodeListing: React.FC = () => {
await navigator.clipboard.writeText(item.description!);
enqueueSnackbar('Copied summary to clipboard', {
variant: 'info'
- })
+ });
},
- text: "Copy summary to clipboard"
+ text: 'Copy summary to clipboard'
}
]} popupItem={summaryRef} />
{index < length - 1 && }
diff --git a/gui/react/src/components/AddToQueue/SearchBox/SearchBox.tsx b/gui/react/src/components/AddToQueue/SearchBox/SearchBox.tsx
index 6e6e56c..855f26d 100644
--- a/gui/react/src/components/AddToQueue/SearchBox/SearchBox.tsx
+++ b/gui/react/src/components/AddToQueue/SearchBox/SearchBox.tsx
@@ -100,9 +100,9 @@ const SearchBox: React.FC = () => {
await navigator.clipboard.writeText(a.desc!);
enqueueSnackbar('Copied summary to clipboard', {
variant: 'info'
- })
+ });
},
- text: "Copy summary to clipboard"
+ text: 'Copy summary to clipboard'
}
]} popupItem={summaryRef} />
}
diff --git a/gui/react/src/components/MainFrame/Queue/Queue.tsx b/gui/react/src/components/MainFrame/Queue/Queue.tsx
index 315354a..7707f74 100644
--- a/gui/react/src/components/MainFrame/Queue/Queue.tsx
+++ b/gui/react/src/components/MainFrame/Queue/Queue.tsx
@@ -17,113 +17,9 @@ const Queue: React.FC = () => {
return data || queue.length > 0 ? <>
{data && <>
-
-
-
-
-
-
-
-
- {data.downloadInfo.parent.title}
-
-
- {data.downloadInfo.title}
-
-
-
-
-
- Downloading: {data.downloadInfo.language.name}
-
-
-
-
-
-
-
- {data.progress.cur} / {(data.progress.total)} parts ({data.progress.percent}% | {formatTime(data.progress.time)} | {(data.progress.downloadSpeed / 1024 / 1024).toFixed(2)} MB/s | {(data.progress.bytes / 1024 / 1024).toFixed(2)}MB)
-
-
-
-
-
-
- >
- }
- {
- current && !data && <>
@@ -137,104 +33,208 @@ const Queue: React.FC = () => {
boxShadow: '0px 0px 50px #00000090',
borderRadius: '10px',
display: 'flex',
- overflow: 'hidden',
transition: '250ms'
- }}>
-
+
-
-
-
-
-
- {current.parent.title}
-
-
- {current.title}
-
-
-
-
-
-
- Downloading:
-
-
-
-
-
-
-
-
-
+
- 0 / ? parts (0% | XX:XX | 0 MB/s | 0MB)
-
+
+
+
+
+ {data.downloadInfo.parent.title}
+
+
+ {data.downloadInfo.title}
+
+
+
+
+
+ Downloading: {data.downloadInfo.language.name}
+
+
+
+
+
+
+
+ {data.progress.cur} / {(data.progress.total)} parts ({data.progress.percent}% | {formatTime(data.progress.time)} | {(data.progress.downloadSpeed / 1024 / 1024).toFixed(2)} MB/s | {(data.progress.bytes / 1024 / 1024).toFixed(2)}MB)
+
+
+
+
+ >
+ }
+ {
+ current && !data && <>
+
+
+
+
+
+
+
+
+ {current.parent.title}
+
+
+ {current.title}
+
+
+
+
+
+
+ Downloading:
+
+
+
+
+
+
+
+
+
+ 0 / ? parts (0% | XX:XX | 0 MB/s | 0MB)
+
+
+
+
+
-
-
>
}
{queue.map((queueItem, index, { length }) => {
@@ -255,7 +255,7 @@ const Queue: React.FC = () => {
borderRadius: '10px',
display: 'flex',
overflow: 'hidden',
- }}>
+ }}>
{
display: 'flex',
width: '100%',
justifyContent: 'space-between',
+ }}>
+
-
-
- {queueItem.parent.title}
-
-
- S{queueItem.parent.season}E{queueItem.episode}
-
-
- {queueItem.title}
-
-
-
+ {queueItem.parent.title}
+
+
+ S{queueItem.parent.season}E{queueItem.episode}
+
+
+ {queueItem.title}
+
+
+
+
-
Dub(s): {queueItem.dubLang.join(', ')}
-
-
- Sub(s): {queueItem.dlsubs.join(', ')}
-
-
- Quality: {queueItem.q}
-
-
-
+
+ Sub(s): {queueItem.dlsubs.join(', ')}
+
+
+ Quality: {queueItem.q}
+
+
+
{
- msg.removeFromQueue(index);
- }}
- sx={{
- backgroundColor: '#ff573a25',
- height: '40px',
- transition: '250ms',
- '&:hover' : {
- backgroundColor: '#ff573a',
- }
- }}>
+ onClick={() => {
+ msg.removeFromQueue(index);
+ }}
+ sx={{
+ backgroundColor: '#ff573a25',
+ height: '40px',
+ transition: '250ms',
+ '&:hover' : {
+ backgroundColor: '#ff573a',
+ }
+ }}>
-
-
-
+
+
+
;
})}
> : {
+ }}>
+ }}>
@@ -396,12 +396,12 @@ const Queue: React.FC = () => {
+ }}>
+ }}>
diff --git a/gui/react/src/components/MenuBar/MenuBar.tsx b/gui/react/src/components/MenuBar/MenuBar.tsx
index 9efae16..23f5bb6 100644
--- a/gui/react/src/components/MenuBar/MenuBar.tsx
+++ b/gui/react/src/components/MenuBar/MenuBar.tsx
@@ -2,7 +2,7 @@ import { Box, Button, Menu, MenuItem, Typography } from '@mui/material';
import React from 'react';
import { messageChannelContext } from '../../provider/MessageChannel';
import useStore from '../../hooks/useStore';
-import { StoreState } from '../../provider/Store'
+import { StoreState } from '../../provider/Store';
const MenuBar: React.FC = () => {
const [ openMenu, setMenuOpen ] = React.useState<'settings'|'help'|undefined>();
@@ -15,20 +15,20 @@ const MenuBar: React.FC = () => {
type: 'version',
payload: await messageChannel?.version()
});
- }
+ };
getVersion();
const transformService = (service: StoreState['service']) => {
switch(service) {
- case 'crunchy':
- return "Crunchyroll"
- case 'funi':
- return "Funimation"
- case "hidive":
- return "Hidive"
+ case 'crunchy':
+ return 'Crunchyroll';
+ case 'funi':
+ return 'Funimation';
+ case 'hidive':
+ return 'Hidive';
}
- }
+ };
const msg = React.useContext(messageChannelContext);
@@ -46,12 +46,12 @@ const MenuBar: React.FC = () => {
return
-