MCPcopy
hub / github.com/pyload/pyload / conf_basic

Method conf_basic

module/setup.py:263–296  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

261 return basic, ssl, captcha, gui, web, js
262
263 def conf_basic(self):
264 print ""
265 print _("## Basic Setup ##")
266
267 print ""
268 print _("The following logindata is valid for CLI, GUI and webinterface.")
269
270 from module.database import DatabaseBackend
271
272 db = DatabaseBackend(None)
273 db.setup()
274 username = self.ask(_("Username"), "User")
275 password = self.ask("", "", password=True)
276 db.addUser(username, password)
277 db.shutdown()
278
279 print ""
280 print _("External clients (GUI, CLI or other) need remote access to work over the network.")
281 print _("However, if you only want to use the webinterface you may disable it to save ram.")
282 self.config["remote"]["activated"] = self.ask(_("Enable remote access"), self.yes, bool=True)
283
284 print ""
285 langs = self.config.getMetaData("general", "language")
286 self.config["general"]["language"] = self.ask(_("Language"), "en", langs["type"].split(";"))
287
288 self.config["general"]["download_folder"] = self.ask(_("Downloadfolder"), "Downloads")
289 self.config["download"]["max_downloads"] = self.ask(_("Max parallel downloads"), "3")
290 #print _("You should disable checksum proofing, if you have low hardware requirements.")
291 #self.config["general"]["checksum"] = self.ask(_("Proof checksum?"), "y", bool=True)
292
293 reconnect = self.ask(_("Use Reconnect?"), self.no, bool=True)
294 self.config["reconnect"]["activated"] = reconnect
295 if reconnect:
296 self.config["reconnect"]["method"] = self.ask(_("Reconnect script location"), "./reconnect.sh")
297
298
299 def conf_web(self):

Callers 1

startMethod · 0.95

Calls 8

setupMethod · 0.95
askMethod · 0.95
shutdownMethod · 0.95
DatabaseBackendClass · 0.90
addUserMethod · 0.80
getMetaDataMethod · 0.80
splitMethod · 0.80
_Function · 0.50

Tested by

no test coverage detected