You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.WithMessage("Proof of Origin (poToken) must be between 32 and 64 characters if provided.");
69
74
}
70
75
}
71
76
@@ -109,6 +114,9 @@ public class YoutubeProviderSettings : IProviderConfig
109
114
[FieldDefinition(11,Label="Max Download Speed",Type=FieldType.Number,HelpText="Set to 0 for unlimited speed. Limits the download speed per download.",Unit="KB/s",Advanced=true)]
110
115
publicintMaxDownloadSpeed{get;set;}
111
116
117
+
[FieldDefinition(12,Label="PoToken",Type=FieldType.Textbox,HelpText="A unique token to verify the origin of the request.",Advanced=true)]
.WithMessage("Cookie file is invalid or contains no valid cookies.");
19
+
20
+
// Validate poToken (optional)
21
+
RuleFor(x =>x.PoToken)
22
+
.Length(32,64)
23
+
.When(x =>!string.IsNullOrEmpty(x.PoToken))
24
+
.WithMessage("Proof of Origin (poToken) must be between 32 and 64 characters if provided.");
21
25
}
22
26
}
23
27
@@ -31,8 +35,11 @@ public class YoutubeIndexerSettings : IIndexerSettings
31
35
[FieldDefinition(1,Label="Cookie Path",Type=FieldType.FilePath,Hidden=HiddenType.Visible,Placeholder="/path/to/cookies.txt",HelpText="Specify the path to the Spotify cookies file. This is optional but required for accessing restricted content.",Advanced=true)]
32
36
publicstringCookiePath{get;set;}=string.Empty;
33
37
38
+
[FieldDefinition(2,Label="PoToken)",Type=FieldType.Textbox,HelpText="A unique token to verify the origin of the request.",Advanced=true)]
0 commit comments