[{"/home/yourok/MEGAWork/go/TorrServer/web/src/index.js":"1","/home/yourok/MEGAWork/go/TorrServer/web/src/App.js":"2","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Appbar.js":"3","/home/yourok/MEGAWork/go/TorrServer/web/src/components/TorrentList.js":"4","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Add.js":"5","/home/yourok/MEGAWork/go/TorrServer/web/src/components/RemoveAll.js":"6","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Donate.js":"7","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Upload.js":"8","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Settings.js":"9","/home/yourok/MEGAWork/go/TorrServer/web/src/utils/Hosts.js":"10","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Torrent.js":"11","/home/yourok/MEGAWork/go/TorrServer/web/src/components/DialogTorrentInfo.js":"12","/home/yourok/MEGAWork/go/TorrServer/web/src/components/DialogCacheInfo.js":"13","/home/yourok/MEGAWork/go/TorrServer/web/src/utils/Utils.js":"14","/home/yourok/MEGAWork/go/TorrServer/web/src/components/About.js":"15"},{"size":224,"mtime":1607328766846,"results":"16","hashOfConfig":"17"},{"size":840,"mtime":1607329513826,"results":"18","hashOfConfig":"17"},{"size":6554,"mtime":1608804908376,"results":"19","hashOfConfig":"17"},{"size":1568,"mtime":1607340137621,"results":"20","hashOfConfig":"17"},{"size":3345,"mtime":1607335694784,"results":"21","hashOfConfig":"17"},{"size":1416,"mtime":1607335705443,"results":"22","hashOfConfig":"17"},{"size":2793,"mtime":1607330316050,"results":"23","hashOfConfig":"17"},{"size":1348,"mtime":1607335733737,"results":"24","hashOfConfig":"17"},{"size":9183,"mtime":1611058247717,"results":"25","hashOfConfig":"17"},{"size":737,"mtime":1611058762156,"results":"26","hashOfConfig":"17"},{"size":7045,"mtime":1611125839869,"results":"27","hashOfConfig":"17"},{"size":5798,"mtime":1611126720480,"results":"28","hashOfConfig":"17"},{"size":4142,"mtime":1608811141003,"results":"29","hashOfConfig":"17"},{"size":428,"mtime":1607431364533,"results":"30","hashOfConfig":"17"},{"size":2278,"mtime":1608810011199,"results":"31","hashOfConfig":"17"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},"17eruzz",{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"49","messages":"50","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"51","usedDeprecatedRules":"34"},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"56","messages":"57","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"58"},{"filePath":"59","messages":"60","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"61","usedDeprecatedRules":"34"},{"filePath":"62","messages":"63","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"64","messages":"65","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},"/home/yourok/MEGAWork/go/TorrServer/web/src/index.js",[],["66","67"],"/home/yourok/MEGAWork/go/TorrServer/web/src/App.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Appbar.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/TorrentList.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Add.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/RemoveAll.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Donate.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Upload.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Settings.js",["68","69"],"import ListItem from '@material-ui/core/ListItem'\nimport ListItemIcon from '@material-ui/core/ListItemIcon'\nimport ListItemText from '@material-ui/core/ListItemText'\nimport React, { useEffect } from 'react'\nimport SettingsIcon from '@material-ui/icons/Settings'\nimport Dialog from '@material-ui/core/Dialog'\nimport DialogTitle from '@material-ui/core/DialogTitle'\nimport DialogContent from '@material-ui/core/DialogContent'\nimport TextField from '@material-ui/core/TextField'\nimport DialogActions from '@material-ui/core/DialogActions'\nimport Button from '@material-ui/core/Button'\nimport { FormControlLabel, InputLabel, Select, Switch } from '@material-ui/core'\nimport { settingsHost, setTorrServerHost, torrserverHost } from '../utils/Hosts'\n\nexport default function SettingsDialog() {\n const [open, setOpen] = React.useState(false)\n const [settings, setSets] = React.useState({})\n const [show, setShow] = React.useState(false)\n const [tsHost, setTSHost] = React.useState(torrserverHost ? torrserverHost : window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : ''))\n\n const handleClickOpen = () => {\n setOpen(true)\n }\n const handleClose = () => {\n setOpen(false)\n }\n const handleCloseSave = () => {\n setOpen(false)\n let sets = JSON.parse(JSON.stringify(settings))\n sets.CacheSize *= 1024 * 1024\n sets.PreloadBufferSize *= 1024 * 1024\n fetch(settingsHost(), {\n method: 'post',\n body: JSON.stringify({ action: 'set', sets: sets }),\n headers: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': 'application/json',\n },\n })\n }\n\n useEffect(() => {\n fetch(settingsHost(), {\n method: 'post',\n body: JSON.stringify({ action: 'get' }),\n headers: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': 'application/json',\n },\n })\n .then((res) => res.json())\n .then(\n (json) => {\n json.CacheSize /= 1024 * 1024\n json.PreloadBufferSize /= 1024 * 1024\n setSets(json)\n setShow(true)\n },\n (error) => {\n setShow(false)\n console.log(error)\n }\n )\n .catch((e) => {\n setShow(false)\n console.log(e)\n })\n }, [tsHost])\n\n const onInputHost = (event) => {\n let host = event.target.value\n setTorrServerHost(host)\n setTSHost(host)\n }\n\n const inputForm = (event) => {\n let sets = JSON.parse(JSON.stringify(settings))\n if (event.target.type === 'number' || event.target.type === 'select-one') {\n sets[event.target.id] = Number(event.target.value)\n } else if (event.target.type === 'checkbox') {\n sets[event.target.id] = Boolean(event.target.checked)\n }\n setSets(sets)\n }\n\n return (\n
\n \n \n \n \n \n \n \n Settings\n \n \n {show && (\n <>\n \n } label=\"Preload buffer\" />\n \n

\n Retracker mode\n \n \n } label=\"Enable IPv6\" />\n
\n } label=\"Force encrypt\" />\n
\n } label=\"Disable TCP\" />\n
\n } label=\"Disable UTP\" />\n
\n } label=\"Disable UPNP\" />\n
\n } label=\"Disable DHT\" />\n
\n } label=\"Disable upload\" />\n
\n \n \n \n \n \n

\n Strategy\n \n \n )}\n \n \n \n \n \n

\n
\n )\n}\n\n/*\n{\n\t\"CacheSize\": 209715200,\n\t\"PreloadBufferSize\": 20971520,\n\t\"RetrackersMode\": 1,\n\t\"TorrentDisconnectTimeout\": 30,\n\t\"EnableIPv6\": false,\n\t\"DisableTCP\": false,\n\t\"DisableUTP\": true,\n\t\"DisableUPNP\": false,\n\t\"DisableDHT\": false,\n\t\"DisableUpload\": false,\n\t\"DownloadRateLimit\": 0,\n\t\"UploadRateLimit\": 0,\n\t\"ConnectionsLimit\": 20,\n\t\"DhtConnectionLimit\": 500,\n\t\"PeersListenPort\": 0\n}\n */\n","/home/yourok/MEGAWork/go/TorrServer/web/src/utils/Hosts.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Torrent.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/DialogTorrentInfo.js",["70","71","72","73"],"import React, { useEffect } from 'react'\nimport Typography from '@material-ui/core/Typography'\nimport { Button, ButtonGroup, Grid, List, ListItem } from '@material-ui/core'\nimport CachedIcon from '@material-ui/icons/Cached'\nimport LinearProgress from '@material-ui/core/LinearProgress';\n\nimport { getPeerString, humanizeSize } from '../utils/Utils'\nimport { playlistTorrHost, streamHost } from '../utils/Hosts'\nimport DialogTitle from '@material-ui/core/DialogTitle'\nimport DialogContent from '@material-ui/core/DialogContent'\n\nconst style = {\n width100: {\n width: '100%',\n },\n width80: {\n width: '80%',\n },\n poster: {\n display: 'flex',\n flexDirection: 'row',\n borderRadius:'5px',\n },\n}\n\nexport default function DialogTorrentInfo(props) {\n const [torrent, setTorrent] = React.useState(props.torrent)\n const [progress, setProgress] = React.useState(-1)\n\n useEffect(() => {\n setTorrent(props.torrent)\n if(torrent.stat==2)\n setProgress(torrent.preloaded_bytes * 100 / torrent.preload_size)\n }, [props.torrent, props.open])\n\n return (\n
\n \n \n {torrent.poster && \"\"}\n \n {torrent.title} {torrent.name && torrent.name !== torrent.title && ' | ' + torrent.name}\n \n Peers: {getPeerString(torrent)}\n
\n Loaded: {getPreload(torrent)}\n
\n Speed: {humanizeSize(torrent.download_speed)}\n
\n Status: {torrent.stat_string}\n
\n
\n
\n
\n {torrent.stat==2 && }\n
\n \n \n \n \n \n \n \n \n {getPlayableFile(torrent) &&\n getPlayableFile(torrent).map((file) => (\n \n \n \n {file.path.split('\\\\').pop().split('/').pop()} | {humanizeSize(file.length)}\n \n \n \n \n ))}\n \n \n
\n )\n}\n\nfunction getPlayableFile(torrent){\n if (!torrent || !torrent.file_stats)\n return null\n return torrent.file_stats.filter(file => extPlayable.includes(getExt(file.path)))\n}\n\nfunction getExt(filename){\n const ext = filename.split('.').pop()\n if (ext == filename)\n return ''\n return ext.toLowerCase()\n}\n\nfunction getPreload(torrent) {\n if (torrent.preloaded_bytes > 0 && torrent.preload_size > 0 && torrent.preloaded_bytes < torrent.preload_size) {\n let progress = ((torrent.preloaded_bytes * 100) / torrent.preload_size).toFixed(2)\n return humanizeSize(torrent.preloaded_bytes) + ' / ' + humanizeSize(torrent.preload_size) + ' ' + progress + '%'\n }\n\n if (!torrent.preloaded_bytes) return humanizeSize(0)\n\n return humanizeSize(torrent.preloaded_bytes)\n}\n\nconst extPlayable = [\n// video\n \"3g2\",\n \"3gp\",\n \"aaf\",\n \"asf\",\n \"avchd\",\n \"avi\",\n \"drc\",\n \"flv\",\n \"iso\",\n \"m2v\",\n \"m2ts\",\n \"m4p\",\n \"m4v\",\n \"mkv\",\n \"mng\",\n \"mov\",\n \"mp2\",\n \"mp4\",\n \"mpe\",\n \"mpeg\",\n \"mpg\",\n \"mpv\",\n \"mxf\",\n \"nsv\",\n \"ogg\",\n \"ogv\",\n \"ts\",\n \"qt\",\n \"rm\",\n \"rmvb\",\n \"roq\",\n \"svi\",\n \"vob\",\n \"webm\",\n \"wmv\",\n \"yuv\",\n// audio\n \"aac\",\n \"aiff\",\n \"ape\",\n \"au\",\n \"flac\",\n \"gsm\",\n \"it\",\n \"m3u\",\n \"m4a\",\n \"mid\",\n \"mod\",\n \"mp3\",\n \"mpa\",\n \"pls\",\n \"ra\",\n \"s3m\",\n \"sid\",\n \"wav\",\n \"wma\",\n \"xm\"\n]\n","/home/yourok/MEGAWork/go/TorrServer/web/src/components/DialogCacheInfo.js",["74"],"import React, { useEffect, useRef } from 'react'\nimport Typography from '@material-ui/core/Typography'\n\nimport { getPeerString, humanizeSize } from '../utils/Utils'\nimport DialogTitle from '@material-ui/core/DialogTitle'\nimport DialogContent from '@material-ui/core/DialogContent'\nimport { cacheHost } from '../utils/Hosts'\n\nexport default function DialogCacheInfo(props) {\n const [hash] = React.useState(props.hash)\n const [cache, setCache] = React.useState({})\n const timerID = useRef(-1)\n\n useEffect(() => {\n if (hash)\n timerID.current = setInterval(() => {\n getCache(hash, (cache) => {\n setCache(cache)\n })\n }, 1000)\n else clearInterval(timerID.current)\n\n return () => {\n clearInterval(timerID.current)\n }\n }, [hash, props.open])\n\n return (\n
\n \n \n Hash {cache.Hash}\n
\n Capacity {humanizeSize(cache.Capacity)}\n
\n Filled {humanizeSize(cache.Filled)}\n
\n Torrent size {cache.Torrent && cache.Torrent.torrent_size && humanizeSize(cache.Torrent.torrent_size)}\n
\n Pieces length {humanizeSize(cache.PiecesLength)}\n
\n Pieces count {cache.PiecesCount}\n
\n Peers: {getPeerString(cache.Torrent)}\n
\n Download speed {cache.Torrent && cache.Torrent.download_speed ? humanizeSize(cache.Torrent.download_speed) + '/sec' : ''}\n
\n Status {cache.Torrent && cache.Torrent.stat_string && cache.Torrent.stat_string}\n
\n
\n \n
\n \n
\n )\n}\n\nfunction getCacheMap(cache) {\n if (!cache || !cache.PiecesCount) return ''\n var html = ''\n for (let i = 0; i < cache.PiecesCount; i++) {\n html += \" {\n if (i >= r.Start && i <= r.End && i !== r.Reader)\n html += ' reader-range'\n if (i === r.Reader) {\n html += ' piece-reader'\n info += ' reader'\n }\n })\n html += \"' title='\" + info + \"'>\"\n }\n return html\n}\n\nfunction getCache(hash, callback) {\n try {\n fetch(cacheHost(), {\n method: 'post',\n body: JSON.stringify({ action: 'get', hash: hash }),\n headers: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': 'application/json',\n },\n })\n .then((res) => res.json())\n .then(\n (json) => {\n callback(json)\n },\n (error) => {\n callback({})\n console.error(error)\n }\n )\n } catch (e) {\n console.error(e)\n callback({})\n }\n}\n/*\n{\n\t\"Hash\": \"41e36c8de915d80db83fc134bee4e7e2d292657e\",\n\t\"Capacity\": 209715200,\n\t\"Filled\": 2914808,\n\t\"PiecesLength\": 4194304,\n\t\"PiecesCount\": 2065,\n\t\"DownloadSpeed\": 32770.860273455524,\n\t\"Pieces\": {\n\t\t\"2064\": {\n\t\t\t\"Id\": 2064,\n\t\t\t\"Length\": 2914808,\n\t\t\t\"Size\": 162296,\n\t\t\t\"Completed\": false\n\t\t}\n\t}\n}\n */\n","/home/yourok/MEGAWork/go/TorrServer/web/src/utils/Utils.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/About.js",[],{"ruleId":"75","replacedBy":"76"},{"ruleId":"77","replacedBy":"78"},{"ruleId":"79","severity":1,"message":"80","line":103,"column":29,"nodeType":"81","endLine":103,"endColumn":35},{"ruleId":"79","severity":1,"message":"80","line":139,"column":29,"nodeType":"81","endLine":139,"endColumn":35},{"ruleId":"82","severity":1,"message":"83","line":32,"column":24,"nodeType":"84","messageId":"85","endLine":32,"endColumn":26},{"ruleId":"86","severity":1,"message":"87","line":34,"column":8,"nodeType":"88","endLine":34,"endColumn":35,"suggestions":"89"},{"ruleId":"82","severity":1,"message":"83","line":55,"column":30,"nodeType":"84","messageId":"85","endLine":55,"endColumn":32},{"ruleId":"82","severity":1,"message":"83","line":100,"column":13,"nodeType":"84","messageId":"85","endLine":100,"endColumn":15},{"ruleId":"90","severity":1,"message":"91","line":74,"column":31,"nodeType":"92","messageId":"93","endLine":81,"endColumn":10},"no-native-reassign",["94"],"no-negated-in-lhs",["95"],"jsx-a11y/heading-has-content","Headings must have content and the content must be accessible by a screen reader.","JSXOpeningElement","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'torrent.preload_size', 'torrent.preloaded_bytes', and 'torrent.stat'. Either include them or remove the dependency array. You can also replace multiple useState variables with useReducer if 'setProgress' needs the current value of 'torrent.preloaded_bytes'.","ArrayExpression",["96"],"no-loop-func","Function declared in a loop contains unsafe references to variable(s) 'html', 'html'.","ArrowFunctionExpression","unsafeRefs","no-global-assign","no-unsafe-negation",{"desc":"97","fix":"98"},"Update the dependencies array to be: [props.torrent, props.open, torrent.stat, torrent.preloaded_bytes, torrent.preload_size]",{"range":"99","text":"100"},[1081,1108],"[props.torrent, props.open, torrent.stat, torrent.preloaded_bytes, torrent.preload_size]"]