This commit is contained in:
Cynthia Foxwell 2023-09-12 22:24:17 -06:00
parent 768e1982eb
commit 1ee1cafbb4
4 changed files with 94 additions and 183 deletions

View file

@ -27,8 +27,7 @@
"murmurhash": "^2.0.1",
"node-ffprobe": "^3.0.0",
"sharp": "^0.32.0",
"sqlite3": "^5.1.6",
"youtubei.js": "^4.3.0"
"sqlite3": "^5.1.6"
},
"devDependencies": {
"eslint": "^8.39.0",

View file

@ -1,5 +1,9 @@
lockfileVersion: '6.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
'@ctrl/tinycolor':
specifier: ^3.6.0
@ -31,9 +35,6 @@ dependencies:
sqlite3:
specifier: ^5.1.6
version: 5.1.6
youtubei.js:
specifier: ^4.3.0
version: 4.3.0
devDependencies:
eslint:
@ -99,6 +100,7 @@ packages:
/@gar/promisify@1.1.3:
resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==}
requiresBuild: true
dev: false
optional: true
@ -885,6 +887,7 @@ packages:
/@npmcli/fs@1.1.1:
resolution: {integrity: sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==}
requiresBuild: true
dependencies:
'@gar/promisify': 1.1.3
semver: 7.5.0
@ -895,6 +898,7 @@ packages:
resolution: {integrity: sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==}
engines: {node: '>=10'}
deprecated: This functionality has been moved to @npmcli/fs
requiresBuild: true
dependencies:
mkdirp: 1.0.4
rimraf: 3.0.2
@ -950,6 +954,7 @@ packages:
/@tootallnate/once@1.1.2:
resolution: {integrity: sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==}
engines: {node: '>= 6'}
requiresBuild: true
dev: false
optional: true
@ -975,6 +980,7 @@ packages:
/abbrev@1.1.1:
resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==}
requiresBuild: true
dev: false
/acorn-jsx@5.3.2(acorn@8.8.2):
@ -989,6 +995,7 @@ packages:
resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==}
engines: {node: '>=0.4.0'}
hasBin: true
dev: true
/agent-base@6.0.2:
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
@ -1002,6 +1009,7 @@ packages:
/agentkeepalive@4.3.0:
resolution: {integrity: sha512-7Epl1Blf4Sy37j4v9f9FjICCh4+KAQOyXgHEwlyBiAQLbhKdq/i2QQU3amQalS/wPhdPzDXPL5DMR5bkn+YeWg==}
engines: {node: '>= 8.0.0'}
requiresBuild: true
dependencies:
debug: 4.3.4
depd: 2.0.0
@ -1014,6 +1022,7 @@ packages:
/aggregate-error@3.1.0:
resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==}
engines: {node: '>=8'}
requiresBuild: true
dependencies:
clean-stack: 2.2.0
indent-string: 4.0.0
@ -1059,6 +1068,7 @@ packages:
/are-we-there-yet@3.0.1:
resolution: {integrity: sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==}
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
requiresBuild: true
dependencies:
delegates: 1.0.0
readable-stream: 3.6.2
@ -1105,10 +1115,6 @@ packages:
resolution: {integrity: sha512-vHdS19CnY3hwiNdkaqk93DvjVLfbEcI8mys4UjuWrlX1haDmroo8o4xCzh4wD6DGV6HxRCyauwhHRqMTfERtjw==}
dev: false
/boolbase@1.0.0:
resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==}
dev: false
/brace-expansion@1.1.11:
resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}
dependencies:
@ -1127,16 +1133,10 @@ packages:
ieee754: 1.2.1
dev: false
/busboy@1.6.0:
resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==}
engines: {node: '>=10.16.0'}
dependencies:
streamsearch: 1.1.0
dev: false
/cacache@15.3.0:
resolution: {integrity: sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==}
engines: {node: '>= 10'}
requiresBuild: true
dependencies:
'@npmcli/fs': 1.1.1
'@npmcli/move-file': 1.1.2
@ -1191,6 +1191,7 @@ packages:
/clean-stack@2.2.0:
resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==}
engines: {node: '>=6'}
requiresBuild: true
dev: false
optional: true
@ -1267,25 +1268,6 @@ packages:
which: 2.0.2
dev: true
/css-select@5.1.0:
resolution: {integrity: sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==}
dependencies:
boolbase: 1.0.0
css-what: 6.1.0
domhandler: 5.0.3
domutils: 3.0.1
nth-check: 2.1.1
dev: false
/css-what@6.1.0:
resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==}
engines: {node: '>= 6'}
dev: false
/cssom@0.5.0:
resolution: {integrity: sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==}
dev: false
/dashdash@1.14.1:
resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==}
engines: {node: '>=0.10'}
@ -1327,6 +1309,7 @@ packages:
/depd@2.0.0:
resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==}
engines: {node: '>= 0.8'}
requiresBuild: true
dev: false
optional: true
@ -1342,37 +1325,10 @@ packages:
esutils: 2.0.3
dev: true
/dom-serializer@2.0.0:
resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==}
dependencies:
domelementtype: 2.3.0
domhandler: 5.0.3
entities: 4.5.0
dev: false
/dom-walk@0.1.2:
resolution: {integrity: sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==}
dev: false
/domelementtype@2.3.0:
resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==}
dev: false
/domhandler@5.0.3:
resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==}
engines: {node: '>= 4'}
dependencies:
domelementtype: 2.3.0
dev: false
/domutils@3.0.1:
resolution: {integrity: sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==}
dependencies:
dom-serializer: 2.0.0
domelementtype: 2.3.0
domhandler: 5.0.3
dev: false
/duplexer3@0.1.5:
resolution: {integrity: sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==}
dev: false
@ -1402,19 +1358,16 @@ packages:
once: 1.4.0
dev: false
/entities@4.5.0:
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
engines: {node: '>=0.12'}
dev: false
/env-paths@2.2.1:
resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==}
engines: {node: '>=6'}
requiresBuild: true
dev: false
optional: true
/err-code@2.0.3:
resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==}
requiresBuild: true
dev: false
optional: true
@ -1599,6 +1552,7 @@ packages:
/fs.realpath@1.0.0:
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
requiresBuild: true
/gauge@3.0.2:
resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==}
@ -1618,6 +1572,7 @@ packages:
/gauge@4.0.4:
resolution: {integrity: sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==}
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
requiresBuild: true
dependencies:
aproba: 2.0.0
color-support: 1.1.3
@ -1661,6 +1616,7 @@ packages:
/glob@7.2.3:
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
requiresBuild: true
dependencies:
fs.realpath: 1.0.0
inflight: 1.0.6
@ -1711,6 +1667,7 @@ packages:
/graceful-fs@4.2.11:
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
requiresBuild: true
dev: false
optional: true
@ -1727,27 +1684,16 @@ packages:
resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==}
dev: false
/html-escaper@3.0.3:
resolution: {integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==}
dev: false
/htmlparser2@8.0.2:
resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==}
dependencies:
domelementtype: 2.3.0
domhandler: 5.0.3
domutils: 3.0.1
entities: 4.5.0
dev: false
/http-cache-semantics@4.1.1:
resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==}
requiresBuild: true
dev: false
optional: true
/http-proxy-agent@4.0.1:
resolution: {integrity: sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==}
engines: {node: '>= 6'}
requiresBuild: true
dependencies:
'@tootallnate/once': 1.1.2
agent-base: 6.0.2
@ -1769,6 +1715,7 @@ packages:
/humanize-ms@1.2.1:
resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==}
requiresBuild: true
dependencies:
ms: 2.1.3
dev: false
@ -1783,6 +1730,7 @@ packages:
/iconv-lite@0.6.3:
resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}
engines: {node: '>=0.10.0'}
requiresBuild: true
dependencies:
safer-buffer: 2.1.2
dev: false
@ -1818,16 +1766,19 @@ packages:
/indent-string@4.0.0:
resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==}
engines: {node: '>=8'}
requiresBuild: true
dev: false
optional: true
/infer-owner@1.0.4:
resolution: {integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==}
requiresBuild: true
dev: false
optional: true
/inflight@1.0.6:
resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
requiresBuild: true
dependencies:
once: 1.4.0
wrappy: 1.0.2
@ -1841,6 +1792,7 @@ packages:
/ip@2.0.0:
resolution: {integrity: sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==}
requiresBuild: true
dev: false
optional: true
@ -1871,6 +1823,7 @@ packages:
/is-lambda@1.0.1:
resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==}
requiresBuild: true
dev: false
optional: true
@ -1927,12 +1880,6 @@ packages:
- encoding
dev: false
/jintr@1.0.0:
resolution: {integrity: sha512-Kbyb5jiIzmTrbhbdjQGt+jjVzn9BPluvL3mZU5ihFQIEGjCHUA4+rsXE2PNDKmg1UlfdTn3947aSwWOVnc5UIw==}
dependencies:
acorn: 8.8.2
dev: false
/jpeg-js@0.4.4:
resolution: {integrity: sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==}
dev: false
@ -1982,16 +1929,6 @@ packages:
type-check: 0.4.0
dev: true
/linkedom@0.14.25:
resolution: {integrity: sha512-Q5BvQVFzMveMxHvZ9L3E60duxSVPIWQRzY2HJKpCV4pRzY3jS/r/a1upLeo/Nup9mDRJ5MS0FX2hRR+wRo+Hiw==}
dependencies:
css-select: 5.1.0
cssom: 0.5.0
html-escaper: 3.0.3
htmlparser2: 8.0.2
uhyphen: 0.2.0
dev: false
/load-bmfont@1.4.1:
resolution: {integrity: sha512-8UyQoYmdRDy81Brz6aLAUhfZLwr5zV0L3taTQ4hju7m6biuwiWiJXjPhBJxbUQJA8PrkvJ/7Enqmwk2sM14soA==}
dependencies:
@ -2038,6 +1975,7 @@ packages:
/make-fetch-happen@9.1.0:
resolution: {integrity: sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==}
engines: {node: '>= 10'}
requiresBuild: true
dependencies:
agentkeepalive: 4.3.0
cacache: 15.3.0
@ -2090,6 +2028,7 @@ packages:
/minipass-collect@1.0.2:
resolution: {integrity: sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==}
engines: {node: '>= 8'}
requiresBuild: true
dependencies:
minipass: 3.3.6
dev: false
@ -2098,6 +2037,7 @@ packages:
/minipass-fetch@1.4.1:
resolution: {integrity: sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==}
engines: {node: '>=8'}
requiresBuild: true
dependencies:
minipass: 3.3.6
minipass-sized: 1.0.3
@ -2110,6 +2050,7 @@ packages:
/minipass-flush@1.0.5:
resolution: {integrity: sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==}
engines: {node: '>= 8'}
requiresBuild: true
dependencies:
minipass: 3.3.6
dev: false
@ -2118,6 +2059,7 @@ packages:
/minipass-pipeline@1.2.4:
resolution: {integrity: sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==}
engines: {node: '>=8'}
requiresBuild: true
dependencies:
minipass: 3.3.6
dev: false
@ -2126,6 +2068,7 @@ packages:
/minipass-sized@1.0.3:
resolution: {integrity: sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==}
engines: {node: '>=8'}
requiresBuild: true
dependencies:
minipass: 3.3.6
dev: false
@ -2179,6 +2122,7 @@ packages:
/ms@2.1.3:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
requiresBuild: true
dev: false
optional: true
@ -2197,6 +2141,7 @@ packages:
/negotiator@0.6.3:
resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==}
engines: {node: '>= 0.6'}
requiresBuild: true
dev: false
optional: true
@ -2274,6 +2219,7 @@ packages:
/npmlog@6.0.2:
resolution: {integrity: sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==}
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
requiresBuild: true
dependencies:
are-we-there-yet: 3.0.1
console-control-strings: 1.1.0
@ -2282,12 +2228,6 @@ packages:
dev: false
optional: true
/nth-check@2.1.1:
resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==}
dependencies:
boolbase: 1.0.0
dev: false
/object-assign@4.1.1:
resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
engines: {node: '>=0.10.0'}
@ -2337,6 +2277,7 @@ packages:
/p-map@4.0.0:
resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==}
engines: {node: '>=10'}
requiresBuild: true
dependencies:
aggregate-error: 3.1.0
dev: false
@ -2380,6 +2321,7 @@ packages:
/path-is-absolute@1.0.1:
resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==}
engines: {node: '>=0.10.0'}
requiresBuild: true
/path-key@3.1.1:
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
@ -2454,6 +2396,7 @@ packages:
/promise-inflight@1.0.1:
resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==}
requiresBuild: true
peerDependencies:
bluebird: '*'
peerDependenciesMeta:
@ -2465,6 +2408,7 @@ packages:
/promise-retry@2.0.1:
resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==}
engines: {node: '>=10'}
requiresBuild: true
dependencies:
err-code: 2.0.3
retry: 0.12.0
@ -2525,6 +2469,7 @@ packages:
/retry@0.12.0:
resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==}
engines: {node: '>= 4'}
requiresBuild: true
dev: false
optional: true
@ -2626,12 +2571,14 @@ packages:
/smart-buffer@4.2.0:
resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==}
engines: {node: '>= 6.0.0', npm: '>= 3.0.0'}
requiresBuild: true
dev: false
optional: true
/socks-proxy-agent@6.2.1:
resolution: {integrity: sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==}
engines: {node: '>= 10'}
requiresBuild: true
dependencies:
agent-base: 6.0.2
debug: 4.3.4
@ -2644,6 +2591,7 @@ packages:
/socks@2.7.1:
resolution: {integrity: sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==}
engines: {node: '>= 10.13.0', npm: '>= 3.0.0'}
requiresBuild: true
dependencies:
ip: 2.0.0
smart-buffer: 4.2.0
@ -2687,16 +2635,12 @@ packages:
/ssri@8.0.1:
resolution: {integrity: sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==}
engines: {node: '>= 8'}
requiresBuild: true
dependencies:
minipass: 3.3.6
dev: false
optional: true
/streamsearch@1.1.0:
resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==}
engines: {node: '>=10.0.0'}
dev: false
/string-width@4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
engines: {node: '>=8'}
@ -2804,10 +2748,6 @@ packages:
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
dev: false
/tslib@2.5.0:
resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==}
dev: false
/tunnel-agent@0.6.0:
resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==}
dependencies:
@ -2836,19 +2776,9 @@ packages:
engines: {node: '>=10'}
dev: true
/uhyphen@0.2.0:
resolution: {integrity: sha512-qz3o9CHXmJJPGBdqzab7qAYuW8kQGKNEuoHFYrBwV6hWIMcpAmxDLXojcHfFr9US1Pe6zUswEIJIbLI610fuqA==}
dev: false
/undici@5.22.0:
resolution: {integrity: sha512-fR9RXCc+6Dxav4P9VV/sp5w3eFiSdOjJYsbtWfd4s5L5C4ogyuVpdKIVHeW0vV1MloM65/f7W45nR9ZxwVdyiA==}
engines: {node: '>=14.0'}
dependencies:
busboy: 1.6.0
dev: false
/unique-filename@1.1.1:
resolution: {integrity: sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==}
requiresBuild: true
dependencies:
unique-slug: 2.0.2
dev: false
@ -2856,6 +2786,7 @@ packages:
/unique-slug@2.0.2:
resolution: {integrity: sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==}
requiresBuild: true
dependencies:
imurmurhash: 0.1.4
dev: false
@ -2993,15 +2924,6 @@ packages:
engines: {node: '>=10'}
dev: true
/youtubei.js@4.3.0:
resolution: {integrity: sha512-HdU6Awdr1nUWy0Ph7WdmoYPWL0ovx+S4w40eeTzAENr5xiUENsLuXcvULRc2fRCIxi+n7Q6142VVhmM4yK/g5g==}
dependencies:
jintr: 1.0.0
linkedom: 0.14.25
tslib: 2.5.0
undici: 5.22.0
dev: false
github.com/Cynosphere/dumpy.js/5fc22353cdcb97084bab572266390e780d9f7a7b:
resolution: {tarball: https://codeload.github.com/Cynosphere/dumpy.js/tar.gz/5fc22353cdcb97084bab572266390e780d9f7a7b}
name: dumpy

View file

@ -25,26 +25,26 @@ yt.callback = async function (msg, line) {
if (!line) return "Arguments are required.";
const req = await fetch(
`https://www.googleapis.com/youtube/v3/search?key=${
hf.apikeys.google
}&maxResults=5&part=snippet&type=video&q=${encodeURIComponent(line)}`
`${hf.config.piped_api}/search?q=${encodeURIComponent(line)}&filter=videos`
).then((x) => x.json());
const topVid = req.items[0];
let out = `**${safeString(
parseHtmlEntities(topVid.snippet.title)
parseHtmlEntities(topVid.title)
)}** | \`${safeString(
parseHtmlEntities(topVid.snippet.channelTitle)
)}\`\nhttps://youtu.be/${topVid.id.videoId}\n\n**__See Also:__**\n`;
parseHtmlEntities(topVid.uploaderName)
)}\`\nhttps://youtube.com${topVid.url}\n\n**__See Also:__**\n`;
for (let i = 1; i < req.items.length; i++) {
for (let i = 1; i < 5; i++) {
const vid = req.items[i];
if (!vid) continue;
out += `- **${safeString(
parseHtmlEntities(vid.snippet.title)
)}** | By: \`${safeString(
parseHtmlEntities(vid.snippet.channelTitle)
)}\` | <https://youtu.be/${vid.id.videoId}>\n`;
parseHtmlEntities(vid.uploaderName)
)}\` | <https://youtube.com${vid.url}>\n`;
}
return out;
@ -59,18 +59,14 @@ fyt.callback = async function (msg, line) {
if (!line) return "Arguments are required.";
const req = await fetch(
`https://www.googleapis.com/youtube/v3/search?key=${
hf.apikeys.google
}&maxResults=2&part=snippet&type=video&q=${encodeURIComponent(line)}`
`${hf.config.piped_api}/search?q=${encodeURIComponent(line)}&filter=videos`
).then((x) => x.json());
const vid = req.items[0];
return `**${safeString(
parseHtmlEntities(vid.snippet.title)
)}** | \`${safeString(
parseHtmlEntities(vid.snippet.channelTitle)
)}\`\nhttps://youtu.be/${vid.id.videoId}`;
return `**${safeString(parseHtmlEntities(vid.title))}** | \`${safeString(
parseHtmlEntities(vid.uploaderName)
)}\`\nhttps://youtube.com${vid.url}`;
};
hf.registerCommand(fyt);

View file

@ -1,11 +1,5 @@
const {Collection} = require("@projectdysnomia/dysnomia");
const {Readable} = require("node:stream");
const {Innertube} = require("youtubei.js");
let yt;
Innertube.create({
generate_session_locally: true,
}).then((x) => (yt = x));
const ffprobe = require("node-ffprobe");
const Command = require("../lib/command.js");
@ -74,20 +68,26 @@ async function processPlaylist(
url.match(REGEX_YOUTUBE_PLAYLIST_SHORT)?.[0];
if (!playlistId) return null;
const baseUrl = `https://www.googleapis.com/youtube/v3/playlistItems?key=${hf.apikeys.google}&part=snippet&playlistId=${playlistId}&maxResults=50`;
const baseUrl = "/playlists/" + playlistId;
const data = await fetch(baseUrl).then((res) => res.json());
const data = await fetch(hf.config.piped_api + baseUrl).then((res) =>
res.json()
);
playlist = data.items;
playlist = data.relatedStreams;
let pageToken = data.nextPageToken;
while (pageToken != null) {
const pageData = await fetch(baseUrl + "&pageToken=" + pageToken).then(
(res) => res.json()
);
if (pageData.nextPageToken) pageToken = pageData.nextPageToken;
let pageToken = data.nextpage;
while (pageToken?.startsWith("{")) {
const pageData = await fetch(
hf.config.piped_api +
"/nextpage" +
baseUrl +
"&nextpage=" +
encodeURIComponent(pageToken)
).then((res) => res.json());
if (pageData.nextpage) pageToken = pageData.nextpage;
playlist = [...playlist, ...pageData.items];
playlist = [...playlist, ...pageData.relatedStreams];
}
} else if (type === "sc") {
const clientId = await getSoundcloudClientID();
@ -217,22 +217,18 @@ async function enqueue({
id = uri.searchParams.get("v");
}
}
info = await yt.getBasicInfo(id);
info = await fetch(`${hf.config.piped_api}/streams/${id}`);
} catch (err) {
await textChannel.createMessage({
content: `:warning: Failed to get metadata: \`\`\`\n${err}\n\`\`\``,
});
}
title = parseHtmlEntities(info?.basic_info?.title);
length = info?.basic_info?.duration * 1000;
thumbnail = info?.basic_info?.thumbnail?.[0].url
.replace("vi_webp", "vi")
.replace(".webp", ".jpg");
title = parseHtmlEntities(info?.title);
length = info?.duration * 1000;
thumbnail = info?.thumbnailUrl;
media = Readable.from(
await yt.download(id, {type: "audio", quality: "best"})
);
media = info?.audioStreams?.sort((a, b) => a.bitrate - b.bitrate)?.[0];
} else if (type == "sc") {
if (url?.startsWith("sc:"))
url = url.replace(/^sc:/, "https://soundcloud.com/");
@ -397,21 +393,19 @@ async function enqueue({
async function youtubeSearch(msg, str) {
const {items} = await fetch(
`https://www.googleapis.com/youtube/v3/search?key=${
hf.apikeys.google
}&maxResults=5&part=snippet&type=video&q=${encodeURIComponent(str)}`
).then((res) => res.json());
`${hf.config.piped_api}/search?q=${encodeURIComponent(str)}&filter=videos`
).then((x) => x.json());
const selection = items.map((item) => ({
value: "https://youtu.be/" + item.id.videoId,
key: item.id.videoId,
display: `${parseHtmlEntities(item.snippet.title).substring(0, 99)}${
parseHtmlEntities(item.snippet.title).length > 99 ? "…" : ""
value: "https://youtu.be" + item.url,
key: item.url.replace("/watch?v=", ""),
display: `${parseHtmlEntities(item.title).substring(0, 99)}${
parseHtmlEntities(item.title).length > 99 ? "…" : ""
}`,
description: `from ${parseHtmlEntities(item.snippet.channelTitle).substring(
description: `from ${parseHtmlEntities(item.uploaderName).substring(
0,
95
)}${parseHtmlEntities(item.snippet.channelTitle).length > 95 ? "…" : ""}`,
)}${parseHtmlEntities(item.uploaderName).length > 95 ? "…" : ""}`,
}));
try {