mirror of
https://github.com/NoCrypt/migu.git
synced 2026-03-29 13:59:09 +00:00
feat: proper rate limit handling
This commit is contained in:
parent
9c5adcc933
commit
75c7b0d01c
5 changed files with 145 additions and 104 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Miru",
|
||||
"version": "3.1.21",
|
||||
"version": "3.2.0",
|
||||
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
|
||||
"description": "Stream anime torrents, real-time with no waiting for downloads.",
|
||||
"main": "src/index.js",
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
"electron-builder": "^23.3.3",
|
||||
"electron-notarize": "^1.1.1",
|
||||
"svelte": "^3.47.0",
|
||||
"vite": "^3.0.0",
|
||||
"vite": "3.2.4",
|
||||
"vite-plugin-commonjs": "^0.5.2"
|
||||
},
|
||||
"standard": {
|
||||
|
|
|
|||
174
pnpm-lock.yaml
174
pnpm-lock.yaml
|
|
@ -23,7 +23,7 @@ specifiers:
|
|||
svelte: ^3.47.0
|
||||
svelte-keybinds: 1.0.5
|
||||
svelte-miniplayer: 1.0.3
|
||||
vite: ^3.0.0
|
||||
vite: 3.2.4
|
||||
vite-plugin-commonjs: ^0.5.2
|
||||
webtorrent: ^1.8.26
|
||||
|
||||
|
|
@ -47,13 +47,13 @@ dependencies:
|
|||
webtorrent: 1.8.26
|
||||
|
||||
devDependencies:
|
||||
'@sveltejs/vite-plugin-svelte': 1.0.1_svelte@3.49.0+vite@3.0.4
|
||||
'@sveltejs/vite-plugin-svelte': 1.0.1_svelte@3.49.0+vite@3.2.4
|
||||
concurrently: 7.3.0
|
||||
electron: 20.1.1
|
||||
electron-builder: 23.3.3
|
||||
electron-notarize: 1.2.1
|
||||
svelte: 3.49.0
|
||||
vite: 3.0.4
|
||||
vite: 3.2.4
|
||||
vite-plugin-commonjs: 0.5.2
|
||||
|
||||
packages:
|
||||
|
|
@ -103,8 +103,17 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@esbuild/linux-loong64/0.14.53:
|
||||
resolution: {integrity: sha512-W2dAL6Bnyn4xa/QRSU3ilIK4EzD5wgYXKXJiS1HDF5vU3675qc2bvFyLwbUcdmssDveyndy7FbitrCoiV/eMLg==}
|
||||
/@esbuild/android-arm/0.15.14:
|
||||
resolution: {integrity: sha512-+Rb20XXxRGisNu2WmNKk+scpanb7nL5yhuI1KR9wQFiC43ddPj/V1fmNyzlFC9bKiG4mYzxW7egtoHVcynr+OA==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm]
|
||||
os: [android]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-loong64/0.15.14:
|
||||
resolution: {integrity: sha512-eQi9rosGNVQFJyJWV0HCA5WZae/qWIQME7s8/j8DMvnylfBv62Pbu+zJ2eUDqNf2O4u3WB+OEXyfkpBoe194sg==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [loong64]
|
||||
os: [linux]
|
||||
|
|
@ -165,7 +174,7 @@ packages:
|
|||
engines: {node: '>=6'}
|
||||
dev: true
|
||||
|
||||
/@sveltejs/vite-plugin-svelte/1.0.1_svelte@3.49.0+vite@3.0.4:
|
||||
/@sveltejs/vite-plugin-svelte/1.0.1_svelte@3.49.0+vite@3.2.4:
|
||||
resolution: {integrity: sha512-PorCgUounn0VXcpeJu+hOweZODKmGuLHsLomwqSj+p26IwjjGffmYQfVHtiTWq+NqaUuuHWWG7vPge6UFw4Aeg==}
|
||||
engines: {node: ^14.18.0 || >= 16}
|
||||
peerDependencies:
|
||||
|
|
@ -183,7 +192,7 @@ packages:
|
|||
magic-string: 0.26.2
|
||||
svelte: 3.49.0
|
||||
svelte-hmr: 0.14.12_svelte@3.49.0
|
||||
vite: 3.0.4
|
||||
vite: 3.2.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
|
@ -1255,8 +1264,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-android-64/0.14.53:
|
||||
resolution: {integrity: sha512-fIL93sOTnEU+NrTAVMIKiAw0YH22HWCAgg4N4Z6zov2t0kY9RAJ50zY9ZMCQ+RT6bnOfDt8gCTnt/RaSNA2yRA==}
|
||||
/esbuild-android-64/0.15.14:
|
||||
resolution: {integrity: sha512-HuilVIb4rk9abT4U6bcFdU35UHOzcWVGLSjEmC58OVr96q5UiRqzDtWjPlCMugjhgUGKEs8Zf4ueIvYbOStbIg==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
|
|
@ -1264,8 +1273,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-android-arm64/0.14.53:
|
||||
resolution: {integrity: sha512-PC7KaF1v0h/nWpvlU1UMN7dzB54cBH8qSsm7S9mkwFA1BXpaEOufCg8hdoEI1jep0KeO/rjZVWrsH8+q28T77A==}
|
||||
/esbuild-android-arm64/0.15.14:
|
||||
resolution: {integrity: sha512-/QnxRVxsR2Vtf3XottAHj7hENAMW2wCs6S+OZcAbc/8nlhbAL/bCQRCVD78VtI5mdwqWkVi3wMqM94kScQCgqg==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
|
@ -1273,8 +1282,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-darwin-64/0.14.53:
|
||||
resolution: {integrity: sha512-gE7P5wlnkX4d4PKvLBUgmhZXvL7lzGRLri17/+CmmCzfncIgq8lOBvxGMiQ4xazplhxq+72TEohyFMZLFxuWvg==}
|
||||
/esbuild-darwin-64/0.15.14:
|
||||
resolution: {integrity: sha512-ToNuf1uifu8hhwWvoZJGCdLIX/1zpo8cOGnT0XAhDQXiKOKYaotVNx7pOVB1f+wHoWwTLInrOmh3EmA7Fd+8Vg==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
|
@ -1282,8 +1291,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-darwin-arm64/0.14.53:
|
||||
resolution: {integrity: sha512-otJwDU3hnI15Q98PX4MJbknSZ/WSR1I45il7gcxcECXzfN4Mrpft5hBDHXNRnCh+5858uPXBXA1Vaz2jVWLaIA==}
|
||||
/esbuild-darwin-arm64/0.15.14:
|
||||
resolution: {integrity: sha512-KgGP+y77GszfYJgceO0Wi/PiRtYo5y2Xo9rhBUpxTPaBgWDJ14gqYN0+NMbu+qC2fykxXaipHxN4Scaj9tUS1A==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
|
@ -1291,8 +1300,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-freebsd-64/0.14.53:
|
||||
resolution: {integrity: sha512-WkdJa8iyrGHyKiPF4lk0MiOF87Q2SkE+i+8D4Cazq3/iqmGPJ6u49je300MFi5I2eUsQCkaOWhpCVQMTKGww2w==}
|
||||
/esbuild-freebsd-64/0.15.14:
|
||||
resolution: {integrity: sha512-xr0E2n5lyWw3uFSwwUXHc0EcaBDtsal/iIfLioflHdhAe10KSctV978Te7YsfnsMKzcoGeS366+tqbCXdqDHQA==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
|
@ -1300,8 +1309,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-freebsd-arm64/0.14.53:
|
||||
resolution: {integrity: sha512-9T7WwCuV30NAx0SyQpw8edbKvbKELnnm1FHg7gbSYaatH+c8WJW10g/OdM7JYnv7qkimw2ZTtSA+NokOLd2ydQ==}
|
||||
/esbuild-freebsd-arm64/0.15.14:
|
||||
resolution: {integrity: sha512-8XH96sOQ4b1LhMlO10eEWOjEngmZ2oyw3pW4o8kvBcpF6pULr56eeYVP5radtgw54g3T8nKHDHYEI5AItvskZg==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm64]
|
||||
os: [freebsd]
|
||||
|
|
@ -1309,8 +1318,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-linux-32/0.14.53:
|
||||
resolution: {integrity: sha512-VGanLBg5en2LfGDgLEUxQko2lqsOS7MTEWUi8x91YmsHNyzJVT/WApbFFx3MQGhkf+XdimVhpyo5/G0PBY91zg==}
|
||||
/esbuild-linux-32/0.15.14:
|
||||
resolution: {integrity: sha512-6ssnvwaTAi8AzKN8By2V0nS+WF5jTP7SfuK6sStGnDP7MCJo/4zHgM9oE1eQTS2jPmo3D673rckuCzRlig+HMA==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [ia32]
|
||||
os: [linux]
|
||||
|
|
@ -1318,8 +1327,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-linux-64/0.14.53:
|
||||
resolution: {integrity: sha512-pP/FA55j/fzAV7N9DF31meAyjOH6Bjuo3aSKPh26+RW85ZEtbJv9nhoxmGTd9FOqjx59Tc1ZbrJabuiXlMwuZQ==}
|
||||
/esbuild-linux-64/0.15.14:
|
||||
resolution: {integrity: sha512-ONySx3U0wAJOJuxGUlXBWxVKFVpWv88JEv0NZ6NlHknmDd1yCbf4AEdClSgLrqKQDXYywmw4gYDvdLsS6z0hcw==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
|
@ -1327,8 +1336,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-linux-arm/0.14.53:
|
||||
resolution: {integrity: sha512-/u81NGAVZMopbmzd21Nu/wvnKQK3pT4CrvQ8BTje1STXcQAGnfyKgQlj3m0j2BzYbvQxSy+TMck4TNV2onvoPA==}
|
||||
/esbuild-linux-arm/0.15.14:
|
||||
resolution: {integrity: sha512-D2LImAIV3QzL7lHURyCHBkycVFbKwkDb1XEUWan+2fb4qfW7qAeUtul7ZIcIwFKZgPcl+6gKZmvLgPSj26RQ2Q==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
|
@ -1336,8 +1345,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-linux-arm64/0.14.53:
|
||||
resolution: {integrity: sha512-GDmWITT+PMsjCA6/lByYk7NyFssW4Q6in32iPkpjZ/ytSyH+xeEx8q7HG3AhWH6heemEYEWpTll/eui3jwlSnw==}
|
||||
/esbuild-linux-arm64/0.15.14:
|
||||
resolution: {integrity: sha512-kle2Ov6a1e5AjlHlMQl1e+c4myGTeggrRzArQFmWp6O6JoqqB9hT+B28EW4tjFWgV/NxUq46pWYpgaWXsXRPAg==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
|
@ -1345,8 +1354,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-linux-mips64le/0.14.53:
|
||||
resolution: {integrity: sha512-d6/XHIQW714gSSp6tOOX2UscedVobELvQlPMkInhx1NPz4ThZI9uNLQ4qQJHGBGKGfu+rtJsxM4NVHLhnNRdWQ==}
|
||||
/esbuild-linux-mips64le/0.15.14:
|
||||
resolution: {integrity: sha512-FVdMYIzOLXUq+OE7XYKesuEAqZhmAIV6qOoYahvUp93oXy0MOVTP370ECbPfGXXUdlvc0TNgkJa3YhEwyZ6MRA==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [mips64el]
|
||||
os: [linux]
|
||||
|
|
@ -1354,8 +1363,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-linux-ppc64le/0.14.53:
|
||||
resolution: {integrity: sha512-ndnJmniKPCB52m+r6BtHHLAOXw+xBCWIxNnedbIpuREOcbSU/AlyM/2dA3BmUQhsHdb4w3amD5U2s91TJ3MzzA==}
|
||||
/esbuild-linux-ppc64le/0.15.14:
|
||||
resolution: {integrity: sha512-2NzH+iuzMDA+jjtPjuIz/OhRDf8tzbQ1tRZJI//aT25o1HKc0reMMXxKIYq/8nSHXiJSnYV4ODzTiv45s+h73w==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
|
|
@ -1363,8 +1372,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-linux-riscv64/0.14.53:
|
||||
resolution: {integrity: sha512-yG2sVH+QSix6ct4lIzJj329iJF3MhloLE6/vKMQAAd26UVPVkhMFqFopY+9kCgYsdeWvXdPgmyOuKa48Y7+/EQ==}
|
||||
/esbuild-linux-riscv64/0.15.14:
|
||||
resolution: {integrity: sha512-VqxvutZNlQxmUNS7Ac+aczttLEoHBJ9e3OYGqnULrfipRvG97qLrAv9EUY9iSrRKBqeEbSvS9bSfstZqwz0T4Q==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
|
|
@ -1372,8 +1381,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-linux-s390x/0.14.53:
|
||||
resolution: {integrity: sha512-OCJlgdkB+XPYndHmw6uZT7jcYgzmx9K+28PVdOa/eLjdoYkeAFvH5hTwX4AXGLZLH09tpl4bVsEtvuyUldaNCg==}
|
||||
/esbuild-linux-s390x/0.15.14:
|
||||
resolution: {integrity: sha512-+KVHEUshX5n6VP6Vp/AKv9fZIl5kr2ph8EUFmQUJnDpHwcfTSn2AQgYYm0HTBR2Mr4d0Wlr0FxF/Cs5pbFgiOw==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
|
|
@ -1381,8 +1390,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-netbsd-64/0.14.53:
|
||||
resolution: {integrity: sha512-gp2SB+Efc7MhMdWV2+pmIs/Ja/Mi5rjw+wlDmmbIn68VGXBleNgiEZG+eV2SRS0kJEUyHNedDtwRIMzaohWedQ==}
|
||||
/esbuild-netbsd-64/0.15.14:
|
||||
resolution: {integrity: sha512-6D/dr17piEgevIm1xJfZP2SjB9Z+g8ERhNnBdlZPBWZl+KSPUKLGF13AbvC+nzGh8IxOH2TyTIdRMvKMP0nEzQ==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [netbsd]
|
||||
|
|
@ -1390,8 +1399,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-openbsd-64/0.14.53:
|
||||
resolution: {integrity: sha512-eKQ30ZWe+WTZmteDYg8S+YjHV5s4iTxeSGhJKJajFfQx9TLZJvsJX0/paqwP51GicOUruFpSUAs2NCc0a4ivQQ==}
|
||||
/esbuild-openbsd-64/0.15.14:
|
||||
resolution: {integrity: sha512-rREQBIlMibBetgr2E9Lywt2Qxv2ZdpmYahR4IUlAQ1Efv/A5gYdO0/VIN3iowDbCNTLxp0bb57Vf0LFcffD6kA==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [openbsd]
|
||||
|
|
@ -1399,8 +1408,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-sunos-64/0.14.53:
|
||||
resolution: {integrity: sha512-OWLpS7a2FrIRukQqcgQqR1XKn0jSJoOdT+RlhAxUoEQM/IpytS3FXzCJM6xjUYtpO5GMY0EdZJp+ur2pYdm39g==}
|
||||
/esbuild-sunos-64/0.15.14:
|
||||
resolution: {integrity: sha512-DNVjSp/BY4IfwtdUAvWGIDaIjJXY5KI4uD82+15v6k/w7px9dnaDaJJ2R6Mu+KCgr5oklmFc0KjBjh311Gxl9Q==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [sunos]
|
||||
|
|
@ -1408,8 +1417,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-windows-32/0.14.53:
|
||||
resolution: {integrity: sha512-m14XyWQP5rwGW0tbEfp95U6A0wY0DYPInWBB7D69FAXUpBpBObRoGTKRv36lf2RWOdE4YO3TNvj37zhXjVL5xg==}
|
||||
/esbuild-windows-32/0.15.14:
|
||||
resolution: {integrity: sha512-pHBWrcA+/oLgvViuG9FO3kNPO635gkoVrRQwe6ZY1S0jdET07xe2toUvQoJQ8KT3/OkxqUasIty5hpuKFLD+eg==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
|
|
@ -1417,8 +1426,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-windows-64/0.14.53:
|
||||
resolution: {integrity: sha512-s9skQFF0I7zqnQ2K8S1xdLSfZFsPLuOGmSx57h2btSEswv0N0YodYvqLcJMrNMXh6EynOmWD7rz+0rWWbFpIHQ==}
|
||||
/esbuild-windows-64/0.15.14:
|
||||
resolution: {integrity: sha512-CszIGQVk/P8FOS5UgAH4hKc9zOaFo69fe+k1rqgBHx3CSK3Opyk5lwYriIamaWOVjBt7IwEP6NALz+tkVWdFog==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
|
@ -1426,8 +1435,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-windows-arm64/0.14.53:
|
||||
resolution: {integrity: sha512-E+5Gvb+ZWts+00T9II6wp2L3KG2r3iGxByqd/a1RmLmYWVsSVUjkvIxZuJ3hYTIbhLkH5PRwpldGTKYqVz0nzQ==}
|
||||
/esbuild-windows-arm64/0.15.14:
|
||||
resolution: {integrity: sha512-KW9W4psdZceaS9A7Jsgl4WialOznSURvqX/oHZk3gOP7KbjtHLSsnmSvNdzagGJfxbAe30UVGXRe8q8nDsOSQw==}
|
||||
engines: {node: '>=12'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
|
@ -1435,33 +1444,34 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild/0.14.53:
|
||||
resolution: {integrity: sha512-ohO33pUBQ64q6mmheX1mZ8mIXj8ivQY/L4oVuAshr+aJI+zLl+amrp3EodrUNDNYVrKJXGPfIHFGhO8slGRjuw==}
|
||||
/esbuild/0.15.14:
|
||||
resolution: {integrity: sha512-pJN8j42fvWLFWwSMG4luuupl2Me7mxciUOsMegKvwCmhEbJ2covUdFnihxm0FMIBV+cbwbtMoHgMCCI+pj1btQ==}
|
||||
engines: {node: '>=12'}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
optionalDependencies:
|
||||
'@esbuild/linux-loong64': 0.14.53
|
||||
esbuild-android-64: 0.14.53
|
||||
esbuild-android-arm64: 0.14.53
|
||||
esbuild-darwin-64: 0.14.53
|
||||
esbuild-darwin-arm64: 0.14.53
|
||||
esbuild-freebsd-64: 0.14.53
|
||||
esbuild-freebsd-arm64: 0.14.53
|
||||
esbuild-linux-32: 0.14.53
|
||||
esbuild-linux-64: 0.14.53
|
||||
esbuild-linux-arm: 0.14.53
|
||||
esbuild-linux-arm64: 0.14.53
|
||||
esbuild-linux-mips64le: 0.14.53
|
||||
esbuild-linux-ppc64le: 0.14.53
|
||||
esbuild-linux-riscv64: 0.14.53
|
||||
esbuild-linux-s390x: 0.14.53
|
||||
esbuild-netbsd-64: 0.14.53
|
||||
esbuild-openbsd-64: 0.14.53
|
||||
esbuild-sunos-64: 0.14.53
|
||||
esbuild-windows-32: 0.14.53
|
||||
esbuild-windows-64: 0.14.53
|
||||
esbuild-windows-arm64: 0.14.53
|
||||
'@esbuild/android-arm': 0.15.14
|
||||
'@esbuild/linux-loong64': 0.15.14
|
||||
esbuild-android-64: 0.15.14
|
||||
esbuild-android-arm64: 0.15.14
|
||||
esbuild-darwin-64: 0.15.14
|
||||
esbuild-darwin-arm64: 0.15.14
|
||||
esbuild-freebsd-64: 0.15.14
|
||||
esbuild-freebsd-arm64: 0.15.14
|
||||
esbuild-linux-32: 0.15.14
|
||||
esbuild-linux-64: 0.15.14
|
||||
esbuild-linux-arm: 0.15.14
|
||||
esbuild-linux-arm64: 0.15.14
|
||||
esbuild-linux-mips64le: 0.15.14
|
||||
esbuild-linux-ppc64le: 0.15.14
|
||||
esbuild-linux-riscv64: 0.15.14
|
||||
esbuild-linux-s390x: 0.15.14
|
||||
esbuild-netbsd-64: 0.15.14
|
||||
esbuild-openbsd-64: 0.15.14
|
||||
esbuild-sunos-64: 0.15.14
|
||||
esbuild-windows-32: 0.15.14
|
||||
esbuild-windows-64: 0.15.14
|
||||
esbuild-windows-arm64: 0.15.14
|
||||
dev: true
|
||||
|
||||
/escalade/3.1.1:
|
||||
|
|
@ -2497,8 +2507,8 @@ packages:
|
|||
xmlbuilder: 15.1.1
|
||||
dev: true
|
||||
|
||||
/postcss/8.4.14:
|
||||
resolution: {integrity: sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==}
|
||||
/postcss/8.4.19:
|
||||
resolution: {integrity: sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==}
|
||||
engines: {node: ^10 || ^12 || >=14}
|
||||
dependencies:
|
||||
nanoid: 3.3.4
|
||||
|
|
@ -2703,8 +2713,8 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/rollup/2.77.2:
|
||||
resolution: {integrity: sha512-m/4YzYgLcpMQbxX3NmAqDvwLATZzxt8bIegO78FZLl+lAgKJBd1DRAOeEiZcKOIOPjxE6ewHWHNgGEalFXuz1g==}
|
||||
/rollup/2.79.1:
|
||||
resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
hasBin: true
|
||||
optionalDependencies:
|
||||
|
|
@ -3329,29 +3339,35 @@ packages:
|
|||
fast-glob: 3.2.11
|
||||
dev: true
|
||||
|
||||
/vite/3.0.4:
|
||||
resolution: {integrity: sha512-NU304nqnBeOx2MkQnskBQxVsa0pRAH5FphokTGmyy8M3oxbvw7qAXts2GORxs+h/2vKsD+osMhZ7An6yK6F1dA==}
|
||||
/vite/3.2.4:
|
||||
resolution: {integrity: sha512-Z2X6SRAffOUYTa+sLy3NQ7nlHFU100xwanq1WDwqaiFiCe+25zdxP1TfCS5ojPV2oDDcXudHIoPnI1Z/66B7Yw==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
'@types/node': '>= 14'
|
||||
less: '*'
|
||||
sass: '*'
|
||||
stylus: '*'
|
||||
sugarss: '*'
|
||||
terser: ^5.4.0
|
||||
peerDependenciesMeta:
|
||||
'@types/node':
|
||||
optional: true
|
||||
less:
|
||||
optional: true
|
||||
sass:
|
||||
optional: true
|
||||
stylus:
|
||||
optional: true
|
||||
sugarss:
|
||||
optional: true
|
||||
terser:
|
||||
optional: true
|
||||
dependencies:
|
||||
esbuild: 0.14.53
|
||||
postcss: 8.4.14
|
||||
esbuild: 0.15.14
|
||||
postcss: 8.4.19
|
||||
resolve: 1.22.1
|
||||
rollup: 2.77.2
|
||||
rollup: 2.79.1
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.2
|
||||
dev: true
|
||||
|
|
|
|||
|
|
@ -111,8 +111,10 @@ function createWindow () {
|
|||
|
||||
mainWindow.webContents.session.webRequest.onHeadersReceived((details, callback) => {
|
||||
const { responseHeaders } = details
|
||||
if (!responseHeaders['access-control-allow-origin']) UpsertKeyValue(responseHeaders, 'Access-Control-Allow-Origin', ['*'])
|
||||
if (!responseHeaders['access-control-allow-credentials']) UpsertKeyValue(responseHeaders, 'Access-Control-Allow-Origin', ['*'])
|
||||
if (!responseHeaders['access-control-allow-credentials']) UpsertKeyValue(responseHeaders, 'Access-Control-Allow-Headers', ['*'])
|
||||
|
||||
const headers = { responseHeaders }
|
||||
callback(headers)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@
|
|||
releases: true,
|
||||
load: async (page = 1, perPage = 20, initial = false, force = true) => {
|
||||
if (initial) search.sort = 'START_DATE_DESC'
|
||||
return customFilter(await releasesCards(page, perPage, force, val))
|
||||
return customFilter(await releasesCards(page, Math.min(perPage, 13), force, val))
|
||||
}
|
||||
},
|
||||
...sections
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { alToken } from '@/lib/Settings.svelte'
|
||||
import { addToast } from '@/lib/Toasts.svelte'
|
||||
import lavenshtein from 'js-levenshtein'
|
||||
import { sleep } from './util.js'
|
||||
|
||||
import Bottleneck from 'bottleneck'
|
||||
|
||||
|
|
@ -63,32 +64,34 @@ const codes = {
|
|||
511: 'Network Authentication Required'
|
||||
}
|
||||
|
||||
export const alID = !!alToken && alRequest({ method: 'Viewer', token: alToken })
|
||||
if (alID) {
|
||||
alID.then(result => {
|
||||
const lists = result?.data?.Viewer?.mediaListOptions?.animeList?.customLists || []
|
||||
if (!lists.includes('Watched using Miru')) {
|
||||
alRequest({ method: 'CustomList', lists })
|
||||
}
|
||||
})
|
||||
}
|
||||
const limiter = new Bottleneck({
|
||||
reservoir: 90,
|
||||
reservoirRefreshAmount: 90,
|
||||
reservoirRefreshInterval: 60 * 1000,
|
||||
maxConcurrent: 15,
|
||||
minTime: 400
|
||||
})
|
||||
|
||||
function printError (error) {
|
||||
console.warn(error)
|
||||
addToast({
|
||||
text: /* html */`Failed making request to anilist!<br>Try again in a minute.<br>${error.status} - ${error.message || codes[error.status]}`,
|
||||
title: 'Search Failed',
|
||||
type: 'danger',
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
let rl = null
|
||||
|
||||
const limiter = new Bottleneck({ maxConcurrent: 100, minTime: 600 })
|
||||
const limit = limiter.wrap(handleRequest)
|
||||
limiter.on('failed', async (error, jobInfo) => {
|
||||
printError(error)
|
||||
|
||||
async function handleRequest (opts) {
|
||||
if (!error.statusText) {
|
||||
if (!rl) rl = sleep(61 * 1000).then(() => { rl = null })
|
||||
return 61 * 1000
|
||||
}
|
||||
const time = ((error.headers.get('retry-after') || 60) + 1) * 1000
|
||||
if (!rl) rl = sleep(time).then(() => { rl = null })
|
||||
return time
|
||||
})
|
||||
|
||||
const handleRequest = limiter.wrap(async opts => {
|
||||
await rl
|
||||
const res = await fetch('https://graphql.anilist.co', opts)
|
||||
if (!res.ok && res.status === 429) return await limit(opts)
|
||||
if (!res.ok && res.status === 429) {
|
||||
throw res
|
||||
}
|
||||
let json = null
|
||||
try {
|
||||
json = await res.json()
|
||||
|
|
@ -105,6 +108,26 @@ async function handleRequest (opts) {
|
|||
}
|
||||
}
|
||||
return json
|
||||
})
|
||||
|
||||
export const alID = !!alToken && alRequest({ method: 'Viewer', token: alToken })
|
||||
if (alID) {
|
||||
alID.then(result => {
|
||||
const lists = result?.data?.Viewer?.mediaListOptions?.animeList?.customLists || []
|
||||
if (!lists.includes('Watched using Miru')) {
|
||||
alRequest({ method: 'CustomList', lists })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function printError (error) {
|
||||
console.warn(error)
|
||||
addToast({
|
||||
text: /* html */`Failed making request to anilist!<br>Try again in a minute.<br>${error.status || 429} - ${error.message || codes[error.status || 429]}`,
|
||||
title: 'Search Failed',
|
||||
type: 'danger',
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
|
||||
export function alEntry (filemedia) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue