1. Added support for updating subs from remote plain text

2. Added index refreshing while deleting servers

Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Loren Eteval
2026-03-06 01:16:45 +08:00
parent 91d6f010f0
commit 88e447d30d
+19
View File
@@ -218,6 +218,21 @@ class SubscriptionManager(WebGETManager):
except Exception as ex:
# Any non-exit exceptions
logger.error(
f'parse base64 share link from \'{webURL}\' failed: {ex}. '
f'Try to fall back to plain text'
)
try:
uris = list(
filter(
lambda x: x != '',
data.decode().split('\n'),
)
)
except Exception as ex:
# Any non-exit exceptions
logger.error(f'parse share link from \'{webURL}\' failed: {ex}')
failureArgs.append({'error': classname(ex), **kwargs})
@@ -1525,6 +1540,10 @@ class UserServersQTableWidget(Mixins.QTranslatable, AppQTableWidget):
'ActivatedItemIndex', str(Storage.UserActivatedItemIndex() - 1)
)
# Refresh index
for index, item in enumerate(Storage.UserServers()):
item.index = index
if deleteActivated:
# Set invalid first
AppSettings.set('ActivatedItemIndex', str(-1))