Optimize Subscription

This commit is contained in:
2dust 2023-06-04 15:50:25 +08:00
parent bc957fea71
commit b94a065c06
3 changed files with 7 additions and 3 deletions

View file

@ -1034,7 +1034,7 @@ namespace v2rayN.Handler
addStatus = AddVlessServer(ref config, profileItem, false);
}
if (addStatus == 0 && profileItem.port > 0)
if (addStatus == 0)
{
countServers++;
lstAdd.Add(profileItem);

View file

@ -154,7 +154,7 @@ namespace v2rayN.Handler
_updateFunc = update;
_updateFunc(false, ResUI.MsgUpdateSubscriptionStart);
var subItem = LazyConfig.Instance.SubItems();
var subItem = LazyConfig.Instance.SubItems().OrderBy(t => t.sort).ToList();
if (subItem == null || subItem.Count <= 0)
{
@ -175,6 +175,10 @@ namespace v2rayN.Handler
//_updateFunc(false, $"{hashCode}{ResUI.MsgNoValidSubscription}");
continue;
}
if (!url.StartsWith(Global.httpsProtocol) && !url.StartsWith(Global.httpProtocol))
{
continue;
}
if (item.enabled == false)
{
_updateFunc(false, $"{hashCode}{ResUI.MsgSkipSubscriptionUpdate}");

View file

@ -47,7 +47,7 @@ namespace v2rayN.ViewModels
private void SaveSub()
{
string remarks = SelectedSource.remarks;
if (Utils.IsNullOrEmpty(remarks))
if (string.IsNullOrEmpty(remarks))
{
UI.Show(ResUI.PleaseFillRemarks);
return;