mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-10-06 13:58:01 +03:00
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:
@@ -218,6 +218,21 @@ class SubscriptionManager(WebGETManager):
|
|||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
# Any non-exit exceptions
|
# 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}')
|
logger.error(f'parse share link from \'{webURL}\' failed: {ex}')
|
||||||
|
|
||||||
failureArgs.append({'error': classname(ex), **kwargs})
|
failureArgs.append({'error': classname(ex), **kwargs})
|
||||||
@@ -1525,6 +1540,10 @@ class UserServersQTableWidget(Mixins.QTranslatable, AppQTableWidget):
|
|||||||
'ActivatedItemIndex', str(Storage.UserActivatedItemIndex() - 1)
|
'ActivatedItemIndex', str(Storage.UserActivatedItemIndex() - 1)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Refresh index
|
||||||
|
for index, item in enumerate(Storage.UserServers()):
|
||||||
|
item.index = index
|
||||||
|
|
||||||
if deleteActivated:
|
if deleteActivated:
|
||||||
# Set invalid first
|
# Set invalid first
|
||||||
AppSettings.set('ActivatedItemIndex', str(-1))
|
AppSettings.set('ActivatedItemIndex', str(-1))
|
||||||
|
|||||||
Reference in New Issue
Block a user