Skip to content

Commit

Permalink
InstantRecordings - input can be as number only (#3756)
Browse files Browse the repository at this point in the history
Co-authored-by: ims <[email protected]>
  • Loading branch information
ims21 and ims committed Aug 20, 2023
1 parent 38e4902 commit 7f4b11b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/python/Screens/InfoBarGenerics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2729,15 +2729,15 @@ def TimeDateInputClosed(self, ret):
def changeDuration(self, entry):
if entry is not None and entry >= 0:
self.selectedEntry = entry
self.session.openWithCallback(self.inputCallback, InputBox, title=_("How many minutes do you want to record?"), text="5 ", maxSize=True, type=Input.NUMBER)
self.session.openWithCallback(self.inputCallback, InputBox, title=_("How many minutes do you want to record?"), text="5", maxSize=False, type=Input.NUMBER)

def addRecordingTime(self, entry):
if entry is not None and entry >= 0:
self.selectedEntry = entry
self.session.openWithCallback(self.inputAddRecordingTime, InputBox, title=_("How many minutes do you want add to the recording?"), text="5 ", maxSize=True, type=Input.NUMBER)
self.session.openWithCallback(self.inputAddRecordingTime, InputBox, title=_("How many minutes do you want add to the recording?"), text="5", maxSize=False, type=Input.NUMBER)

def inputAddRecordingTime(self, value):
if value and value.replace(" ", "").isdigit():
if value:
print("[InfoBarInstantRecord] added %d minutes for recording." % int(value))
entry = self.recording[self.selectedEntry]
if int(value) != 0:
Expand All @@ -2746,7 +2746,7 @@ def inputAddRecordingTime(self, value):
self.session.nav.RecordTimer.timeChanged(entry)

def inputCallback(self, value):
if value and value.replace(" ", "").isdigit():
if value:
print("[InfoBarInstantRecord] stopping recording after %d minutes." % int(value))
entry = self.recording[self.selectedEntry]
if int(value) != 0:
Expand Down

0 comments on commit 7f4b11b

Please sign in to comment.