Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InstantRecordings - input can be as number only #3756

Merged
merged 1 commit into from
Aug 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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