Limit text length
This commit is contained in:
parent
e3ae8f497a
commit
a129db3e83
1 changed files with 6 additions and 1 deletions
|
@ -7,7 +7,12 @@ def addLyrics(text, ref = 0, db = dbtools.dbHelper()):
|
|||
|
||||
def queryLyrics(ref = 0):
|
||||
text = input("Text: ")
|
||||
ref = int(input("Reference [%i]: " % ref) or 0)
|
||||
|
||||
if len(text) > 130:
|
||||
print("Text too long (%i characters)" % len(text))
|
||||
return queryLyrics(ref)
|
||||
|
||||
ref = int(input("Reference [%i]: " % ref) or ref)
|
||||
|
||||
row = addLyrics(text, ref)
|
||||
|
||||
|
|
Loading…
Reference in a new issue