mirror of
https://github.com/lutris/lutris
synced 2024-09-15 22:09:55 +00:00
Add additional validation for playtime input
This commit is contained in:
parent
38af68261e
commit
b870d29241
|
@ -607,6 +607,13 @@ class GameDialogCommon(SavableModelessDialog, DialogInstallUIDelegate):
|
||||||
if self.runner_name == "steam" and not self.lutris_config.game_config.get("appid"):
|
if self.runner_name == "steam" and not self.lutris_config.game_config.get("appid"):
|
||||||
ErrorDialog(_("Steam AppID not provided"), parent=self)
|
ErrorDialog(_("Steam AppID not provided"), parent=self)
|
||||||
return False
|
return False
|
||||||
|
if self.playtime_entry.get_text():
|
||||||
|
try:
|
||||||
|
float(self.playtime_entry.get_text())
|
||||||
|
except ValueError:
|
||||||
|
ErrorDialog(_("The entered playtime is invalid"), parent=self)
|
||||||
|
return False
|
||||||
|
|
||||||
invalid_fields = []
|
invalid_fields = []
|
||||||
runner_class = import_runner(self.runner_name)
|
runner_class = import_runner(self.runner_name)
|
||||||
runner_instance = runner_class()
|
runner_instance = runner_class()
|
||||||
|
|
Loading…
Reference in a new issue