{"version":3,"sources":["components/AccountMenu/index.js","App.js","functions/clear.js","pages/Browse/index.js","components/BrowseMenu/index.js","components/DownloadMenu/index.js","components/Carousel/index.js","pages/CategoryBrowse/index.js","components/ChildrenMenu/index.js","components/Footer/index.js","pages/Genres/index.js","functions/guid.js","pages/Login/index.js","components/Logout/index.js","components/Nav/NavUI.js","components/Nav/index.js","components/NewsMenu/index.js","pages/NotFound/index.js","components/PageMenu/index.js","components/PlayerMenu/index.js","components/PlaylistMenu/index.js","pages/Search/index.js","functions/seo.js","theme.js","pages/Settings/index.js","pages/SettingsLogin/index.js","components/SortMenu/index.js","components/StarDialog/index.js","pages/StarredLists/index.js","components/ThemeMenu/index.js","components/Tile/index.js","components/TrailerDialog/index.js","pages/View/MovieView/index.js","pages/View/TVView/index.js","pages/View/index.js","index.js"],"names":["AccountMenu","props","state","menuAnchor","handleClick","bind","handleClose","evt","this","setState","currentTarget","accounts","ui_config","pic","includes","src","width","alt","className","IconButton","onClick","Menu","id","anchorEl","anchorOrigin","vertical","horizontal","transformOrigin","keepMounted","open","Boolean","onClose","custom_button","text","Divider","href","url","target","MenuItem","to","Component","App","auth","window","sessionStorage","getItem","localStorage","server","setItem","version","caches","keys","then","names","forEach","name","delete","location","reload","guid","Browse","isLoaded","metadata","origin","starred_lists","JSON","parse","history","push","req_path","req_args","range","axios","get","response","data","content","i","length","categoryInfo","pinned","unshift","catch","error","console","code","Swal","fire","title","message","icon","confirmButtonText","confirmButtonColor","theme","palette","success","main","result","isConfirmed","cancelButtonText","cancelButtonColor","showCancelButton","isDismissed","request","CircularProgress","BrowseMenu","categories","style","marginRight","Button","map","category","DownloadMenu","handleSeason","preventDefault","n","children","encodeURIComponent","videos","variant","color","startIcon","source","encodeURI","tv","Carousel","currentEditing","hide","isAndroid","test","navigator","userAgent","vendor","opera","isIOS","MSStream","isEditOpen","star","handleStar","handleStarReset","handleStarImport","handleStarExport","handlePin","handleEditOpen","handleEditClose","handleEditDrop","handleEditSave","handleScroll","item","index1","findIndex","index2","index3","index4","splice","stringify","shift","files","file","reader","FileReader","onload","evtR","starred_list","parseInt","replace","type","readAsText","Blob","link","document","createElement","URL","createObjectURL","download","Date","click","pin","removedIndex","addedIndex","items","arrayMoveImmutable","offset","getElementsByClassName","scrollLeft","paddingTop","p","margin","display","alignItems","justifyContent","float","Tooltip","placement","marginLeft","hidden","onChange","htmlFor","xmlns","enableBackground","height","viewBox","fill","primary","d","fillRule","posterPath","Typography","padding","Dialog","fullWidth","maxWidth","DialogTitle","List","dragHandleSelector","lockAxis","onDrop","ListItem","divider","ListItemText","ListItemSecondaryAction","ListItemIcon","flexShrink","fontSize","CategoryBrowse","match","params","genre","queryString","search","page","undefined","sort","scrollTo","pages","Math","ceil","seo","description","ChildrenMenu","child","Footer","classes","footer__container","withStyles","withTheme","_p8","s","random","toString","substr","Login","password","signup","username","handleTempServerChange","handlePassChange","handleUserChange","handleServerSubmit","handleSubmit","handleSignup","dismissError","startsWith","value","Container","component","CssBaseline","paper","Avatar","avatar","form","onSubmit","noValidate","TextField","required","label","autoComplete","autoFocus","disabled","submit","textAlign","marginTop","spacing","flexDirection","backgroundColor","secondary","Logout","clear","setTimeout","NavUI","searchChange","searchSubmit","onMouseOver","onMouseOut","pathname","key","query","grow","AppBar","position","root","Toolbar","icon_on_nav","noWrap","searchIcon","InputBase","placeholder","inputRoot","input","inputInput","inputProps","hide_news","background","default","flexGrow","breakpoints","up","borderRadius","shape","alpha","common","zIndex","paddingLeft","transition","transitions","create","Nav","account_list","category_list","NewsMenu","dismissed","isNew","lastChecked","getTime","news","now","targetTime","tag_name","Badge","badgeContent","maxwidth","pri","warning","slice","Fragment","whiteSpace","published_at","toDateString","html_url","NotFound","PageMenu","Pagination","count","size","innerWidth","renderItem","PaginationItem","PlayerMenu","mobileUrl","streamURL","scheme","protocol","hash","mimeType","host","port","clipboard","writeText","PlaylistMenu","m3u8","element","setAttribute","body","appendChild","removeChild","Search","q","image","querySelector","customTheme","Settings","secret","handleChange","handleRestart","handleKillSwitch","handleRebuild","handleFileBrowser","navProps","config","tempSecret","secret_key","post","removeItem","kill_switch","checked","status","multiline","minRows","maxRows","Form","marginBotoom","Switch","SettingsLoginForm","handleSecretChange","SortMenu","formatSort","str","str_split","split","charAt","toUpperCase","substring","join","FormControl","InputLabel","Select","labelId","StarDialog","isCreateOpen","handleCreateClose","handleCreateChange","handleCreateSubmit","handleListItemClick","createValue","isOpen","button","ListItemAvatar","some","x","DialogContent","DialogContentText","DialogActions","StarredLists","lightTheme","createTheme","darkTheme","draculaTheme","nordTheme","custom_theme","ThemeMenu","handleTheme","Tile","trailer","frameBorder","allow","allowFullScreen","MovieView","subtitleMenuAnchor","tooltipOpen","tooltipOpen2","onFileChange","prettyDate","handleStarClose","handleTrailer","handleTrailerClose","handleSubtitleMenuOpen","handleSubtitleMenuClose","overview","backdropPath","a","endsWith","toWebVTT","vtt","fileName","playerKey","date_comp","releaseDate","openStarDialog","starred","apiId","api","openTrailerDialog","tracks","getElementById","default_track","default_video","borderWidth","borderColor","borderStyle","options","video","quality","defaultQuality","subtitle","preload","contextmenu","screenshot","volume","lang","ClickAwayListener","onClickAway","arrow","disableFocusListener","disableHoverListener","disableTouchListener","PopperProps","disablePortal","fontWeight","voteAverage","Rating","max","readOnly","language","accept","track","adult","Chip","genres","TVBView","TVSView","handleClickImage","handleCloseDialog","handleParentSeason","watching","image_url","next","parent_index","parent_children","isHash","onError","e","justifySelf","alignContent","flexWrap","View","documentElement","setProperty","response1","parents","response2","subtitles","ReactDOM","render","ThemeProvider","exact","path","SettingsLogin"],"mappings":"+eASqBA,E,kDACnB,WAAYC,GAAQ,IAAD,8BACjB,cAAMA,IACDC,MAAQ,CACXC,YAAY,GAEd,EAAKC,YAAc,EAAKA,YAAYC,KAAjB,gBACnB,EAAKC,YAAc,EAAKA,YAAYD,KAAjB,gBANF,E,+CASnB,SAAYE,GACVC,KAAKC,SAAS,CACZN,WAAYI,EAAIG,kB,yBAIpB,SAAYH,GACVC,KAAKC,SAAS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nhB,GAAD,OAAW,cAAC,GAAD,aAAmBqK,KAAM,KAASrK,GAAvB0D,SAEhC,cAAC,IAAD,CACE2d,OAAK,EACLC,KAAM,eACNH,OAAQ,SAACnhB,GAAD,OAAW,cAAC,GAAD,aAAmBqK,KAAM,MAAUrK,GAAxB0D,SAEhC,cAAC,IAAD,CACE2d,OAAK,EACLC,KAAM,eACNH,OAAQ,SAACnhB,GAAD,OAAW,cAAC,GAAD,aAAmBqK,KAAM,MAAUrK,GAAxB0D,SAEhC,cAAC,IAAD,CACE4d,KAAM,GACNH,OAAQ,SAACnhB,GAAD,OAAW,cAAC,GAAD,eAA2BA,GAAZ0D,iBAK1C+G,SAAS+S,eAAe,W","file":"static/js/main.4c186c3c.chunk.js","sourcesContent":["import React, { Component } from \"react\";\r\n\r\nimport { Link } from \"react-router-dom\";\r\n\r\nimport { Divider, IconButton, Menu, MenuItem } from \"@material-ui/core\";\r\nimport AccountCircle from \"@material-ui/icons/AccountCircle\";\r\n\r\nimport \"@sweetalert2/theme-dark/dark.css\";\r\n\r\nexport default class AccountMenu extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n menuAnchor: false,\r\n };\r\n this.handleClick = this.handleClick.bind(this);\r\n this.handleClose = this.handleClose.bind(this);\r\n }\r\n\r\n handleClick(evt) {\r\n this.setState({\r\n menuAnchor: evt.currentTarget,\r\n });\r\n }\r\n\r\n handleClose(evt) {\r\n this.setState({\r\n menuAnchor: false,\r\n });\r\n }\r\n\r\n render() {\r\n let { accounts, ui_config } = this.props;\r\n\r\n let pic = ;\r\n if (\r\n accounts &&\r\n accounts.pic &&\r\n (accounts.pic.includes(\"http\") || accounts.pic.includes(\"www\"))\r\n ) {\r\n pic = \"profile-pic\";\r\n }\r\n\r\n return (\r\n
\r\n \r\n {pic}\r\n \r\n \r\n {(ui_config.custom_button || {}).text ? (\r\n
\r\n \r\n \r\n \r\n {ui_config.custom_button.text}\r\n \r\n \r\n
\r\n ) : null}\r\n \r\n Settings\r\n \r\n \r\n Logout\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Redirect } from \"react-router-dom\";\r\n\r\nimport { clear, guid, version } from \"./components\";\r\n\r\nexport default class App extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n auth:\r\n window.sessionStorage.getItem(\"auth\") ||\r\n window.localStorage.getItem(\"auth\"),\r\n server:\r\n window.sessionStorage.getItem(\"server\") ||\r\n window.localStorage.getItem(\"server\"),\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n if (!window.localStorage.getItem(\"_VERSION\")) {\r\n window.localStorage.setItem(\"_VERSION\", version);\r\n }\r\n if (window.localStorage.getItem(\"_VERSION\") !== version) {\r\n clear();\r\n window.localStorage.setItem(\"_VERSION\", version);\r\n }\r\n }\r\n\r\n render() {\r\n let { auth, server } = this.state;\r\n\r\n return auth && server ? (\r\n \r\n ) : (\r\n \r\n );\r\n }\r\n}\r\n","export default function clear() {\r\n if (\"caches\" in window) {\r\n caches.keys().then((names) => {\r\n names.forEach((name) => {\r\n caches.delete(name);\r\n });\r\n });\r\n window.location.reload(true);\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { CircularProgress } from \"@material-ui/core\";\r\n\r\nimport Swal from \"sweetalert2/src/sweetalert2.js\";\r\nimport \"@sweetalert2/theme-dark/dark.css\";\r\n\r\nimport axios from \"axios\";\r\n\r\nimport { Carousel, Footer, Nav, theme } from \"../../components\";\r\n\r\nexport default class Browse extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n auth: window.sessionStorage.getItem(\"auth\") || window.localStorage.getItem(\"auth\") || \"0\",\r\n isLoaded: false,\r\n metadata: {},\r\n server: window.sessionStorage.getItem(\"server\") || window.localStorage.getItem(\"server\") || window.location.origin,\r\n starred_lists: JSON.parse(window.localStorage.getItem(\"starred_lists\") || \"[]\"),\r\n ui_config: JSON.parse(window.localStorage.getItem(\"ui_config\") || window.sessionStorage.getItem(\"ui_config\") || \"{}\"),\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n let { auth, server, starred_lists, ui_config } = this.state;\r\n\r\n if (!auth || !server) {\r\n this.props.history.push(\"/logout\");\r\n }\r\n\r\n let req_path = `${server}/api/v1/metadata`;\r\n let req_args = `?a=${auth}&r=0:${ui_config.range || \"16\"}&s=popularity-des&rmdup=true`;\r\n\r\n axios\r\n .get(req_path + req_args)\r\n .then((response) => {\r\n let metadata = response.data.content;\r\n for (let i = starred_lists.length - 1; i >= 0; i--) {\r\n if (starred_lists[i].categoryInfo.pinned) {\r\n metadata.unshift(starred_lists[i]);\r\n }\r\n }\r\n this.setState({\r\n isLoaded: true,\r\n metadata: metadata,\r\n });\r\n })\r\n .catch((error) => {\r\n console.error(error);\r\n if (error.response) {\r\n let data = error.response.data;\r\n if (data.code === 401) {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Login\",\r\n confirmButtonColor: theme.palette.success.main,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n }\r\n });\r\n } else if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n } else if (error.request) {\r\n if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `libDrive could not communicate with the server! Is '${server}' the correct address?`,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n render() {\r\n let { isLoaded, metadata } = this.state;\r\n\r\n return isLoaded ? (\r\n
\r\n
\r\n ) : (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Link } from \"react-router-dom\";\r\n\r\nimport { Button, Divider, Menu, MenuItem } from \"@material-ui/core\";\r\n\r\nimport { guid } from \"../../components\";\r\n\r\nexport default class BrowseMenu extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n menuAnchor: false,\r\n };\r\n this.handleClick = this.handleClick.bind(this);\r\n this.handleClose = this.handleClose.bind(this);\r\n }\r\n\r\n handleClick(evt) {\r\n this.setState({\r\n menuAnchor: evt.currentTarget,\r\n });\r\n }\r\n\r\n handleClose(evt) {\r\n this.setState({\r\n menuAnchor: false,\r\n });\r\n }\r\n\r\n render() {\r\n let { categories } = this.props;\r\n let starred_lists = JSON.parse(\r\n window.localStorage.getItem(\"starred_lists\") || \"[]\"\r\n );\r\n\r\n return (\r\n
\r\n \r\n Browse\r\n \r\n \r\n \r\n Home Page\r\n \r\n \r\n {categories.length\r\n ? categories.map((category) => (\r\n \r\n \r\n {category.name}\r\n \r\n \r\n ))\r\n : null}\r\n {starred_lists.length ? (\r\n
\r\n \r\n \r\n Starred Lists\r\n \r\n
\r\n ) : null}\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Button, Divider, Menu, MenuItem } from \"@material-ui/core\";\r\nimport CloudDownloadOutlinedIcon from \"@material-ui/icons/CloudDownloadOutlined\";\r\n\r\nimport { guid } from \"../../components\";\r\n\r\nexport default class DownloadMenu extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n menuAnchor: false,\r\n ...props.state,\r\n };\r\n this.handleClick = this.handleClick.bind(this);\r\n this.handleClose = this.handleClose.bind(this);\r\n this.handleSeason = this.handleSeason.bind(this);\r\n }\r\n\r\n handleClick(evt) {\r\n this.setState({\r\n menuAnchor: evt.currentTarget,\r\n });\r\n }\r\n\r\n handleClose() {\r\n this.setState({\r\n menuAnchor: false,\r\n });\r\n }\r\n\r\n handleSeason(evt) {\r\n evt.preventDefault();\r\n let { auth, metadata, server } = this.state;\r\n for (let n = 0; n < metadata.children.length; n++) {\r\n let req_path = `${server}/api/v1/redirectdownload/${encodeURIComponent(metadata.children[n].name)}`;\r\n let req_args = `?a=${auth}&id=${metadata.children[n].id}`;\r\n\r\n window.open(req_path + req_args);\r\n }\r\n this.setState({\r\n menuAnchor: evt.currentTarget,\r\n });\r\n }\r\n\r\n render() {\r\n let { menuAnchor, videos } = this.state;\r\n\r\n return (\r\n
\r\n \r\n \r\n {videos.length\r\n ? videos.map((source, n) => (\r\n
\r\n \r\n {source.name}\r\n \r\n
{n == 0 && videos.length > 1 ? : null}
\r\n
\r\n ))\r\n : null}\r\n {this.props.tv ? (\r\n
\r\n \r\n Entire Season\r\n
\r\n ) : null}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Link } from \"react-router-dom\";\r\n\r\nimport {\r\n Button,\r\n Dialog,\r\n DialogTitle,\r\n IconButton,\r\n Tooltip,\r\n Typography,\r\n} from \"@material-ui/core\";\r\nimport CloudDownloadIcon from \"@material-ui/icons/CloudDownload\";\r\nimport CloudUploadIcon from \"@material-ui/icons/CloudUpload\";\r\nimport DeleteIcon from \"@material-ui/icons/Delete\";\r\nimport EditIcon from \"@material-ui/icons/Edit\";\r\nimport KeyboardArrowLeftIcon from \"@material-ui/icons/KeyboardArrowLeft\";\r\nimport KeyboardArrowRightIcon from \"@material-ui/icons/KeyboardArrowRight\";\r\nimport SaveAltIcon from \"@material-ui/icons/SaveAlt\";\r\nimport StarIcon from \"@material-ui/icons/Star\";\r\n\r\nimport { Container, Draggable } from \"react-smooth-dnd\";\r\nimport { arrayMoveImmutable } from \"array-move\";\r\nimport List from \"@material-ui/core/List\";\r\nimport ListItem from \"@material-ui/core/ListItem\";\r\nimport ListItemIcon from \"@material-ui/core/ListItemIcon\";\r\nimport ListItemText from \"@material-ui/core/ListItemText\";\r\nimport ListItemSecondaryAction from \"@material-ui/core/ListItemSecondaryAction\";\r\nimport DragHandleIcon from \"@material-ui/icons/DragHandle\";\r\n\r\nimport Swal from \"sweetalert2/src/sweetalert2.js\";\r\nimport \"@sweetalert2/theme-dark/dark.css\";\r\n\r\nimport { guid, theme } from \"../../components\";\r\nimport \"./index.css\";\r\n\r\nexport default class Carousel extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n currentEditing: null,\r\n hide: props.hide || false,\r\n isAndroid: /(android)/i.test(\r\n navigator.userAgent || navigator.vendor || window.opera\r\n ),\r\n isIOS:\r\n /iPad|iPhone|iPod/.test(\r\n navigator.userAgent || navigator.vendor || window.opera\r\n ) && !window.MSStream,\r\n isEditOpen: false,\r\n metadata: this.props.metadata,\r\n server:\r\n window.sessionStorage.getItem(\"server\") ||\r\n window.localStorage.getItem(\"server\") ||\r\n window.location.origin,\r\n star: props.star,\r\n };\r\n this.handleStar = this.handleStar.bind(this);\r\n this.handleStarReset = this.handleStarReset.bind(this);\r\n this.handleStarImport = this.handleStarImport.bind(this);\r\n this.handleStarExport = this.handleStarExport.bind(this);\r\n this.handlePin = this.handlePin.bind(this);\r\n this.handleEditOpen = this.handleEditOpen.bind(this);\r\n this.handleEditClose = this.handleEditClose.bind(this);\r\n this.handleEditDrop = this.handleEditDrop.bind(this);\r\n this.handleEditSave = this.handleEditSave.bind(this);\r\n this.handleScroll = this.handleScroll.bind(this);\r\n }\r\n\r\n handleStar(item, category) {\r\n let { metadata } = this.state;\r\n let starred_lists = JSON.parse(\r\n window.localStorage.getItem(\"starred_lists\") || \"[]\"\r\n );\r\n\r\n try {\r\n let index1 = starred_lists.findIndex((i) => i.id == category.id);\r\n let index2 = starred_lists[index1].children.findIndex(\r\n (i) => i.id == item.id\r\n );\r\n let index3 = metadata.findIndex((i) => i.id == category.id);\r\n let index4 = metadata[index3].children.findIndex((i) => i.id == item.id);\r\n starred_lists[index1].children.splice(index2, 1);\r\n metadata[index3].children.splice(index4, 1);\r\n window.localStorage.setItem(\r\n \"starred_lists\",\r\n JSON.stringify(starred_lists)\r\n );\r\n this.setState({ metadata: metadata });\r\n } catch {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: \"Your starred list seems to be corrupted!\",\r\n icon: \"error\",\r\n confirmButtonText: \"Reset\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Ignore\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n window.localStorage.setItem(\"starred_lists\", \"[]\");\r\n location.reload();\r\n }\r\n });\r\n }\r\n }\r\n\r\n handleStarReset(evt) {\r\n let { metadata } = this.state;\r\n\r\n Swal.fire({\r\n title: \"Warning!\",\r\n text: \"Are you sure you want to delete this starred list?\",\r\n icon: \"warning\",\r\n confirmButtonText: \"Delete\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"No\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n let starred_lists = JSON.parse(\r\n window.localStorage.getItem(\"starred_lists\") || \"[]\"\r\n );\r\n if (starred_lists.length == 1) {\r\n starred_lists.shift();\r\n metadata.shift();\r\n } else {\r\n starred_lists.splice(evt, 1);\r\n metadata.splice(evt, 1);\r\n }\r\n window.localStorage.setItem(\r\n \"starred_lists\",\r\n JSON.stringify(starred_lists)\r\n );\r\n this.setState({ metadata: metadata });\r\n }\r\n });\r\n }\r\n\r\n handleStarImport(evt) {\r\n if (evt.target.files.length) {\r\n var file = evt.target.files[0];\r\n var reader = new FileReader();\r\n reader.onload = (evtR) => {\r\n let starred_lists = JSON.parse(\r\n window.localStorage.getItem(\"starred_lists\") || \"[]\"\r\n );\r\n let starred_list = JSON.parse(evtR.target.result);\r\n let i = parseInt(evt.target.id.replace(\"file-input-\", \"\"));\r\n starred_lists[i].children = starred_list.children;\r\n window.localStorage.setItem(\r\n \"starred_lists\",\r\n JSON.stringify(starred_lists)\r\n );\r\n let { metadata } = this.state;\r\n if (metadata.length && metadata[i].type == \"Starred\") {\r\n metadata[i].children = starred_list.children;\r\n this.setState({\r\n metadata: metadata,\r\n });\r\n }\r\n };\r\n reader.readAsText(file);\r\n }\r\n }\r\n\r\n handleStarExport(evt) {\r\n let starred_lists = JSON.parse(\r\n window.localStorage.getItem(\"starred_lists\") || \"[]\"\r\n );\r\n let starred_list = starred_lists[evt];\r\n\r\n const file = new Blob([JSON.stringify(starred_list)], {\r\n type: \"application/json\",\r\n });\r\n const link = document.createElement(\"a\");\r\n link.href = window.URL.createObjectURL(file);\r\n link.download = `libdrive-starred-${starred_list.name}-${+new Date()}.json`;\r\n link.click();\r\n }\r\n\r\n handlePin(evt, pin) {\r\n let starred_lists = JSON.parse(\r\n window.localStorage.getItem(\"starred_lists\") || \"[]\"\r\n );\r\n if (!pin) {\r\n starred_lists[evt].categoryInfo.pinned = false;\r\n window.localStorage.setItem(\r\n \"starred_lists\",\r\n JSON.stringify(starred_lists)\r\n );\r\n this.setState({ metadata: starred_lists });\r\n } else {\r\n starred_lists[evt].categoryInfo.pinned = true;\r\n window.localStorage.setItem(\r\n \"starred_lists\",\r\n JSON.stringify(starred_lists)\r\n );\r\n this.setState({ metadata: starred_lists });\r\n }\r\n }\r\n\r\n handleEditOpen(evt) {\r\n this.setState({ currentEditing: evt, isEditOpen: true });\r\n }\r\n\r\n handleEditClose() {\r\n let starred_lists = JSON.parse(\r\n window.localStorage.getItem(\"starred_lists\") || \"[]\"\r\n );\r\n this.setState({\r\n currentEditing: null,\r\n isEditOpen: false,\r\n metadata: starred_lists,\r\n });\r\n }\r\n\r\n handleEditDrop({ removedIndex, addedIndex }) {\r\n let { metadata, currentEditing } = this.state;\r\n let items = metadata[currentEditing].children;\r\n metadata[currentEditing].children = arrayMoveImmutable(\r\n items,\r\n removedIndex,\r\n addedIndex\r\n );\r\n this.setState({ metadata: metadata });\r\n }\r\n\r\n handleEditSave() {\r\n let { metadata } = this.state;\r\n window.localStorage.setItem(\"starred_lists\", JSON.stringify(metadata));\r\n this.setState({ currentEditing: null, isEditOpen: false });\r\n }\r\n\r\n handleScroll(n, offset) {\r\n document.getElementsByClassName(\"carousel__items\")[n].scrollLeft += offset;\r\n }\r\n\r\n render() {\r\n let {\r\n currentEditing,\r\n hide,\r\n isAndroid,\r\n isIOS,\r\n isEditOpen,\r\n metadata,\r\n server,\r\n star,\r\n } = this.state;\r\n\r\n return star ? (\r\n
\r\n {metadata.length\r\n ? metadata.map((category, p) =>\r\n category.children.length || !hide ? (\r\n \r\n \r\n
\r\n \r\n \r\n {category.categoryInfo.name}\r\n \r\n \r\n this.handleEditOpen(p)}\r\n style={{ marginLeft: \"20px\" }}\r\n >\r\n \r\n \r\n \r\n \r\n this.handleStarReset(p)}\r\n >\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n this.handleStarExport(p)}\r\n >\r\n \r\n \r\n \r\n {category.categoryInfo.pinned ? (\r\n \r\n this.handlePin(p, false)}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n this.handlePin(p, true)}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n
\r\n \r\n \r\n
\r\n {category.children.length\r\n ? category.children.map((item) => (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n {item.title}\r\n \r\n \r\n \r\n this.handleStar(item, category)\r\n }\r\n >\r\n \r\n \r\n
\r\n \r\n
\r\n ))\r\n : null}\r\n \r\n \r\n ) : null\r\n )\r\n : null}\r\n {isEditOpen ? (\r\n \r\n \r\n {metadata[currentEditing].categoryInfo.name}\r\n \r\n \r\n \r\n {metadata[currentEditing].children.map(({ id, title }) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n }\r\n >\r\n Save\r\n \r\n \r\n \r\n \r\n ) : null}\r\n \r\n ) : (\r\n
\r\n {metadata.length\r\n ? metadata.map((category, n) =>\r\n category.children.length || !hide ? (\r\n
\r\n \r\n \r\n \r\n {category.categoryInfo.name}\r\n \r\n
\r\n {isAndroid || isIOS ? null : (\r\n \r\n this.handleScroll(n, -500)}>\r\n \r\n \r\n this.handleScroll(n, 500)}>\r\n \r\n \r\n
\r\n )}\r\n \r\n
\r\n {category.children.length\r\n ? category.children.map((item) => (\r\n \r\n \r\n \r\n \r\n \r\n {item.title}\r\n \r\n \r\n ))\r\n : null}\r\n
\r\n \r\n ) : null\r\n )\r\n : null}\r\n \r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { CircularProgress } from \"@material-ui/core\";\r\n\r\nimport Swal from \"sweetalert2/src/sweetalert2.js\";\r\nimport \"@sweetalert2/theme-dark/dark.css\";\r\n\r\nimport axios from \"axios\";\r\nimport queryString from \"query-string\";\r\n\r\nimport { Footer, Nav, PageMenu, SortMenu, seo, theme, Tile } from \"../../components\";\r\n\r\nexport default class CategoryBrowse extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n auth: window.sessionStorage.getItem(\"auth\") || window.localStorage.getItem(\"auth\") || \"0\",\r\n category: this.props.match.params.category,\r\n genre: queryString.parse(this.props.location.search).genre || \"\",\r\n isLoaded: false,\r\n metadata: {},\r\n page: parseInt(queryString.parse(this.props.location.search).page) || 1,\r\n range: `${queryString.parse(this.props.location.search).page === undefined ? `0:${JSON.parse(window.localStorage.getItem(\"ui_config\") || window.sessionStorage.getItem(\"ui_config\") || \"{}\").range || \"16\"}` : `${(parseInt(queryString.parse(this.props.location.search).page) - 1) * parseInt(JSON.parse(window.localStorage.getItem(\"ui_config\") || window.sessionStorage.getItem(\"ui_config\") || \"{}\").range || \"16\")}:${parseInt(queryString.parse(this.props.location.search).page) * parseInt(JSON.parse(window.localStorage.getItem(\"ui_config\") || window.sessionStorage.getItem(\"ui_config\") || \"{}\").range || \"16\")}`}`,\r\n server: window.sessionStorage.getItem(\"server\") || window.localStorage.getItem(\"server\") || window.location.origin,\r\n sort: queryString.parse(this.props.location.search).sort || \"\",\r\n ui_config: JSON.parse(window.localStorage.getItem(\"ui_config\") || window.sessionStorage.getItem(\"ui_config\") || \"{}\"),\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n let { auth, category, genre, range, server, sort, ui_config } = this.state;\r\n\r\n if (!auth || !server) {\r\n this.props.history.push(\"/logout\");\r\n }\r\n\r\n window.scrollTo(0, 0);\r\n\r\n let req_path = `${server}/api/v1/metadata`;\r\n let req_args = `?a=${auth}&c=${encodeURIComponent(category)}&g=${encodeURIComponent(genre)}&r=${range}&s=${sort}`;\r\n\r\n axios\r\n .get(req_path + req_args)\r\n .then((response) => {\r\n this.setState({\r\n isLoaded: true,\r\n metadata: response.data.content,\r\n pages: Math.ceil(response.data.content[0][\"length\"] / parseInt(ui_config.range || \"16\")) || 1,\r\n });\r\n })\r\n .catch((error) => {\r\n console.error(error);\r\n if (error.response) {\r\n let data = error.response.data;\r\n if (data.code === 401) {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Login\",\r\n confirmButtonColor: theme.palette.success.main,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n }\r\n });\r\n } else if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n } else if (error.request) {\r\n if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `libDrive could not communicate with the server! Is '${server}' the correct address?`,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n componentWillUnmount() {\r\n seo();\r\n }\r\n\r\n render() {\r\n let { genre, isLoaded, metadata, page, pages, sort, ui_config } = this.state;\r\n\r\n if (isLoaded) {\r\n seo({\r\n title: `${ui_config.title || \"libDrive\"} - ${metadata[0].categoryInfo.name}`,\r\n description: `Browse ${metadata[0].categoryInfo.name} on ${ui_config.title || \"libDrive\"}!`,\r\n });\r\n }\r\n\r\n return isLoaded ? (\r\n
\r\n
\r\n ) : (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Link } from \"react-router-dom\";\r\n\r\nimport { Button, Menu, MenuItem } from \"@material-ui/core\";\r\nimport TvIcon from \"@material-ui/icons/Tv\";\r\n\r\nimport { guid } from \"../../components\";\r\n\r\nexport default class ChildrenMenu extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n menuAnchor: false,\r\n ...props.state,\r\n };\r\n this.handleClick = this.handleClick.bind(this);\r\n this.handleClose = this.handleClose.bind(this);\r\n }\r\n\r\n handleClick(evt) {\r\n this.setState({\r\n menuAnchor: evt.currentTarget,\r\n });\r\n }\r\n\r\n handleClose() {\r\n this.setState({\r\n menuAnchor: false,\r\n });\r\n }\r\n\r\n render() {\r\n let { metadata, menuAnchor } = this.state;\r\n return (\r\n
\r\n }\r\n >\r\n Seasons\r\n \r\n \r\n {metadata.children.length\r\n ? metadata.children.map((child) => {\r\n if (child.type == \"directory\") {\r\n return (\r\n \r\n \r\n {child.name}\r\n \r\n \r\n );\r\n }\r\n })\r\n : null}\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\n\r\nimport { version } from \"../../components\";\r\n\r\nconst styles = (theme) => ({\r\n footer__container: {\r\n width: \"100%\",\r\n height: \"75px\",\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n },\r\n});\r\n\r\nclass Footer extends Component {\r\n render() {\r\n const { classes } = this.props;\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default withStyles(styles, { withTheme: true })(Footer);\r\n","import React, { Component } from \"react\";\r\n\r\nimport { CircularProgress } from \"@material-ui/core\";\r\n\r\nimport Swal from \"sweetalert2/src/sweetalert2.js\";\r\nimport \"@sweetalert2/theme-dark/dark.css\";\r\n\r\nimport axios from \"axios\";\r\nimport queryString from \"query-string\";\r\n\r\nimport { Footer, Nav, PageMenu, SortMenu, seo, theme, Tile } from \"../../components\";\r\n\r\nexport default class CategoryBrowse extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n auth: window.sessionStorage.getItem(\"auth\") || window.localStorage.getItem(\"auth\") || \"0\",\r\n genre: queryString.parse(this.props.location.search).genre || \"\",\r\n isLoaded: false,\r\n metadata: {},\r\n page: parseInt(queryString.parse(this.props.location.search).page) || 1,\r\n range: `${queryString.parse(this.props.location.search).page === undefined ? \"0:8\" : `${(parseInt(queryString.parse(this.props.location.search).page) - 1) * 8}:${parseInt(queryString.parse(this.props.location.search).page) * 8}`}`,\r\n server: window.sessionStorage.getItem(\"server\") || window.localStorage.getItem(\"server\") || window.location.origin,\r\n sort: queryString.parse(this.props.location.search).sort || \"\",\r\n ui_config: JSON.parse(window.localStorage.getItem(\"ui_config\") || window.sessionStorage.getItem(\"ui_config\") || \"{}\"),\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n let { auth, genre, range, server, sort } = this.state;\r\n\r\n if (!auth || !server) {\r\n this.props.history.push(\"/logout\");\r\n }\r\n\r\n let req_path = `${server}/api/v1/metadata`;\r\n let req_args = `?a=${auth}&g=${encodeURIComponent(genre)}&r=${range}&s=${sort}`;\r\n\r\n axios\r\n .get(req_path + req_args)\r\n .then((response) => {\r\n this.setState({\r\n isLoaded: true,\r\n metadata: response.data.content,\r\n pages: Math.ceil(response.data.content[0][\"length\"] / 8) || 1,\r\n });\r\n })\r\n .catch((error) => {\r\n console.error(error);\r\n if (error.response) {\r\n let data = error.response.data;\r\n if (data.code === 401) {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Login\",\r\n confirmButtonColor: theme.palette.success.main,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n }\r\n });\r\n } else if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n } else if (error.request) {\r\n if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `libDrive could not communicate with the server! Is '${server}' the correct address?`,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n componentWillUnmount() {\r\n seo();\r\n }\r\n\r\n render() {\r\n let { genre, isLoaded, metadata, page, pages, sort, ui_config } = this.state;\r\n\r\n if (isLoaded) {\r\n seo({\r\n title: `${ui_config.title || \"libDrive\"}${genre ? ` - ${genre}` : \"\"}`,\r\n description: `Browse ${genre ? `the ${genre} genre` : \"genres\"} on ${ui_config.title || \"libDrive\"}!`,\r\n });\r\n }\r\n\r\n return isLoaded ? (\r\n
\r\n
\r\n ) : (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","export default function guid() {\r\n function _p8(s) {\r\n var p = (Math.random().toString(16) + \"000000000\").substr(2, 8);\r\n return s ? \"-\" + p.substr(0, 4) + \"-\" + p.substr(4, 4) : p;\r\n }\r\n return _p8() + _p8(true) + _p8(true) + _p8();\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Avatar, Button, Container, CssBaseline, TextField, Typography } from \"@material-ui/core\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport LockOutlinedIcon from \"@material-ui/icons/LockOutlined\";\r\n\r\nimport Swal from \"sweetalert2/src/sweetalert2.js\";\r\nimport \"@sweetalert2/theme-dark/dark.css\";\r\n\r\nimport axios from \"axios\";\r\n\r\nimport { theme } from \"../../components\";\r\nimport Footer from \"../../components/Footer\";\r\n\r\nconst styles = (theme) => ({\r\n paper: {\r\n marginTop: theme.spacing(8),\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n alignItems: \"center\",\r\n },\r\n avatar: {\r\n margin: theme.spacing(1),\r\n backgroundColor: theme.palette.secondary.main,\r\n },\r\n form: {\r\n width: \"100%\",\r\n marginTop: theme.spacing(1),\r\n },\r\n submit: {\r\n margin: theme.spacing(3, 0, 2),\r\n },\r\n});\r\n\r\nclass Login extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n auth: \"\",\r\n error: \"\",\r\n page: false,\r\n password: \"\",\r\n signup: false,\r\n server: window.location.origin,\r\n username: \"\",\r\n };\r\n\r\n this.handleTempServerChange = this.handleTempServerChange.bind(this);\r\n this.handlePassChange = this.handlePassChange.bind(this);\r\n this.handleUserChange = this.handleUserChange.bind(this);\r\n this.handleServerSubmit = this.handleServerSubmit.bind(this);\r\n this.handleSubmit = this.handleSubmit.bind(this);\r\n this.handleSignup = this.handleSignup.bind(this);\r\n this.dismissError = this.dismissError.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n let { server } = this.state;\r\n\r\n let req_path = `${server}/api/v1/auth`;\r\n let req_args = `?rules=signup`;\r\n\r\n axios.get(req_path + req_args).then((response) => {\r\n let data = response.data;\r\n if (data.code === 200) {\r\n window.localStorage.setItem(\"auth\", \"0\");\r\n window.localStorage.setItem(\"server\", server);\r\n window.localStorage.setItem(\"ui_config\", JSON.stringify(data.content.ui_config));\r\n window.sessionStorage.setItem(\"auth\", \"0\");\r\n window.sessionStorage.setItem(\"server\", server);\r\n window.sessionStorage.setItem(\"ui_config\", JSON.stringify(data.content.ui_config));\r\n this.props.history.push(\"/browse\");\r\n } else if (data.content === true) {\r\n this.setState({ signup: true, page: true });\r\n } else if (data.content === false) {\r\n this.setState({ signup: false, page: true });\r\n }\r\n });\r\n }\r\n\r\n dismissError() {\r\n this.setState({ error: \"\" });\r\n }\r\n\r\n handleServerSubmit(evt) {\r\n evt.preventDefault();\r\n let { server } = this.state;\r\n\r\n if (!server) {\r\n return this.setState({ error: \"Server is required\" });\r\n }\r\n if (!server.startsWith(\"http\")) {\r\n server = `https://${server}`;\r\n }\r\n\r\n let req_path = `${server}/api/v1/auth`;\r\n let req_args = `?rules=signup`;\r\n\r\n axios\r\n .get(req_path + req_args)\r\n .then((response) => {\r\n let data = response.data;\r\n if (data.code === 200) {\r\n window.localStorage.setItem(\"auth\", \"0\");\r\n window.localStorage.setItem(\"server\", server);\r\n window.localStorage.setItem(\"ui_config\", JSON.stringify(data.content.ui_config));\r\n window.sessionStorage.setItem(\"auth\", \"0\");\r\n window.sessionStorage.setItem(\"server\", server);\r\n window.sessionStorage.setItem(\"ui_config\", JSON.stringify(data.content.ui_config));\r\n this.props.history.push(\"/browse\");\r\n } else if (data.content === true) {\r\n this.setState({ server: server, signup: true, page: true });\r\n } else if (data.content === false) {\r\n this.setState({ server: server, signup: false, page: true });\r\n }\r\n })\r\n .catch((error) => {\r\n console.error(error);\r\n try {\r\n let data = response.data;\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"OK\",\r\n confirmButtonColor: theme.palette.success.main,\r\n });\r\n } catch {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `You were unable to communicate with the server. Are you sure ${server} is the correct server?`,\r\n icon: \"error\",\r\n confirmButtonText: \"OK\",\r\n confirmButtonColor: theme.palette.success.main,\r\n });\r\n }\r\n });\r\n }\r\n\r\n handleSubmit(evt) {\r\n evt.preventDefault();\r\n let { password, server, username } = this.state;\r\n\r\n let req_path = `${server}/api/v1/auth`;\r\n let req_args = `?u=${encodeURIComponent(username)}&p=${encodeURIComponent(password)}`;\r\n\r\n axios\r\n .get(req_path + req_args)\r\n .then((response) => {\r\n let data = response.data;\r\n window.localStorage.setItem(\"server\", server);\r\n window.sessionStorage.setItem(\"server\", server);\r\n window.localStorage.setItem(\"ui_config\", JSON.stringify(data.content.ui_config));\r\n window.localStorage.setItem(\"auth\", data.content.auth);\r\n window.sessionStorage.setItem(\"auth\", data.content.auth);\r\n window.sessionStorage.setItem(\"ui_config\", JSON.stringify(data.content.ui_config));\r\n this.props.history.push(\"/\");\r\n })\r\n .catch((error) => {\r\n console.error(error);\r\n try {\r\n let data = response.data;\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"OK\",\r\n confirmButtonColor: theme.palette.success.main,\r\n });\r\n } catch {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `The username and or password was incorrect!`,\r\n icon: \"error\",\r\n confirmButtonText: \"OK\",\r\n confirmButtonColor: theme.palette.success.main,\r\n });\r\n }\r\n });\r\n return this.setState({ error: \"\" });\r\n }\r\n\r\n handleSignup() {\r\n let { password, server, username } = this.state;\r\n\r\n if (!username) {\r\n return this.setState({ error: \"Username is required\" });\r\n }\r\n if (!password) {\r\n return this.setState({ error: \"Password is required\" });\r\n }\r\n\r\n let req_path = `${server}/api/v1/signup`;\r\n let req_args = `?u=${encodeURIComponent(username)}&p=${encodeURIComponent(password)}`;\r\n\r\n axios\r\n .get(req_path + req_args)\r\n .then((response) => {\r\n let data = response.data;\r\n window.localStorage.setItem(\"server\", server);\r\n window.sessionStorage.setItem(\"server\", server);\r\n window.localStorage.setItem(\"auth\", data.content.auth);\r\n window.sessionStorage.setItem(\"auth\", data.content.auth);\r\n this.props.history.push(\"/\");\r\n })\r\n .catch((error) => {\r\n console.error(error);\r\n let data = error.response;\r\n try {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"OK\",\r\n confirmButtonColor: theme.palette.success.main,\r\n });\r\n } catch {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `Something went wrong while communicating with the server ${server}`,\r\n icon: \"error\",\r\n confirmButtonText: \"OK\",\r\n confirmButtonColor: theme.palette.success.main,\r\n });\r\n }\r\n });\r\n return this.setState({ error: \"\" });\r\n }\r\n\r\n handleTempServerChange(evt) {\r\n this.setState({\r\n server: evt.target.value,\r\n });\r\n }\r\n\r\n handleUserChange(evt) {\r\n this.setState({\r\n username: evt.target.value,\r\n });\r\n }\r\n\r\n handlePassChange(evt) {\r\n this.setState({\r\n password: evt.target.value,\r\n });\r\n }\r\n\r\n render() {\r\n let { error, password, page, server, username } = this.state;\r\n const { classes } = this.props;\r\n\r\n return !page ? (\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n Sign in\r\n
\r\n {error && (\r\n
\r\n

\r\n \r\n {error}\r\n

\r\n
\r\n )}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n ) : (\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n Sign in\r\n
\r\n {error && (\r\n
\r\n

\r\n \r\n {error}\r\n

\r\n
\r\n )}\r\n \r\n \r\n \r\n \r\n {this.state.signup ? (\r\n
\r\n \r\n Be aware that the owner of this server can view your credentials!\r\n
\r\n ) : (\r\n
\r\n )}\r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default withStyles(styles, { withTheme: true })(Login);\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Redirect } from \"react-router-dom\";\r\n\r\nimport { CircularProgress } from \"@material-ui/core\";\r\n\r\nimport { guid } from \"../../components\";\r\n\r\nexport default class Logout extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { isLoaded: false };\r\n }\r\n\r\n componentDidMount() {\r\n window.localStorage.clear();\r\n window.sessionStorage.clear();\r\n setTimeout(() => this.setState({ isLoaded: true }), 500);\r\n }\r\n\r\n render() {\r\n let { isLoaded } = this.state;\r\n\r\n return isLoaded ? (\r\n \r\n ) : (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Link } from \"react-router-dom\";\r\n\r\nimport {\r\n AppBar,\r\n Avatar,\r\n IconButton,\r\n InputBase,\r\n Toolbar,\r\n Typography,\r\n} from \"@material-ui/core\";\r\nimport { alpha } from \"@material-ui/core/styles\";\r\nimport SearchIcon from \"@material-ui/icons/Search\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\n\r\nimport {\r\n AccountMenu,\r\n BrowseMenu,\r\n NewsMenu,\r\n ThemeMenu,\r\n guid,\r\n} from \"../../components\";\r\n\r\nconst styles = (theme) => ({\r\n root: {\r\n backgroundColor: theme.palette.background.default,\r\n color: theme.palette.text.primary,\r\n },\r\n grow: {\r\n flexGrow: 1,\r\n },\r\n title: {\r\n display: \"none\",\r\n [theme.breakpoints.up(\"sm\")]: {\r\n display: \"block\",\r\n },\r\n },\r\n search: {\r\n position: \"relative\",\r\n borderRadius: theme.shape.borderRadius,\r\n backgroundColor: alpha(theme.palette.common.main, 0.15),\r\n \"&:hover\": {\r\n backgroundColor: alpha(theme.palette.common.main, 0.25),\r\n },\r\n marginRight: theme.spacing(2),\r\n marginLeft: 0,\r\n width: \"100%\",\r\n [theme.breakpoints.up(\"sm\")]: {\r\n marginLeft: theme.spacing(3),\r\n width: \"auto\",\r\n },\r\n },\r\n searchIcon: {\r\n padding: theme.spacing(0, 2),\r\n height: \"100%\",\r\n position: \"absolute\",\r\n zIndex: 10,\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n },\r\n inputRoot: {\r\n color: \"inherit\",\r\n },\r\n inputInput: {\r\n padding: theme.spacing(1, 1, 1, 0),\r\n paddingLeft: `calc(1em + ${theme.spacing(4)}px)`,\r\n transition: theme.transitions.create(\"width\"),\r\n width: \"15vw\",\r\n maxWidth: \"500px\",\r\n },\r\n});\r\n\r\nclass NavUI extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n ...props.state,\r\n ui_config: JSON.parse(\r\n window.localStorage.getItem(\"ui_config\") ||\r\n window.sessionStorage.getItem(\"ui_config\") ||\r\n \"{}\"\r\n ),\r\n };\r\n this.searchChange = this.searchChange.bind(this);\r\n this.searchSubmit = this.searchSubmit.bind(this);\r\n this.onMouseOver = this.onMouseOver.bind(this);\r\n this.onMouseOut = this.onMouseOut.bind(this);\r\n }\r\n\r\n searchChange(evt) {\r\n this.setState({ search: evt.target.value });\r\n }\r\n\r\n searchSubmit(evt) {\r\n evt.preventDefault();\r\n if (!(this.state.search == \"\" || this.state.search == null)) {\r\n this.props.history.push({\r\n pathname: `/search/${this.state.search}`,\r\n key: guid(),\r\n });\r\n }\r\n }\r\n\r\n onMouseOver(evt) {\r\n evt.target.style.width = \"20vw\";\r\n }\r\n\r\n onMouseOut(evt) {\r\n evt.target.style.width = \"15vw\";\r\n }\r\n\r\n render() {\r\n let { accounts, categories, query, search, ui_config } = this.state;\r\n const { classes } = this.props;\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {ui_config.icon_on_nav ? (\r\n \r\n L\r\n \r\n ) : (\r\n \r\n {ui_config.title || \"libDrive\"}\r\n \r\n )}\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n {!ui_config.hide_news ? : null}\r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default withStyles(styles, { withTheme: true })(NavUI);\r\n","import React, { Component } from \"react\";\r\n\r\nimport axios from \"axios\";\r\n\r\nimport NavUI from \"./NavUI\";\r\n\r\nexport default class Nav extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n accounts: {},\r\n auth: window.sessionStorage.getItem(\"auth\") || window.localStorage.getItem(\"auth\") || \"0\",\r\n categories: [],\r\n isLoaded: false,\r\n server: window.sessionStorage.getItem(\"server\") || window.localStorage.getItem(\"server\") || window.location.origin,\r\n ui_config: {},\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n let { auth, server } = this.state;\r\n\r\n let req_path = `${server}/api/v1/environment`;\r\n let req_args = `?a=${auth}`;\r\n\r\n axios.get(req_path + req_args).then((response) => {\r\n let data = response.data;\r\n this.setState({\r\n accounts: data.content.account_list,\r\n categories: data.content.category_list,\r\n isLoaded: true,\r\n ui_config: data.content.ui_config,\r\n });\r\n if (typeof data.content.ui_config == \"object\") {\r\n window.localStorage.setItem(\"ui_config\", JSON.stringify(data.content.ui_config));\r\n window.sessionStorage.setItem(\"ui_config\", JSON.stringify(data.content.ui_config));\r\n }\r\n });\r\n }\r\n\r\n render() {\r\n let { accounts, categories, isLoaded } = this.state;\r\n\r\n return isLoaded ? (\r\n
\r\n \r\n
\r\n ) : isLoaded ? (\r\n
\r\n \r\n
\r\n ) : (\r\n \r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport {\r\n Badge,\r\n Divider,\r\n IconButton,\r\n List,\r\n ListItem,\r\n ListItemText,\r\n Menu,\r\n} from \"@material-ui/core\";\r\nimport NotificationsIcon from \"@material-ui/icons/Notifications\";\r\n\r\nimport axios from \"axios\";\r\n\r\nimport { guid, theme, version } from \"../../components\";\r\n\r\nexport default class NewsMenu extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n dismissed:\r\n (window.localStorage.getItem(\"dismissed\") || \"false\") == \"true\",\r\n isLoaded: false,\r\n isNew: false,\r\n lastChecked: new Date(\r\n window.localStorage.getItem(\"last_news_check\") || \"0\"\r\n ).getTime(),\r\n menuAnchor: false,\r\n news: JSON.parse(window.localStorage.getItem(\"news\") || \"[]\"),\r\n now: new Date().getTime(),\r\n };\r\n this.handleClick = this.handleClick.bind(this);\r\n this.handleClose = this.handleClose.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n let { isNew, lastChecked, news, now } = this.state;\r\n let targetTime = lastChecked + 3 * 60 * 60 * 1000;\r\n\r\n if (news.length && news[0].tag_name) {\r\n if (version != news[0].tag_name.replace(\"v\", \"\")) {\r\n isNew = true;\r\n }\r\n }\r\n\r\n if (now >= targetTime) {\r\n axios\r\n .get(\"https://api.github.com/repos/libDrive/libDrive/releases\")\r\n .then((response) => {\r\n let data = response.data;\r\n window.localStorage.setItem(\"news\", JSON.stringify(data));\r\n window.localStorage.setItem(\"last_news_check\", now);\r\n if (\r\n news.length &&\r\n data.length &&\r\n news[0].tag_name != data[0].tag_name\r\n ) {\r\n window.localStorage.setItem(\"dismissed\", \"false\");\r\n this.setState({\r\n dismissed: false,\r\n isLoaded: true,\r\n isNew: isNew,\r\n news: data,\r\n });\r\n } else {\r\n this.setState({\r\n isLoaded: true,\r\n isNew: isNew,\r\n news: data,\r\n });\r\n }\r\n });\r\n } else {\r\n this.setState({ isLoaded: true, isNew: isNew });\r\n }\r\n }\r\n\r\n handleClick(evt) {\r\n let { news, now } = this.state;\r\n\r\n this.setState({\r\n menuAnchor: evt.currentTarget,\r\n });\r\n\r\n axios\r\n .get(\"https://api.github.com/repos/libDrive/libDrive/releases\")\r\n .then((response) => {\r\n let data = response.data;\r\n window.localStorage.setItem(\"news\", JSON.stringify(data));\r\n window.localStorage.setItem(\"last_news_check\", now);\r\n window.localStorage.setItem(\"dismissed\", \"true\");\r\n this.setState({\r\n dismissed: true,\r\n news: data,\r\n });\r\n });\r\n }\r\n\r\n handleClose() {\r\n this.setState({\r\n menuAnchor: false,\r\n });\r\n }\r\n\r\n render() {\r\n let { dismissed, isNew, isLoaded, menuAnchor, news } = this.state;\r\n\r\n return isLoaded ? (\r\n
\r\n \r\n {!dismissed && isNew ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n There is a new version available!\r\n \r\n ) : (\r\n \r\n You are on the latest version\r\n \r\n )\r\n }\r\n />\r\n \r\n \r\n {news.length\r\n ? news.slice(0, 3).map((item) => (\r\n \r\n libDrive {item.tag_name}}\r\n secondary={\r\n \r\n \r\n Version: {item.tag_name}\r\n {\"\\n\"}\r\n Date: {new Date(item.published_at).toDateString()}\r\n {\"\\n\"}\r\n Info:{\" \"}\r\n \r\n \r\n {item.html_url.replace(\r\n \"https://github.com/\",\r\n \"\"\r\n )}\r\n \r\n \r\n \r\n \r\n }\r\n />\r\n \r\n ))\r\n : null}\r\n \r\n \r\n
\r\n ) : null;\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Nav } from \"../../components\";\r\n\r\nimport \"./index.css\";\r\n\r\nexport default class NotFound extends Component {\r\n render() {\r\n return (\r\n
\r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Link, Redirect } from \"react-router-dom\";\r\n\r\nimport { Pagination, PaginationItem } from \"@material-ui/lab\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\n\r\nimport { guid } from \"../../components\";\r\n\r\nconst styles = (theme) => ({\r\n root: {\r\n \"& > *\": {\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n margin: \"20px\",\r\n },\r\n },\r\n});\r\n\r\nclass PageMenu extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = props.state;\r\n }\r\n\r\n render() {\r\n let { genre, page, pages, sort } = this.state;\r\n const { classes } = this.props;\r\n\r\n if (page > pages) {\r\n return (\r\n \r\n );\r\n } else {\r\n return (\r\n
\r\n = 600\r\n ? \"large\"\r\n : window.innerWidth >= 390\r\n ? \"medium\"\r\n : \"small\"\r\n }\r\n color=\"primary\"\r\n renderItem={(item) =>\r\n item.page ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n )\r\n }\r\n />\r\n
\r\n );\r\n }\r\n }\r\n}\r\n\r\nexport default withStyles(styles, { withTheme: true })(PageMenu);\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Button, Divider, Menu, MenuItem } from \"@material-ui/core\";\r\nimport PlayCircleOutlineIcon from \"@material-ui/icons/PlayCircleOutline\";\r\n\r\nexport default class PlayerMenu extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n menuAnchor: false,\r\n ...props.state,\r\n };\r\n this.handleClick = this.handleClick.bind(this);\r\n this.handleClose = this.handleClose.bind(this);\r\n }\r\n\r\n handleClick(evt) {\r\n this.setState({\r\n menuAnchor: evt.currentTarget,\r\n });\r\n }\r\n\r\n handleClose(evt) {\r\n this.setState({\r\n menuAnchor: false,\r\n });\r\n }\r\n\r\n render() {\r\n let { auth, id, isAndroid, isIOS, metadata, server } = this.state;\r\n\r\n let mobileUrl;\r\n const streamURL = new URL(`${server}/api/v1/redirectdownload/${encodeURIComponent(metadata.name)}?id=${id}`);\r\n if (isAndroid) {\r\n const scheme = streamURL.protocol.slice(0, -1);\r\n streamURL.hash = `Intent;action=android.intent.action.VIEW;scheme=${scheme};type=${metadata.mimeType};S.title=${encodeURIComponent(metadata.name)};end`;\r\n streamURL.protocol = \"intent\";\r\n mobileUrl = streamURL.toString();\r\n } else if (isIOS) {\r\n streamURL.host = \"x-callback-url\";\r\n streamURL.port = \"\";\r\n streamURL.pathname = \"stream\";\r\n streamURL.search = `url=${server}/api/v1/redirectdownload/${encodeURIComponent(metadata.name)}?id=${id}`;\r\n streamURL.protocol = \"vlc-x-callback\";\r\n mobileUrl = streamURL.toString();\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n {isAndroid || isIOS ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n {\r\n navigator.clipboard.writeText(`${server}/api/v1/redirectdownload/${encodeURIComponent(metadata.name)}?id=${id}`);\r\n this.handleClose();\r\n }}\r\n >\r\n Copy URL\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Button } from \"@material-ui/core\";\r\nimport PlaylistPlayRoundedIcon from \"@material-ui/icons/PlaylistPlayRounded\";\r\n\r\nexport default class PlaylistMenu extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = props.state;\r\n this.handleClick = this.handleClick.bind(this);\r\n }\r\n\r\n handleClick(evt) {\r\n let { auth, metadata, server } = this.state;\r\n let m3u8 = `#EXTM3U\\n#EXTENC: UTF-8\\n#PLAYLIST: ${metadata.name}\\n`;\r\n\r\n for (var i = 0; i < metadata.children.length; i++) {\r\n m3u8 += `#EXTINF:0, ${metadata.children[i].name}\\n${server}/api/v1/redirectdownload/${encodeURI(metadata.children[i].name)}?id=${metadata.children[i].id}\\n`;\r\n }\r\n\r\n var element = document.createElement(\"a\");\r\n element.setAttribute(\"href\", \"data:text/plain;charset=utf-8,\" + encodeURIComponent(m3u8));\r\n element.setAttribute(\"download\", `${metadata.name}.m3u8`);\r\n element.style.display = \"none\";\r\n document.body.appendChild(element);\r\n element.click();\r\n document.body.removeChild(element);\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { CircularProgress } from \"@material-ui/core\";\r\n\r\nimport Swal from \"sweetalert2/src/sweetalert2.js\";\r\nimport \"@sweetalert2/theme-dark/dark.css\";\r\n\r\nimport axios from \"axios\";\r\n\r\nimport { Carousel, Footer, Nav, seo, theme } from \"../../components\";\r\n\r\nexport default class Search extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n auth: window.sessionStorage.getItem(\"auth\") || window.localStorage.getItem(\"auth\") || \"0\",\r\n isLoaded: false,\r\n metadata: [],\r\n query: this.props.match.params.q,\r\n server: window.sessionStorage.getItem(\"server\") || window.localStorage.getItem(\"server\") || window.location.origin,\r\n ui_config: JSON.parse(window.localStorage.getItem(\"ui_config\") || window.sessionStorage.getItem(\"ui_config\") || \"{}\"),\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n let { auth, query, server, ui_config } = this.state;\r\n\r\n if (!auth || !server) {\r\n this.props.history.push(\"/logout\");\r\n }\r\n\r\n seo({\r\n title: `${ui_config.title || \"libDrive\"} - ${query}`,\r\n description: `Find ${query} on ${ui_config.title || \"libDrive\"}!`,\r\n });\r\n\r\n let req_path = `${server}/api/v1/metadata`;\r\n let req_args = `?a=${auth}&q=${encodeURIComponent(query)}`;\r\n\r\n axios\r\n .get(req_path + req_args)\r\n .then((response) =>\r\n this.setState({\r\n isLoaded: true,\r\n metadata: response.data.content,\r\n })\r\n )\r\n .catch((error) => {\r\n console.error(error);\r\n if (error.response) {\r\n let data = error.response.data;\r\n if (data.code === 401) {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Login\",\r\n confirmButtonColor: theme.palette.success.main,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n }\r\n });\r\n } else if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n } else if (error.request) {\r\n if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `libDrive could not communicate with the server! Is '${server}' the correct address?`,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n componentWillUnmount() {\r\n seo();\r\n }\r\n\r\n render() {\r\n let { isLoaded, metadata, query } = this.state;\r\n\r\n return isLoaded ? (\r\n
\r\n
\r\n ) : (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","export default function seo(data = {}) {\r\n const ui_config = JSON.parse(\r\n window.localStorage.getItem(\"ui_config\") ||\r\n window.sessionStorage.getItem(\"ui_config\") ||\r\n \"{}\"\r\n );\r\n data.title = data.title || ui_config.title || \"libDrive\";\r\n data.description =\r\n data.description ||\r\n \"libDrive is a Google Drive media library manager and indexer, similar to Plex, that organizes Google Drive media to offer an intuitive and user-friendly experience.\";\r\n data.image = data.image || ui_config.icon || \"/images/icons/icon-512x512.png\";\r\n data.type = data.type || \"website\";\r\n document.title = data.title || ui_config.title;\r\n document\r\n .querySelector('meta[property=\"og:title\"]')\r\n .setAttribute(\"content\", data.title);\r\n document\r\n .querySelector('meta[name=\"description\"]')\r\n .setAttribute(\"content\", data.description);\r\n document\r\n .querySelector('meta[property=\"og:description\"]')\r\n .setAttribute(\"content\", data.description);\r\n document\r\n .querySelector('meta[property=\"og:image\"]')\r\n .setAttribute(\"content\", data.image);\r\n document\r\n .querySelector('meta[property=\"og:type\"]')\r\n .setAttribute(\"content\", data.type);\r\n}\r\n","import { createTheme } from \"@material-ui/core/styles\";\r\n\r\nconst lightTheme = createTheme({\r\n palette: {\r\n type: \"light\",\r\n primary: {\r\n main: \"#4197fe\",\r\n },\r\n secondary: {\r\n main: \"#68a0e5\",\r\n },\r\n error: {\r\n main: \"#d32f2f\",\r\n },\r\n warning: {\r\n main: \"#ff9800\",\r\n },\r\n success: {\r\n main: \"#4caf50\",\r\n },\r\n background: {\r\n default: \"#fafafa\",\r\n paper: \"#e8e8e8\",\r\n },\r\n text: {\r\n primary: \"#0f0f0f\",\r\n },\r\n common: {\r\n main: \"#000000\",\r\n },\r\n },\r\n});\r\n\r\nconst darkTheme = createTheme({\r\n palette: {\r\n type: \"dark\",\r\n primary: {\r\n main: \"#4197fe\",\r\n },\r\n secondary: {\r\n main: \"#68a0e5\",\r\n },\r\n error: {\r\n main: \"#d32f2f\",\r\n },\r\n warning: {\r\n main: \"#ff9800\",\r\n },\r\n success: {\r\n main: \"#4caf50\",\r\n },\r\n background: {\r\n default: \"#181a1b\",\r\n paper: \"#151617\",\r\n },\r\n text: {\r\n primary: \"#e8e6e3\",\r\n },\r\n common: {\r\n main: \"#ffffff\",\r\n },\r\n },\r\n});\r\n\r\nconst draculaTheme = createTheme({\r\n palette: {\r\n type: \"dark\",\r\n primary: {\r\n main: \"#6272a4\",\r\n },\r\n secondary: {\r\n main: \"#44475a\",\r\n },\r\n error: {\r\n main: \"#ffb86c\",\r\n },\r\n warning: {\r\n main: \"#ff5555\",\r\n },\r\n success: {\r\n main: \"#50fa7b\",\r\n },\r\n background: {\r\n default: \"#282a36\",\r\n paper: \"#242630\",\r\n },\r\n text: {\r\n primary: \"#f8f8f2\",\r\n },\r\n common: {\r\n main: \"#6272a4\",\r\n },\r\n },\r\n});\r\n\r\nconst nordTheme = createTheme({\r\n palette: {\r\n type: \"dark\",\r\n primary: {\r\n main: \"#5E81AC\",\r\n },\r\n secondary: {\r\n main: \"#88C0D0\",\r\n },\r\n error: {\r\n main: \"#BF616A\",\r\n },\r\n warning: {\r\n main: \"#EBCB8B\",\r\n },\r\n success: {\r\n main: \"#A3BE8C\",\r\n },\r\n background: {\r\n default: \"#2E3440\",\r\n paper: \"#3B4252\",\r\n },\r\n text: {\r\n primary: \"#ECEFF4\",\r\n },\r\n common: {\r\n main: \"#81A1C1\",\r\n },\r\n },\r\n});\r\n\r\nconst ui_config = JSON.parse(\r\n window.localStorage.getItem(\"ui_config\") ||\r\n window.sessionStorage.getItem(\"ui_config\") ||\r\n \"{}\"\r\n);\r\nvar customTheme;\r\nif (ui_config.custom_theme) {\r\n customTheme = createTheme(ui_config.custom_theme);\r\n}\r\n\r\nvar theme;\r\n\r\nif (\r\n window.localStorage.getItem(\"theme\") === \"light\" ||\r\n window.sessionStorage.getItem(\"theme\") === \"light\"\r\n) {\r\n theme = lightTheme;\r\n} else if (\r\n window.localStorage.getItem(\"theme\") === \"dark\" ||\r\n window.sessionStorage.getItem(\"theme\") === \"dark\"\r\n) {\r\n theme = darkTheme;\r\n} else if (\r\n window.localStorage.getItem(\"theme\") === \"dracula\" ||\r\n window.sessionStorage.getItem(\"theme\") === \"dracula\"\r\n) {\r\n theme = draculaTheme;\r\n} else if (\r\n window.localStorage.getItem(\"theme\") === \"nord\" ||\r\n window.sessionStorage.getItem(\"theme\") === \"nord\"\r\n) {\r\n theme = nordTheme;\r\n} else if (\r\n window.localStorage.getItem(\"theme\") === \"custom\" ||\r\n window.sessionStorage.getItem(\"theme\") === \"custom\"\r\n) {\r\n theme = customTheme;\r\n} else {\r\n theme = darkTheme;\r\n window.localStorage.setItem(\"theme\", \"dark\");\r\n window.sessionStorage.setItem(\"theme\", \"dark\");\r\n}\r\n\r\nexport default theme;\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Button, CircularProgress, Switch, TextField } from \"@material-ui/core\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\n\r\nimport Swal from \"sweetalert2/src/sweetalert2.js\";\r\nimport \"@sweetalert2/theme-dark/dark.css\";\r\n\r\nimport axios from \"axios\";\r\n\r\nimport { Footer, Nav, theme } from \"../../components\";\r\n\r\nconst styles = (theme) => ({\r\n Form: {\r\n textAlign: \"center\",\r\n \"& .MuiTextField-root\": {\r\n width: \"30ch\",\r\n margin: theme.spacing(1),\r\n textAlign: \"left\",\r\n },\r\n \"& .MuiTypography-root\": {\r\n margin: \"30px 30px\",\r\n },\r\n },\r\n submit: {\r\n margin: theme.spacing(4, 0, 2),\r\n width: \"20ch\",\r\n },\r\n});\r\n\r\nexport class Settings extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n auth: window.sessionStorage.getItem(\"auth\") || window.localStorage.getItem(\"auth\") || \"0\",\r\n error: \"\",\r\n isLoaded: false,\r\n secret: window.sessionStorage.getItem(\"secret\"),\r\n server: window.sessionStorage.getItem(\"server\") || window.localStorage.getItem(\"server\") || window.location.origin,\r\n };\r\n\r\n this.dismissError = this.dismissError.bind(this);\r\n this.handleSubmit = this.handleSubmit.bind(this);\r\n this.handleChange = this.handleChange.bind(this);\r\n this.handleRestart = this.handleRestart.bind(this);\r\n this.handleKillSwitch = this.handleKillSwitch.bind(this);\r\n this.handleRebuild = this.handleRebuild.bind(this);\r\n this.handleFileBrowser = this.handleFileBrowser.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n let { secret, server } = this.state;\r\n\r\n let navProps = { ...this.props };\r\n navProps.classes = {};\r\n\r\n if (window.sessionStorage.getItem(\"secret\") == null) {\r\n this.props.history.push(\"/settings/login\");\r\n } else {\r\n let req_path = `${server}/api/v1/config`;\r\n let req_args = `?a=${auth}&secret=${encodeURIComponent(secret)}`;\r\n\r\n axios\r\n .get(req_path + req_args)\r\n .then((response) =>\r\n this.setState({\r\n config: JSON.stringify(response.data.content, null, 4),\r\n isLoaded: true,\r\n navProps: navProps,\r\n tempSecret: response.data.content.secret_key,\r\n })\r\n )\r\n .catch((error) => {\r\n console.error(error);\r\n if (error.response) {\r\n let data = error.response.data;\r\n if (data.code === 401) {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Login\",\r\n confirmButtonColor: theme.palette.success.main,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n }\r\n });\r\n } else if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n } else if (error.request) {\r\n if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `libDrive could not communicate with the server! Is '${server}' the correct address?`,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n dismissError() {\r\n this.setState({ error: \"\" });\r\n }\r\n\r\n handleRestart(evt) {\r\n evt.preventDefault();\r\n let { secret, server } = this.state;\r\n\r\n let req_path = `${server}/api/v1/restart`;\r\n let req_args = `?a=${auth}&secret=${encodeURIComponent(secret)}`;\r\n\r\n axios\r\n .get(req_path + req_args)\r\n .then((response) => {\r\n Swal.fire({\r\n title: \"Success!\",\r\n text: response.data.message,\r\n icon: \"success\",\r\n confirmButtonText: \"OK\",\r\n confirmButtonColor: theme.palette.success.main,\r\n });\r\n })\r\n .catch((error) => {\r\n console.error(error);\r\n Swal.fire({\r\n title: \"Success!\",\r\n text: \"libDrive is being restarted, this might take some time, so the app won't load\",\r\n icon: \"success\",\r\n confirmButtonText: \"OK\",\r\n confirmButtonColor: theme.palette.success.main,\r\n });\r\n });\r\n }\r\n\r\n handleSubmit(evt) {\r\n evt.preventDefault();\r\n let { secret, server } = this.state;\r\n\r\n let req_path = `${server}/api/v1/config`;\r\n let req_args = `?a=${auth}&secret=${encodeURIComponent(secret)}`;\r\n\r\n axios\r\n .post(req_path + req_args, JSON.parse(this.state.config))\r\n .then((response) => {\r\n Swal.fire({\r\n title: \"Success!\",\r\n text: response.data.message,\r\n icon: \"success\",\r\n confirmButtonText: \"OK\",\r\n confirmButtonColor: theme.palette.success.main,\r\n });\r\n })\r\n .catch((error) => {\r\n console.error(error);\r\n if (error.response) {\r\n let data = error.response.data;\r\n if (data.code === 401) {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n window.sessionStorage.removeItem(\"secret\");\r\n this.props.history.push(\"/settings/login\");\r\n }\r\n });\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n } else if (error.request) {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `libDrive could not communicate with the server! Is ${server} the correct address?`,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n handleChange(evt) {\r\n this.setState({\r\n config: evt.target.value,\r\n });\r\n }\r\n\r\n handleKillSwitch(evt) {\r\n let config = JSON.parse(this.state.config);\r\n\r\n config.kill_switch = evt.target.checked;\r\n this.setState({ config: JSON.stringify(config, null, 4) });\r\n this.handleSubmit(evt);\r\n }\r\n\r\n handleRebuild(evt) {\r\n let { secret, server } = this.state;\r\n\r\n let req_path = `${server}/api/v1/rebuild`;\r\n let req_args = `?a=${auth}&secret=${encodeURIComponent(secret)}`;\r\n\r\n axios\r\n .get(req_path + req_args)\r\n .then((response) =>\r\n Swal.fire({\r\n title: \"Success!\",\r\n text: \"libDrive's metadata is being rebuilt...\",\r\n icon: \"success\",\r\n confirmButtonText: \"OK\",\r\n confirmButtonColor: theme.palette.success.main,\r\n })\r\n )\r\n .catch((error) => {\r\n console.error(error);\r\n if (auth == null || server == null) {\r\n this.props.history.push(\"/login\");\r\n } else if (error.response) {\r\n if (error.response.status === 401) {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: \"Your credentials are invalid!\",\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n }\r\n });\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: \"Something went wrong while communicating with the server!\",\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n } else if (error.request) {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `libDrive could not communicate with the server! Is ${server} the correct address?`,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n handleFileBrowser() {\r\n let { secret, server } = this.state;\r\n\r\n window.open(`${server}/api/v1/debug?secret=${secret}`);\r\n }\r\n\r\n render() {\r\n let { config, isLoaded, navProps } = this.state;\r\n const { classes } = this.props;\r\n\r\n return isLoaded ? (\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n Kill Switch\r\n

\r\n \r\n
\r\n
\r\n
\r\n
\r\n ) : (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default withStyles(styles, { withTheme: true })(Settings);\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Avatar, Button, Container, CircularProgress, CssBaseline, TextField, Typography } from \"@material-ui/core\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport LockOutlinedIcon from \"@material-ui/icons/LockOutlined\";\r\n\r\nimport Swal from \"sweetalert2/src/sweetalert2.js\";\r\nimport \"@sweetalert2/theme-dark/dark.css\";\r\n\r\nimport axios from \"axios\";\r\n\r\nimport { Footer, Nav, theme } from \"../../components\";\r\n\r\nconst styles = (theme) => ({\r\n paper: {\r\n marginTop: theme.spacing(8),\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n alignItems: \"center\",\r\n },\r\n avatar: {\r\n margin: theme.spacing(1),\r\n backgroundColor: theme.palette.secondary.main,\r\n },\r\n form: {\r\n width: \"100%\",\r\n marginTop: theme.spacing(1),\r\n },\r\n submit: {\r\n margin: theme.spacing(3, 0, 2),\r\n },\r\n});\r\n\r\nclass SettingsLoginForm extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n auth: window.sessionStorage.getItem(\"auth\") || window.localStorage.getItem(\"auth\") || \"0\",\r\n isLoaded: false,\r\n secret: \"\",\r\n server: window.sessionStorage.getItem(\"server\") || window.localStorage.getItem(\"server\") || window.location.origin,\r\n };\r\n\r\n this.handleSecretChange = this.handleSecretChange.bind(this);\r\n this.handleSubmit = this.handleSubmit.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n let navProps = { ...this.props };\r\n navProps.classes = {};\r\n this.setState({ isLoaded: true, navProps: navProps });\r\n }\r\n\r\n handleSubmit(evt) {\r\n evt.preventDefault();\r\n let { secret, server } = this.state;\r\n\r\n let req_path = `${server}/api/v1/config`;\r\n let req_args = `?a=${auth}&secret=${encodeURIComponent(secret)}`;\r\n\r\n axios\r\n .get(req_path + req_args)\r\n .then((response) => {\r\n window.sessionStorage.setItem(\"secret\", secret);\r\n this.props.history.push(\"/settings\");\r\n })\r\n .catch((error) => {\r\n console.error(error);\r\n if (error.response) {\r\n let data = error.response.data;\r\n if (data.code === 401) {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"OK\",\r\n confirmButtonColor: theme.palette.success.main,\r\n });\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"OK\",\r\n confirmButtonColor: theme.palette.success.main,\r\n }).then((result) => {\r\n location.reload();\r\n });\r\n }\r\n } else if (error.request) {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: \"libDrive could not communicate with the server. Is ${server} the correct address?\",\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n handleSecretChange(evt) {\r\n this.setState({\r\n secret: evt.target.value,\r\n });\r\n }\r\n\r\n render() {\r\n let { isLoaded, navProps, secret } = this.state;\r\n const { classes } = this.props;\r\n\r\n return isLoaded ? (\r\n
\r\n
\r\n ) : (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default withStyles(styles, { withTheme: true })(SettingsLoginForm);\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Link } from \"react-router-dom\";\r\n\r\nimport {\r\n Divider,\r\n FormControl,\r\n Select,\r\n InputLabel,\r\n MenuItem,\r\n} from \"@material-ui/core\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\n\r\nimport { guid } from \"../../components\";\r\n\r\nimport \"./index.css\";\r\n\r\nclass SortMenu extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = props.state;\r\n this.formatSort = this.formatSort.bind(this);\r\n }\r\n\r\n formatSort(str) {\r\n if (!str) {\r\n return \"Sort\";\r\n }\r\n let str_split = str.split(\"-\");\r\n for (var i = 0; i < str_split.length; i++) {\r\n if (str_split[i] == \"asc\") {\r\n str_split[i] = \"ascending\";\r\n } else if (str_split[i] == \"des\") {\r\n str_split[i] = \"descending\";\r\n }\r\n str_split[i] =\r\n str_split[i].charAt(0).toUpperCase() + str_split[i].substring(1);\r\n }\r\n return str_split.join(\" \");\r\n }\r\n\r\n render() {\r\n let { genre, sort } = this.state;\r\n const genres = [\r\n \"Action\",\r\n \"Action & Adventure\",\r\n \"Adventure\",\r\n \"Animation\",\r\n \"Comedy\",\r\n \"Crime\",\r\n \"Documentary\",\r\n \"Drama\",\r\n \"Ecchi\",\r\n \"Family\",\r\n \"Fantasy\",\r\n \"Hentai\",\r\n \"History\",\r\n \"Horror\",\r\n \"Kids\",\r\n \"Mahou Shoujo\",\r\n \"Mecha\",\r\n \"Music\",\r\n \"Mystery\",\r\n \"News\",\r\n \"Psychological\",\r\n \"Reality\",\r\n \"Romance\",\r\n \"Sci-Fi\",\r\n \"Sci-Fi & Fantasy\",\r\n \"Science Fiction\",\r\n \"Slice of Life\",\r\n \"Soap\",\r\n \"Sports\",\r\n \"Supernatural\",\r\n \"TV Movie\",\r\n \"Talk\",\r\n \"Thriller\",\r\n \"War\",\r\n \"War & Politics\",\r\n \"Western\",\r\n ];\r\n\r\n return (\r\n
\r\n \r\n \r\n {this.formatSort(sort) || \"Sort\"}\r\n \r\n \r\n \r\n Alphabet Ascending\r\n \r\n \r\n Alphabet Descending\r\n \r\n \r\n Date Ascending\r\n \r\n \r\n Date Descending\r\n \r\n \r\n Popularity Ascending\r\n \r\n \r\n Popularity Descending\r\n \r\n \r\n Vote Ascending\r\n \r\n \r\n Vote Descending\r\n \r\n \r\n Random\r\n \r\n \r\n \r\n \r\n {genre || \"Genre\"}\r\n \r\n \r\n All\r\n \r\n \r\n {genres.map((genre) => (\r\n \r\n {genre}\r\n \r\n ))}\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default withStyles({ withTheme: true })(SortMenu);\r\n","import React, { Component } from \"react\";\r\nimport {\r\n Avatar,\r\n Button,\r\n List,\r\n ListItem,\r\n ListItemAvatar,\r\n ListItemText,\r\n Dialog,\r\n DialogTitle,\r\n DialogActions,\r\n DialogContent,\r\n DialogContentText,\r\n TextField,\r\n} from \"@material-ui/core\";\r\nimport ListIcon from \"@material-ui/icons/List\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport { theme } from \"../../components\";\r\n\r\nexport default class StarDialog extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { ...props.state, isCreateOpen: false };\r\n this.handleCreateClose = this.handleCreateClose.bind(this);\r\n this.handleCreateChange = this.handleCreateChange.bind(this);\r\n this.handleCreateSubmit = this.handleCreateSubmit.bind(this);\r\n this.handleListItemClick = this.handleListItemClick.bind(this);\r\n }\r\n\r\n handleCreateClose(evt) {\r\n this.setState({ isCreateOpen: false });\r\n }\r\n\r\n handleCreateChange(evt) {\r\n this.setState({ createValue: evt.target.value });\r\n }\r\n\r\n handleCreateSubmit() {\r\n let { createValue } = this.state;\r\n let starred_lists = JSON.parse(\r\n window.localStorage.getItem(\"starred_lists\") || \"[]\"\r\n );\r\n let n = starred_lists.findIndex((i) => i.name == createValue);\r\n\r\n if (n == -1) {\r\n let metadata = {\r\n categoryInfo: {\r\n id: \"starred\",\r\n name: createValue,\r\n type: \"Starred\",\r\n },\r\n name: createValue,\r\n children: [],\r\n type: \"Starred\",\r\n };\r\n starred_lists.push(metadata);\r\n window.localStorage.setItem(\r\n \"starred_lists\",\r\n JSON.stringify(starred_lists)\r\n );\r\n this.setState({ isCreateOpen: false, starred_lists: starred_lists });\r\n } else {\r\n this.setState({ isCreateOpen: false });\r\n }\r\n }\r\n\r\n handleListItemClick(s, n) {\r\n if (s == \"createStarredList\" && n == -1) {\r\n this.setState({ isCreateOpen: true });\r\n } else {\r\n let { metadata } = this.props;\r\n let starred_lists = JSON.parse(\r\n window.localStorage.getItem(\"starred_lists\") || \"[]\"\r\n );\r\n let i = starred_lists[n].children.findIndex((i) => i.id == metadata.id);\r\n if (i == -1) {\r\n starred_lists[n].children.unshift(metadata);\r\n window.localStorage.setItem(\r\n \"starred_lists\",\r\n JSON.stringify(starred_lists)\r\n );\r\n this.props.handleClose(\"unstarred\");\r\n this.setState({ starred_lists: starred_lists });\r\n } else {\r\n starred_lists[n].children.splice(i, 1);\r\n window.localStorage.setItem(\r\n \"starred_lists\",\r\n JSON.stringify(starred_lists)\r\n );\r\n this.props.handleClose();\r\n }\r\n }\r\n }\r\n\r\n render() {\r\n let { isOpen, metadata } = this.props;\r\n let { isCreateOpen } = this.state;\r\n let starred_lists = JSON.parse(\r\n window.localStorage.getItem(\"starred_lists\") || \"[]\"\r\n );\r\n\r\n return (\r\n
\r\n \r\n \r\n Select starred list\r\n \r\n \r\n {starred_lists && starred_lists.length\r\n ? starred_lists.map((s, n) => (\r\n this.handleListItemClick(s, n)}\r\n key={s.name}\r\n >\r\n \r\n x.id == metadata.id)\r\n ? { backgroundColor: theme.palette.success.main }\r\n : null\r\n }\r\n >\r\n \r\n \r\n \r\n \r\n \r\n ))\r\n : null}\r\n\r\n
\r\n this.handleListItemClick(\"createStarredList\", -1)}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n Create starred list\r\n \r\n \r\n Enter the starred list's name in the form below.\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Carousel, Footer, Nav } from \"../../components\";\r\n\r\nexport default class StarredLists extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n starred_lists: JSON.parse(window.localStorage.getItem(\"starred_lists\") || \"[]\"),\r\n };\r\n }\r\n\r\n render() {\r\n let { starred_lists } = this.state;\r\n\r\n return (\r\n
\r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Divider, IconButton, Menu, MenuItem } from \"@material-ui/core\";\r\nimport Brightness6Icon from \"@material-ui/icons/Brightness6\";\r\n\r\nexport default class ThemeMenu extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n menuAnchor: false,\r\n ui_config: props.ui_config,\r\n };\r\n this.handleClick = this.handleClick.bind(this);\r\n this.handleClose = this.handleClose.bind(this);\r\n this.handleTheme = this.handleTheme.bind(this);\r\n }\r\n\r\n handleClick(evt) {\r\n this.setState({\r\n menuAnchor: evt.currentTarget,\r\n });\r\n }\r\n\r\n handleClose(evt) {\r\n this.setState({\r\n menuAnchor: false,\r\n });\r\n }\r\n\r\n handleTheme(name) {\r\n this.setState({\r\n menuAnchor: false,\r\n });\r\n window.localStorage.setItem(\"theme\", name);\r\n window.sessionStorage.setItem(\"theme\", name);\r\n window.location.reload();\r\n }\r\n\r\n render() {\r\n let { menuAnchor, ui_config } = this.state;\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n this.handleTheme(\"light\")}>Light\r\n this.handleTheme(\"dark\")}>Dark\r\n this.handleTheme(\"dracula\")}>\r\n Dracula\r\n \r\n this.handleTheme(\"nord\")}>Nord\r\n {ui_config.custom_theme ? (\r\n
\r\n \r\n this.handleTheme(\"custom\")}>\r\n Custom\r\n \r\n
\r\n ) : null}\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Link } from \"react-router-dom\";\r\n\r\nimport { Typography } from \"@material-ui/core\";\r\n\r\nimport { guid } from \"../../components\";\r\nimport \"./index.css\";\r\n\r\nexport default class Tile extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n metadata: this.props.metadata,\r\n server:\r\n window.sessionStorage.getItem(\"server\") ||\r\n window.localStorage.getItem(\"server\") ||\r\n window.location.origin,\r\n };\r\n }\r\n\r\n render() {\r\n let { metadata, server } = this.state;\r\n\r\n return (\r\n
\r\n {metadata.length\r\n ? metadata.map((category) => (\r\n
\r\n \r\n {category.categoryInfo.name}\r\n \r\n
\r\n {category.children.length\r\n ? category.children.map((item) => (\r\n
\r\n \r\n \r\n \r\n \r\n {item.title}\r\n \r\n
\r\n ))\r\n : null}\r\n
\r\n
\r\n ))\r\n : null}\r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\nimport { Dialog, DialogTitle } from \"@material-ui/core\";\r\n\r\nexport default class StarDialog extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { ...props.state, isCreateOpen: false };\r\n }\r\n\r\n render() {\r\n let { isOpen, metadata, trailer } = this.props;\r\n\r\n return (\r\n
\r\n \r\n \r\n {metadata.title} - Trailer\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Link } from \"react-router-dom\";\r\n\r\nimport { Avatar, Button, Chip, ClickAwayListener, Divider, IconButton, Menu, MenuItem, Tooltip, Typography } from \"@material-ui/core\";\r\nimport { Rating } from \"@material-ui/lab\";\r\nimport StarIcon from \"@material-ui/icons/Star\";\r\nimport StarBorderIcon from \"@material-ui/icons/StarBorder\";\r\nimport SubtitlesOutlinedIcon from \"@material-ui/icons/SubtitlesOutlined\";\r\nimport YouTubeIcon from \"@material-ui/icons/YouTube\";\r\n\r\nimport DPlayer from \"libdrive-player\";\r\nimport { default as toWebVTT } from \"srt-webvtt\";\r\n\r\nimport Swal from \"sweetalert2/src/sweetalert2.js\";\r\nimport \"@sweetalert2/theme-dark/dark.css\";\r\n\r\nimport axios from \"axios\";\r\n\r\nimport { DownloadMenu, guid, PlayerMenu, seo, StarDialog, theme, TrailerDialog } from \"../../../components\";\r\n\r\nexport default class MovieView extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n ...props.state,\r\n subtitleMenuAnchor: false,\r\n tooltipOpen: false,\r\n tooltipOpen2: false,\r\n trailer: {},\r\n };\r\n this.onFileChange = this.onFileChange.bind(this);\r\n this.prettyDate = this.prettyDate.bind(this);\r\n this.handleStar = this.handleStar.bind(this);\r\n this.handleStarClose = this.handleStarClose.bind(this);\r\n this.handleTrailer = this.handleTrailer.bind(this);\r\n this.handleTrailerClose = this.handleTrailerClose.bind(this);\r\n this.handleSubtitleMenuOpen = this.handleSubtitleMenuOpen.bind(this);\r\n this.handleSubtitleMenuClose = this.handleSubtitleMenuClose.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n let { metadata, ui_config } = this.state;\r\n\r\n seo({\r\n title: `${ui_config.title || \"libDrive\"} - ${metadata.title || metadata.name}`,\r\n description: `Watch ${metadata.title || metadata.name} on ${ui_config.title || \"libDrive\"}! — ${metadata.overview}`,\r\n image: metadata.backdropPath,\r\n type: \"video.movie\",\r\n });\r\n }\r\n\r\n async onFileChange(evt) {\r\n if (evt.target.files.length) {\r\n if (evt.target.files[0].name.endsWith(\".srt\")) {\r\n const vtt = await toWebVTT(evt.target.files[0]);\r\n this.setState({\r\n file: vtt,\r\n fileName: evt.target.files[0].name,\r\n playerKey: guid(),\r\n });\r\n } else {\r\n this.setState({\r\n file: URL.createObjectURL(evt.target.files[0]),\r\n playerKey: guid(),\r\n });\r\n }\r\n } else {\r\n this.setState({ file: null, playerKey: guid() });\r\n }\r\n }\r\n\r\n prettyDate() {\r\n let old_date = this.state.metadata.releaseDate;\r\n let date_comp = old_date.split(\"-\");\r\n let date = new Date(date_comp[0], date_comp[1], date_comp[2]);\r\n return date.toDateString();\r\n }\r\n\r\n handleStar() {\r\n this.setState({ openStarDialog: true });\r\n }\r\n\r\n handleStarClose(evt) {\r\n if (evt == \"starred\") {\r\n this.setState({ openStarDialog: false, starred: true });\r\n } else if (evt == \"unstarred\") {\r\n this.setState({\r\n openStarDialog: false,\r\n starred: JSON.parse(window.localStorage.getItem(\"starred_lists\") || \"[]\").some((i) => i.children.some((x) => x.id == this.state.metadata.id)) || false,\r\n });\r\n } else {\r\n this.setState({ openStarDialog: false });\r\n }\r\n }\r\n\r\n handleTrailer() {\r\n let { auth, metadata, server } = this.state;\r\n\r\n let req_path = `${server}/api/v1/trailer/${metadata.apiId}`;\r\n let req_args = `?a=${auth}&t=movie&api=${metadata.api}`;\r\n\r\n axios\r\n .get(req_path + req_args)\r\n .then((response) =>\r\n this.setState({\r\n openTrailerDialog: true,\r\n trailer: response.data.content,\r\n })\r\n )\r\n .catch((error) => {\r\n console.error(error);\r\n if (error.response) {\r\n let data = error.response.data;\r\n if (data.code === 401) {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Login\",\r\n confirmButtonColor: theme.palette.success.main,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n }\r\n });\r\n } else if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: \"No trailer could be found.\",\r\n icon: \"error\",\r\n confirmButtonText: \"Ok\",\r\n confirmButtonColor: theme.palette.success.main,\r\n });\r\n }\r\n } else if (error.request) {\r\n if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `libDrive could not communicate with the server! Is '${server}' the correct address?`,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n handleTrailerClose() {\r\n this.setState({ openTrailerDialog: false });\r\n }\r\n\r\n handleSubtitleMenuOpen(evt) {\r\n let { tracks } = this.state;\r\n\r\n if (tracks.length) {\r\n this.setState({\r\n subtitleMenuAnchor: evt.currentTarget,\r\n });\r\n } else {\r\n const subtitleButton = document.getElementById(\"file-input-button\");\r\n subtitleButton.click();\r\n }\r\n }\r\n\r\n handleSubtitleMenuClose() {\r\n this.setState({\r\n subtitleMenuAnchor: false,\r\n });\r\n }\r\n\r\n render() {\r\n let { default_track, default_video, file, fileName, metadata, playerKey, server, videos, starred, subtitleMenuAnchor, tracks, tooltipOpen, tooltipOpen2, trailer } = this.state;\r\n\r\n if (file) {\r\n tracks = [{ name: fileName, url: file }];\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n this.setState({ tooltipOpen: false })}>\r\n {metadata.name}}\r\n arrow\r\n placement=\"top-start\"\r\n open={tooltipOpen}\r\n disableFocusListener\r\n disableHoverListener\r\n disableTouchListener\r\n onClose={() => this.setState({ tooltipOpen: false })}\r\n PopperProps={{\r\n disablePortal: true,\r\n }}\r\n >\r\n this.setState({ tooltipOpen: true })} variant=\"h3\" style={{ fontWeight: \"bold\" }} className=\"info__title\">\r\n {metadata.title}\r\n \r\n \r\n \r\n \r\n {metadata.overview}\r\n \r\n
\r\n this.setState({ tooltipOpen2: false })}>\r\n {metadata.voteAverage}/10}\r\n arrow\r\n placement=\"right\"\r\n open={tooltipOpen2}\r\n disableFocusListener\r\n disableHoverListener\r\n disableTouchListener\r\n onClose={() => this.setState({ tooltipOpen2: false })}\r\n PopperProps={{\r\n disablePortal: true,\r\n }}\r\n >\r\n
this.setState({ tooltipOpen2: true })}>\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n {starred ? : }\r\n \r\n {metadata.language ? `${this.prettyDate()} (${metadata.language.toUpperCase()})` : this.prettyDate()}\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {tracks.length ? (\r\n
\r\n {tracks.map((track) => (\r\n \r\n {track.name}\r\n \r\n ))}\r\n \r\n
\r\n ) : null}\r\n {\r\n document.getElementById(\"file-input-button\").click();\r\n this.setState({ subtitleMenuAnchor: false });\r\n }}\r\n >\r\n Upload\r\n \r\n
\r\n
\r\n
\r\n
\r\n {metadata.adult ? E} className=\"info__genre\" label={\"Adult (18+)\"} variant=\"outlined\" /> : null}\r\n {metadata.genres && metadata.genres.length\r\n ? metadata.genres.map((genre) => (\r\n \r\n {genre.charAt(0)}} className=\"info__genre\" label={genre} variant=\"outlined\" />\r\n \r\n ))\r\n : null}\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { Link } from \"react-router-dom\";\r\n\r\nimport { Avatar, Button, Chip, ClickAwayListener, Dialog, DialogTitle, Divider, IconButton, Menu, MenuItem, Tooltip, Typography } from \"@material-ui/core\";\r\nimport { Rating } from \"@material-ui/lab\";\r\nimport ArrowBackIcon from \"@material-ui/icons/ArrowBack\";\r\nimport ArrowForwardIcon from \"@material-ui/icons/ArrowForward\";\r\nimport StarIcon from \"@material-ui/icons/Star\";\r\nimport StarBorderIcon from \"@material-ui/icons/StarBorder\";\r\nimport SubtitlesOutlinedIcon from \"@material-ui/icons/SubtitlesOutlined\";\r\nimport YouTubeIcon from \"@material-ui/icons/YouTube\";\r\n\r\nimport DPlayer from \"libdrive-player\";\r\nimport { default as toWebVTT } from \"srt-webvtt\";\r\n\r\nimport Swal from \"sweetalert2/src/sweetalert2.js\";\r\nimport \"@sweetalert2/theme-dark/dark.css\";\r\n\r\nimport axios from \"axios\";\r\n\r\nimport { ChildrenMenu, DownloadMenu, guid, PlayerMenu, PlaylistMenu, seo, StarDialog, theme, TrailerDialog } from \"../../../components\";\r\n\r\nexport class TVBView extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n ...props.state,\r\n tooltipOpen: false,\r\n tooltipOpen2: false,\r\n trailer: {},\r\n };\r\n this.prettyDate = this.prettyDate.bind(this);\r\n this.handleStar = this.handleStar.bind(this);\r\n this.handleStarClose = this.handleStarClose.bind(this);\r\n this.handleTrailer = this.handleTrailer.bind(this);\r\n this.handleTrailerClose = this.handleTrailerClose.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n let { metadata, ui_config } = this.state;\r\n\r\n seo({\r\n title: `${ui_config.title || \"libDrive\"} - ${metadata.title || metadata.name}`,\r\n description: `Watch ${metadata.title || metadata.name} on ${ui_config.title || \"libDrive\"}! — ${metadata.overview}`,\r\n image: metadata.backdropPath,\r\n type: \"video.movie\",\r\n });\r\n }\r\n\r\n prettyDate() {\r\n let old_date = this.state.metadata.releaseDate;\r\n let date_comp = old_date.split(\"-\");\r\n let date = new Date(date_comp[0], date_comp[1], date_comp[2]);\r\n return date.toDateString();\r\n }\r\n\r\n handleStar() {\r\n this.setState({ openStarDialog: true });\r\n }\r\n\r\n handleStarClose(evt) {\r\n if (evt == \"starred\") {\r\n this.setState({ openStarDialog: false, starred: true });\r\n } else if (evt == \"unstarred\") {\r\n this.setState({\r\n openStarDialog: false,\r\n starred: JSON.parse(window.localStorage.getItem(\"starred_lists\") || \"[]\").some((i) => i.children.some((x) => x.id == this.state.metadata.id)) || false,\r\n });\r\n } else {\r\n this.setState({ openStarDialog: false });\r\n }\r\n }\r\n\r\n handleTrailer() {\r\n let { auth, metadata, server, trailer } = this.state;\r\n\r\n if (!trailer.key) {\r\n let req_path = `${server}/api/v1/trailer/${metadata.apiId}`;\r\n let req_args = `?a=${auth}&t=tv&api=${metadata.api}`;\r\n\r\n axios\r\n .get(req_path + req_args)\r\n .then((response) =>\r\n this.setState({\r\n openTrailerDialog: true,\r\n trailer: response.data.content,\r\n })\r\n )\r\n .catch((error) => {\r\n console.error(error);\r\n if (error.response) {\r\n let data = error.response.data;\r\n if (data.code === 401) {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Login\",\r\n confirmButtonColor: theme.palette.success.main,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n }\r\n });\r\n } else if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: \"No trailer could be found.\",\r\n icon: \"error\",\r\n confirmButtonText: \"Ok\",\r\n confirmButtonColor: theme.palette.success.main,\r\n });\r\n }\r\n } else if (error.request) {\r\n if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: \"Something went wrong while looking for trailers.\",\r\n icon: \"error\",\r\n confirmButtonText: \"Ok\",\r\n confirmButtonColor: theme.palette.success.main,\r\n });\r\n }\r\n }\r\n });\r\n } else {\r\n this.setState({ openTrailerDialog: true });\r\n }\r\n }\r\n\r\n handleTrailerClose() {\r\n this.setState({ openTrailerDialog: false });\r\n }\r\n\r\n render() {\r\n let { metadata, server, starred, tooltipOpen, tooltipOpen2, trailer } = this.state;\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n this.setState({ tooltipOpen: false })}>\r\n {metadata.name}}\r\n arrow\r\n placement=\"top-start\"\r\n open={tooltipOpen}\r\n disableFocusListener\r\n disableHoverListener\r\n disableTouchListener\r\n onClose={() => this.setState({ tooltipOpen: false })}\r\n PopperProps={{\r\n disablePortal: true,\r\n }}\r\n >\r\n this.setState({ tooltipOpen: true })} variant=\"h3\" style={{ fontWeight: \"bold\" }} className=\"info__title\">\r\n {metadata.title}\r\n \r\n \r\n \r\n \r\n {metadata.overview}\r\n \r\n
\r\n this.setState({ tooltipOpen2: false })}>\r\n {metadata.voteAverage}/10}\r\n arrow\r\n placement=\"right\"\r\n open={tooltipOpen2}\r\n disableFocusListener\r\n disableHoverListener\r\n disableTouchListener\r\n onClose={() => this.setState({ tooltipOpen2: false })}\r\n PopperProps={{\r\n disablePortal: true,\r\n }}\r\n >\r\n
this.setState({ tooltipOpen2: true })}>\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n {starred ? : }\r\n \r\n {metadata.language ? `${this.prettyDate()} (${metadata.language.toUpperCase()})` : this.prettyDate()}\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n {metadata.genres && metadata.genres.length\r\n ? metadata.genres.map((genre) => (\r\n \r\n {genre.charAt(0)}} className=\"info__genre\" label={genre} variant=\"outlined\" />\r\n \r\n ))\r\n : null}\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport class TVSView extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { ...props.state, subtitleMenuAnchor: false };\r\n this.onFileChange = this.onFileChange.bind(this);\r\n this.handleSubtitleMenuOpen = this.handleSubtitleMenuOpen.bind(this);\r\n this.handleSubtitleMenuClose = this.handleSubtitleMenuClose.bind(this);\r\n this.handleClickImage = this.handleClickImage.bind(this);\r\n this.handleCloseDialog = this.handleCloseDialog.bind(this);\r\n this.handleParentSeason = this.handleParentSeason.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n let { metadata, q, ui_config } = this.state;\r\n\r\n seo({\r\n title: `${ui_config.title || \"libDrive\"} - ${metadata.children[q].name}`,\r\n description: `Watch ${metadata.children[q].name} on ${ui_config.title || \"libDrive\"}!`,\r\n type: \"video.episode\",\r\n });\r\n }\r\n\r\n componentWillUnmount() {\r\n let { id, q, watching } = this.state;\r\n\r\n watching[id] = q;\r\n\r\n window.localStorage.setItem(\"watching\", JSON.stringify(watching));\r\n }\r\n\r\n async onFileChange(evt) {\r\n if (evt.target.files.length) {\r\n if (evt.target.files[0].name.endsWith(\".srt\")) {\r\n const vtt = await toWebVTT(evt.target.files[0]);\r\n this.setState({\r\n file: vtt,\r\n fileName: evt.target.files[0].name,\r\n playerKey: guid(),\r\n });\r\n } else {\r\n this.setState({\r\n file: URL.createObjectURL(evt.target.files[0]),\r\n playerKey: guid(),\r\n });\r\n }\r\n } else {\r\n this.setState({ file: null, playerKey: guid() });\r\n }\r\n }\r\n\r\n handleSubtitleMenuOpen(evt) {\r\n let { tracks } = this.state;\r\n\r\n if (tracks.length) {\r\n this.setState({\r\n subtitleMenuAnchor: evt.currentTarget,\r\n });\r\n } else {\r\n const subtitleButton = document.getElementById(\"file-input-button\");\r\n subtitleButton.click();\r\n }\r\n }\r\n\r\n handleSubtitleMenuClose() {\r\n this.setState({\r\n subtitleMenuAnchor: false,\r\n });\r\n }\r\n\r\n handleClickImage(url) {\r\n this.setState({ image_url: url });\r\n }\r\n\r\n handleCloseDialog() {\r\n this.setState({ image_url: null });\r\n }\r\n\r\n handleParentSeason(next) {\r\n let { metadata, parent_index } = this.state;\r\n\r\n if (next) {\r\n if (metadata.parent_children[parent_index + 1]) {\r\n this.props.history.push(`/view/ts/${metadata.parent_children[parent_index + 1].id}`);\r\n }\r\n } else {\r\n if (metadata.parent_children[parent_index - 1]) {\r\n this.props.history.push(`/view/ts/${metadata.parent_children[parent_index - 1].id}`);\r\n }\r\n }\r\n }\r\n\r\n render() {\r\n let { default_track, default_video, file, fileName, image_url, metadata, parent_index, playerKey, q, server, videos, tracks, subtitleMenuAnchor } = this.state;\r\n\r\n if (file) {\r\n tracks = [{ name: fileName, url: file }];\r\n }\r\n\r\n function isHash(n, hash) {\r\n if (n === hash) {\r\n return \"pls-playing\";\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n Thumbnail\r\n \r\n \r\n
\r\n \r\n
\r\n
    \r\n {metadata.children.length\r\n ? metadata.children.map((child, n) => (\r\n
  • \r\n
    \r\n this.handleClickImage(`${server}/api/v1/image/thumbnail?id=${child.id}`)} onError={(e) => (e.target.style = \"display: none;\")} src={`${server}/api/v1/image/thumbnail?id=${child.id}`} className=\"plyr-miniposter\" />\r\n \r\n
    {child.name}
    \r\n \r\n
    \r\n
  • \r\n ))\r\n : null}\r\n
\r\n
\r\n
\r\n
\r\n \r\n {metadata.parent_children[parent_index - 1] ? (\r\n \r\n this.handleParentSeason(false)} style={{ justifySelf: \"flex-start\", marginLeft: \"5px\" }}>\r\n \r\n \r\n \r\n ) : (\r\n
\r\n \r\n
\r\n )}\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n {tracks.length ? (\r\n
\r\n {tracks.map((track) => (\r\n \r\n {track.name}\r\n \r\n ))}\r\n \r\n
\r\n ) : null}\r\n {\r\n document.getElementById(\"file-input-button\").click();\r\n this.setState({ subtitleMenuAnchor: false });\r\n }}\r\n >\r\n Upload\r\n \r\n
\r\n
\r\n
\r\n {metadata.parent_children[parent_index + 1] ? (\r\n \r\n this.handleParentSeason(true)} style={{ justifySelf: \"flex-end\", marginRight: \"5px\" }}>\r\n \r\n \r\n \r\n ) : (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n","import React, { Component } from \"react\";\r\n\r\nimport { CircularProgress } from \"@material-ui/core\";\r\n\r\nimport Swal from \"sweetalert2/src/sweetalert2.js\";\r\nimport \"@sweetalert2/theme-dark/dark.css\";\r\n\r\nimport axios from \"axios\";\r\nimport queryString from \"query-string\";\r\n\r\nimport { Footer, guid, Nav, seo, theme } from \"../../components\";\r\nimport MovieView from \"./MovieView\";\r\nimport { TVBView, TVSView } from \"./TVView\";\r\nimport \"./index.css\";\r\n\r\nexport default class View extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n auth: window.sessionStorage.getItem(\"auth\") || window.localStorage.getItem(\"auth\") || \"0\",\r\n id: this.props.match.params.id,\r\n isAndroid: /(android)/i.test(navigator.userAgent || navigator.vendor || window.opera),\r\n isIOS: /iPad|iPhone|iPod/.test(navigator.userAgent || navigator.vendor || window.opera) && !window.MSStream,\r\n isLoaded: false,\r\n metadata: {},\r\n openStarDialog: false,\r\n playerKey: guid(),\r\n q: queryString.parse(this.props.location.search).q || JSON.parse(window.localStorage.getItem(\"watching\") || \"{}\")[this.props.match.params.id] || 0,\r\n server: window.sessionStorage.getItem(\"server\") || window.localStorage.getItem(\"server\") || window.location.origin,\r\n videos: [],\r\n starred: JSON.parse(window.localStorage.getItem(\"starred_lists\") || \"[]\").some((i) => i.children.some((x) => x.id == this.props.match.params.id)) || false,\r\n tracks: [{ name: null, url: null }],\r\n type: this.props.type,\r\n ui_config: JSON.parse(window.localStorage.getItem(\"ui_config\") || window.sessionStorage.getItem(\"ui_config\") || \"{}\"),\r\n watching: JSON.parse(window.localStorage.getItem(\"watching\") || \"{}\"),\r\n };\r\n }\r\n\r\n async componentDidMount() {\r\n let { auth, id, q, server, type } = this.state;\r\n q = parseInt(q);\r\n\r\n if (!auth || !server) {\r\n this.props.history.push(\"/logout\");\r\n }\r\n\r\n document.documentElement.style.setProperty(\"--plyr-color-main\", theme.palette.primary.main);\r\n document.documentElement.style.setProperty(\"--plyr-video-background\", theme.palette.background.default);\r\n document.documentElement.style.setProperty(\"--plyr-menu-background\", theme.palette.background.paper);\r\n document.documentElement.style.setProperty(\"--plyr-menu-color\", theme.palette.text.primary);\r\n\r\n let req_path = `${server}/api/v1/metadata`;\r\n let req_args = `?a=${auth}&id=${encodeURIComponent(id)}`;\r\n\r\n var response1 = await axios.get(req_path + req_args).catch((error) => {\r\n console.error(error);\r\n if (error.response) {\r\n let data = error.response.data;\r\n if (data.code === 401) {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Login\",\r\n confirmButtonColor: theme.palette.success.main,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n }\r\n });\r\n } else if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `Something went wrong while communicating with the server! Is '${server}' the correct address?`,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n } else if (error.request) {\r\n if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `libDrive could not communicate with the server! Is '${server}' the correct address?`,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n }\r\n });\r\n\r\n var metadata = response1.data.content;\r\n var response2;\r\n\r\n if (type == \"m\") {\r\n let req_path = `${server}/api/v1/streammap`;\r\n let req_args = `?a=${auth}&id=${encodeURIComponent(id)}&parent=${metadata.parents[0]}&name=${encodeURIComponent(metadata.name)}&t=${metadata.type}&server=${encodeURIComponent(server)}`;\r\n\r\n response2 = await axios.get(req_path + req_args).catch((error) => {\r\n console.error(error);\r\n if (error.response) {\r\n let data = error.response.data;\r\n if (data.code === 401) {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Login\",\r\n confirmButtonColor: theme.palette.success.main,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n }\r\n });\r\n } else if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `Something went wrong while communicating with the server! Is '${server}' the correct address?`,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n } else if (error.request) {\r\n if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `libDrive could not communicate with the server! Is '${server}' the correct address?`,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n }\r\n });\r\n } else if (type == \"ts\") {\r\n if (metadata.children.length && metadata.children[q]) {\r\n let req_path = `${server}/api/v1/streammap`;\r\n let req_args = `?a=${auth}&id=${encodeURIComponent(metadata.children[q].id)}&parent=${id}&name=${encodeURIComponent(metadata.children[q].name)}&t=${metadata.children[q].type}&server=${encodeURIComponent(server)}`;\r\n\r\n response2 = await axios.get(req_path + req_args).catch((error) => {\r\n console.error(error);\r\n if (error.response) {\r\n let data = error.response.data;\r\n if (data.code === 401) {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: data.message,\r\n icon: \"error\",\r\n confirmButtonText: \"Login\",\r\n confirmButtonColor: theme.palette.success.main,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n }\r\n });\r\n } else if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `Something went wrong while communicating with the server! Is '${server}' the correct address?`,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n } else if (error.request) {\r\n if (!server) {\r\n this.props.history.push(\"/logout\");\r\n } else {\r\n Swal.fire({\r\n title: \"Error!\",\r\n text: `libDrive could not communicate with the server! Is '${server}' the correct address?`,\r\n icon: \"error\",\r\n confirmButtonText: \"Logout\",\r\n confirmButtonColor: theme.palette.success.main,\r\n cancelButtonText: \"Retry\",\r\n cancelButtonColor: theme.palette.error.main,\r\n showCancelButton: true,\r\n }).then((result) => {\r\n if (result.isConfirmed) {\r\n this.props.history.push(\"/logout\");\r\n } else if (result.isDismissed) {\r\n location.reload();\r\n }\r\n });\r\n }\r\n }\r\n });\r\n } else {\r\n response2 = {\r\n data: { content: { default_video: 0, videos: [], subtitles: [] } },\r\n };\r\n }\r\n }\r\n\r\n var parent_index;\r\n if (metadata.parent_children) {\r\n for (let i = 0; i < metadata.parent_children.length; i++) {\r\n if (metadata.parent_children[i].id == id) {\r\n parent_index = i;\r\n }\r\n }\r\n }\r\n\r\n if (type == \"m\" || type == \"ts\") {\r\n this.setState({\r\n default_track: response2.data.content.default_track,\r\n default_video: response2.data.content.default_video,\r\n isLoaded: true,\r\n metadata: response1.data.content,\r\n parent_index: parent_index,\r\n q: q,\r\n type: type,\r\n videos: response2.data.content.videos,\r\n tracks: response2.data.content.tracks,\r\n });\r\n } else {\r\n this.setState({\r\n isLoaded: true,\r\n metadata: response1.data.content,\r\n type: type,\r\n });\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n seo();\r\n }\r\n\r\n render() {\r\n let { isLoaded, metadata, ui_config } = this.state;\r\n\r\n if (isLoaded) {\r\n seo({\r\n title: metadata.title ? `${ui_config.title || \"libDrive\"} - ${metadata.title}` : ui_config.title || \"libDrive\",\r\n description: `Watch ${metadata.title || metadata.name} on ${ui_config.title || \"libDrive\"}!`,\r\n image: metadata.backdropPath,\r\n });\r\n }\r\n\r\n return isLoaded && metadata.type == \"file\" ? (\r\n
\r\n
\r\n ) : isLoaded && metadata.type == \"directory\" && metadata.title ? (\r\n
\r\n
\r\n ) : isLoaded && metadata.type == \"directory\" ? (\r\n
\r\n
\r\n ) : (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport { BrowserRouter, Route, Switch } from \"react-router-dom\";\r\n\r\nimport { CssBaseline } from \"@material-ui/core\";\r\nimport { ThemeProvider } from \"@material-ui/core/styles\";\r\n\r\nimport {\r\n App,\r\n Browse,\r\n CategoryBrowse,\r\n Genres,\r\n Login,\r\n Logout,\r\n NotFound,\r\n Search,\r\n Settings,\r\n SettingsLoginForm,\r\n StarredLists,\r\n theme,\r\n guid,\r\n View,\r\n} from \"./components\";\r\nimport \"./index.css\";\r\n\r\nReactDOM.render(\r\n \r\n \r\n \r\n \r\n }\r\n />\r\n }\r\n />\r\n }\r\n />\r\n }\r\n />\r\n }\r\n />\r\n }\r\n />\r\n }\r\n />\r\n }\r\n />\r\n }\r\n />\r\n }\r\n />\r\n }\r\n />\r\n }\r\n />\r\n }\r\n />\r\n }\r\n />\r\n \r\n \r\n ,\r\n document.getElementById(\"root\")\r\n);\r\n"],"sourceRoot":""}