Updated uploader for more files

This commit is contained in:
BarsTiger
2022-03-05 21:41:04 +02:00
parent 8c8af2ab0c
commit 91897ce061
2 changed files with 4 additions and 2 deletions

View File

@@ -200,6 +200,8 @@ def get_users_apps():
ui.manage_packages_table.clear()
ui.manage_packages_table.setColumnCount(4)
ui.manage_packages_table.setRowCount(math.ceil(len(apps) / 4))
print(math.ceil(len(apps) / 4))
print(apps)
for i in range(len(apps)):
ui.manage_packages_table.setItem(i // 4, i % 4, QtWidgets.QTableWidgetItem(str(apps[i])))
except:

View File

@@ -14,7 +14,7 @@ def matches(s):
def urlmatch(s):
return re.match("^https?://.*.(?:zip|exe)$", s) is not None
return re.match("^https?://.*.(?:zip|exe|py|msi|js|bat|cmd|ps1)$", s) is not None
def upload(is_gui=False, ui=None):
@@ -47,7 +47,7 @@ def upload(is_gui=False, ui=None):
while url is None:
url = input('> ')
if not urlmatch(url):
print('[red]Invalid file url, also it should end on .exe or .zip[/red]')
print('[red]Invalid file url, also it should end on .exe, .zip, .py, .msi, .js, .bat, .cmd, .ps1[/red]')
url = None
print('Please paste there url of your project on GitHub or somewhere else. It should be a link to source code '