Add skip subscription tips

pull/3598/head
2dust 2023-03-31 20:07:39 +08:00
parent 9dc6ba182a
commit f1679e444c
4 changed files with 21 additions and 10 deletions

View File

@ -175,24 +175,20 @@ namespace v2rayN.Handler
foreach (var item in subItem)
{
if (item.enabled == false)
{
continue;
}
if (!Utils.IsNullOrEmpty(subId) && item.id != subId)
{
continue;
}
string id = item.id.TrimEx();
string url = item.url.TrimEx();
string userAgent = item.userAgent.TrimEx();
string hashCode = $"{item.remarks}->";
if (Utils.IsNullOrEmpty(id) || Utils.IsNullOrEmpty(url))
if (Utils.IsNullOrEmpty(id) || Utils.IsNullOrEmpty(url) || (!Utils.IsNullOrEmpty(subId) && item.id != subId))
{
//_updateFunc(false, $"{hashCode}{ResUI.MsgNoValidSubscription}");
continue;
}
if (item.enabled == false)
{
_updateFunc(false, $"{hashCode}{ResUI.MsgSkipSubscriptionUpdate}");
continue;
}
var downloadHandle = new DownloadHandle();
downloadHandle.Error += (sender2, args) =>

View File

@ -1446,6 +1446,15 @@ namespace v2rayN.Resx {
}
}
/// <summary>
/// 查找类似 Updates are not enabled, skip this subscription 的本地化字符串。
/// </summary>
public static string MsgSkipSubscriptionUpdate {
get {
return ResourceManager.GetString("MsgSkipSubscriptionUpdate", resourceCulture);
}
}
/// <summary>
/// 查找类似 Start getting subscriptions 的本地化字符串。
/// </summary>

View File

@ -1150,4 +1150,7 @@
<data name="TipDisplayLog" xml:space="preserve">
<value>Please turn off when there is an abnormal disconnection</value>
</data>
<data name="MsgSkipSubscriptionUpdate" xml:space="preserve">
<value>Updates are not enabled, skip this subscription</value>
</data>
</root>

View File

@ -1150,4 +1150,7 @@
<data name="TipDisplayLog" xml:space="preserve">
<value>当有异常断流时请关闭</value>
</data>
<data name="MsgSkipSubscriptionUpdate" xml:space="preserve">
<value>未启用更新,跳过此订阅</value>
</data>
</root>